Skip to content

Commit

Permalink
[LoopPredication] NFC. Move a nested struct declaration before the fi…
Browse files Browse the repository at this point in the history
…elds, clang-format a bit

This will simplify the diff for an upcoming review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303543 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
arpilipe committed May 22, 2017
1 parent 32e52f5 commit 73576b5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/Transforms/Scalar/LoopPredication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,24 @@ using namespace llvm;

namespace {
class LoopPredication {
ScalarEvolution *SE;

Loop *L;
const DataLayout *DL;
BasicBlock *Preheader;

/// Represents an induction variable check:
/// icmp Pred, <induction variable>, <loop invariant limit>
struct LoopICmp {
ICmpInst::Predicate Pred;
const SCEVAddRecExpr *IV;
const SCEV *Limit;
LoopICmp(ICmpInst::Predicate Pred, const SCEVAddRecExpr *IV, const SCEV *Limit)
LoopICmp(ICmpInst::Predicate Pred, const SCEVAddRecExpr *IV,
const SCEV *Limit)
: Pred(Pred), IV(IV), Limit(Limit) {}
LoopICmp() {}
};

ScalarEvolution *SE;

Loop *L;
const DataLayout *DL;
BasicBlock *Preheader;

Optional<LoopICmp> parseLoopICmp(ICmpInst *ICI);

Value *expandCheck(SCEVExpander &Expander, IRBuilder<> &Builder,
Expand Down

0 comments on commit 73576b5

Please sign in to comment.