summaryrefslogtreecommitdiffstats
path: root/polly/include/polly/CodeGen/LoopGenerators.h
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-05-16 06:40:06 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-05-16 06:40:06 +0000
commit5db6ffd76f50e58467530c63feb098d2ec59410e (patch)
tree8c7b12ca0a3570903cfc638038c788b513928123 /polly/include/polly/CodeGen/LoopGenerators.h
parentba71c085234044f8291b82749552a79d01f99631 (diff)
downloadbcm5719-llvm-5db6ffd76f50e58467530c63feb098d2ec59410e.tar.gz
bcm5719-llvm-5db6ffd76f50e58467530c63feb098d2ec59410e.zip
LoopGenerators: Construct loops such that they are already loop rotated
BeforeBB | v GuardBB / \ __ PreHeaderBB \ / \ / | latch HeaderBB | \ / \ / < \ / \ / ExitBB This does not only remove the need for an explicit loop rotate pass, but it also gives us the possibility to skip the construction of the guard condition in case the loop is known to be executed at least once. We do not yet exploit this, but by implementing this analysis in the isl code generator we should be able to remove more guards than the generic loop rotate pass can. Another point is that loop rotation can introduce additional PHI nodes, which may hide that a loop can be executed in parallel. This change avoids this complication and will make it easier to move the openmp code generation into a separate pass. llvm-svn: 181986
Diffstat (limited to 'polly/include/polly/CodeGen/LoopGenerators.h')
-rw-r--r--polly/include/polly/CodeGen/LoopGenerators.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/include/polly/CodeGen/LoopGenerators.h b/polly/include/polly/CodeGen/LoopGenerators.h
index 3a7e3b48a87..3f63c842d3c 100644
--- a/polly/include/polly/CodeGen/LoopGenerators.h
+++ b/polly/include/polly/CodeGen/LoopGenerators.h
@@ -36,10 +36,11 @@ using namespace llvm;
/// @param Builder The builder used to create the loop.
/// @param P A pointer to the pass that uses this function. It is used
/// to update analysis information.
+/// @param ExitBlock The block the loop will exit to.
/// @param Predicate The predicate used to generate the upper loop bound.
/// @return Value* The newly created induction variable for this loop.
Value *createLoop(Value *LowerBound, Value *UpperBound, Value *Stride,
- IRBuilder<> &Builder, Pass *P, BasicBlock *&AfterBlock,
+ IRBuilder<> &Builder, Pass *P, BasicBlock *&ExitBlock,
ICmpInst::Predicate Predicate);
class OMPGenerator {
OpenPOWER on IntegriCloud