llvm-project/llvm/lib/Transforms
Stanislav Mekhanoshin ee2dd785f6 Only unswitch loops with uniform conditions
Loop unswitching can be extremely harmful for a SIMT target. In case
if hoisted condition is not uniform a SIMT machine will execute both
clones of a loop sequentially. Therefor LoopUnswitch checks if the
condition is non-divergent.

Since DivergenceAnalysis adds an expensive PostDominatorTree analysis
not needed for non-SIMT targets a new option is added to avoid unneded
analysis initialization. The method getAnalysisUsage is called when
TargetTransformInfo is not yet available and we cannot use it here.
For that reason a new field DivergentTarget is added to PassManagerBuilder
to control the behavior and set this field from a target.

Differential Revision: https://reviews.llvm.org/D30796

llvm-svn: 298104
2017-03-17 17:13:41 +00:00
..
Coroutines Remove getArgumentList() in favor of arg_begin(), args(), etc 2017-03-16 22:59:15 +00:00
Hello
IPO Only unswitch loops with uniform conditions 2017-03-17 17:13:41 +00:00
InstCombine Salvage debug info from instructions about to be deleted 2017-03-16 21:14:09 +00:00
Instrumentation Remove getArgumentList() in favor of arg_begin(), args(), etc 2017-03-16 22:59:15 +00:00
ObjCARC Remove redundant code. NFC. 2017-02-25 00:59:49 +00:00
Scalar Only unswitch loops with uniform conditions 2017-03-17 17:13:41 +00:00
Utils Remove getArgumentList() in favor of arg_begin(), args(), etc 2017-03-16 22:59:15 +00:00
Vectorize [LV] Refactor cross-iteration phi's back-patching; NFC 2017-03-14 13:50:47 +00:00
CMakeLists.txt
LLVMBuild.txt