aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2017-03-17 17:13:41 +0000
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2017-03-17 17:13:41 +0000
commitee2dd785f617101cc7f02e7fb192761154867327 (patch)
tree254df54eb1c8484d84e8e269a4c10d7371d539c0 /llvm/lib/IR/Function.cpp
parentd06b025c9c7e4f0518ac9c5221f25c879c004c07 (diff)
downloadllvm-ee2dd785f617101cc7f02e7fb192761154867327.zip
llvm-ee2dd785f617101cc7f02e7fb192761154867327.tar.gz
llvm-ee2dd785f617101cc7f02e7fb192761154867327.tar.bz2
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
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions