summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/LoopGenerators.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-03-18 20:10:07 +0000
committerTobias Grosser <tobias@grosser.es>2017-03-18 20:10:07 +0000
commit7693b116a1565d7428460d66c17a2e9b50148dcc (patch)
treeef29083bf059e192cbb9619282eea0152da89965 /polly/lib/CodeGen/LoopGenerators.cpp
parentd55e153b8777268c10c33a2210a2ad994114a90d (diff)
downloadbcm5719-llvm-7693b116a1565d7428460d66c17a2e9b50148dcc.tar.gz
bcm5719-llvm-7693b116a1565d7428460d66c17a2e9b50148dcc.zip
[OpenMP] Do not emit lifetime markers for context
In commit r219005 lifetime markers have been introduced to mark the lifetime of the OpenMP context data structure. However, their use seems incorrect and recently caused a miscompile in ASC_Sequoia/CrystalMk after r298053 which was not at all related to r298053. r298053 only caused a change in the loop order, as this change resulted in a different isl internal representation which caused the scheduler to derive a different schedule. This change then caused the IR to change, which apparently created a pattern in which LLVM exploites the lifetime markers. It seems we are using the OpenMP context outside of the lifetime markers. Even though CrystalMk could probably be fixed by expanding the scope of the lifetime markers, it is not clear what happens in case the OpenMP function call is in a loop which will cause a sequence of starting and ending lifetimes. As it is unlikely that the lifetime markers give any performance benefit, we just drop them to remove complexity. llvm-svn: 298192
Diffstat (limited to 'polly/lib/CodeGen/LoopGenerators.cpp')
-rw-r--r--polly/lib/CodeGen/LoopGenerators.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index d01e85fc2dd..fe7e95368c3 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -167,11 +167,6 @@ Value *ParallelLoopGenerator::createParallelLoop(
Builder.CreateCall(SubFn, SubFnParam);
createCallJoinThreads();
- // Mark the end of the lifetime for the parameter struct.
- Type *Ty = Struct->getType();
- ConstantInt *SizeOf = Builder.getInt64(DL.getTypeAllocSize(Ty));
- Builder.CreateLifetimeEnd(Struct, SizeOf);
-
return IV;
}
@@ -294,10 +289,6 @@ ParallelLoopGenerator::storeValuesIntoStruct(SetVector<Value *> &Values) {
StructType *Ty = StructType::get(Builder.getContext(), Members);
AllocaInst *Struct = new AllocaInst(Ty, nullptr, "polly.par.userContext", IP);
- // Mark the start of the lifetime for the parameter struct.
- ConstantInt *SizeOf = Builder.getInt64(DL.getTypeAllocSize(Ty));
- Builder.CreateLifetimeStart(Struct, SizeOf);
-
for (unsigned i = 0; i < Values.size(); i++) {
Value *Address = Builder.CreateStructGEP(Ty, Struct, i);
Address->setName("polly.subfn.storeaddr." + Values[i]->getName());
OpenPOWER on IntegriCloud