diff options
author | Tobias Grosser <tobias@grosser.es> | 2017-03-18 20:10:07 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2017-03-18 20:10:07 +0000 |
commit | 7693b116a1565d7428460d66c17a2e9b50148dcc (patch) | |
tree | ef29083bf059e192cbb9619282eea0152da89965 /polly/test/Isl/CodeGen/OpenMP/single_loop.ll | |
parent | d55e153b8777268c10c33a2210a2ad994114a90d (diff) | |
download | bcm5719-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/test/Isl/CodeGen/OpenMP/single_loop.ll')
-rw-r--r-- | polly/test/Isl/CodeGen/OpenMP/single_loop.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/polly/test/Isl/CodeGen/OpenMP/single_loop.ll b/polly/test/Isl/CodeGen/OpenMP/single_loop.ll index f43d1c395a3..eced8ea3a09 100644 --- a/polly/test/Isl/CodeGen/OpenMP/single_loop.ll +++ b/polly/test/Isl/CodeGen/OpenMP/single_loop.ll @@ -31,17 +31,13 @@ ; IR-NEXT: %polly.par.userContext = alloca ; IR-LABEL: polly.parallel.for: -; IR-NEXT: %0 = bitcast {}* %polly.par.userContext to i8* -; IR-NEXT: call void @llvm.lifetime.start(i64 0, i8* %0) ; IR-NEXT: %polly.par.userContext1 = bitcast {}* %polly.par.userContext to i8* ; IR-NEXT: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @single_parallel_loop_polly_subfn, i8* %polly.par.userContext1, i32 0, i64 0, i64 1024, i64 1) ; IR-NEXT: call void @single_parallel_loop_polly_subfn(i8* %polly.par.userContext1) ; IR-NEXT: call void @GOMP_parallel_end() -; IR-NEXT: %1 = bitcast {}* %polly.par.userContext to i8* -; IR-NEXT: call void @llvm.lifetime.end(i64 8, i8* %1) ; IR-NEXT: br label %polly.exiting -; IR: define internal void @single_parallel_loop_polly_subfn(i8* %polly.par.userContext) #2 +; IR: define internal void @single_parallel_loop_polly_subfn(i8* %polly.par.userContext) #1 ; IR-LABEL: polly.par.setup: ; IR-NEXT: %polly.par.LBPtr = alloca i64 ; IR-NEXT: %polly.par.UBPtr = alloca i64 @@ -81,7 +77,7 @@ ; IR-LABEL: polly.loop_preheader: ; IR-NEXT: br label %polly.loop_header -; IR: attributes #2 = { "polly.skip.fn" } +; IR: attributes #1 = { "polly.skip.fn" } ; IR-STRIDE4: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @single_parallel_loop_polly_subfn, i8* %polly.par.userContext1, i32 0, i64 0, i64 1024, i64 4) ; IR-STRIDE4: add nsw i64 %polly.indvar, 3 |