diff options
author | Chen Zheng <czhengsz@cn.ibm.com> | 2019-06-26 09:12:52 +0000 |
---|---|---|
committer | Chen Zheng <czhengsz@cn.ibm.com> | 2019-06-26 09:12:52 +0000 |
commit | 46ce9e4fff45e9f744d8424f00386d650975fd31 (patch) | |
tree | aaa8214c07e764210739d7312fb784092c9eb3f2 /llvm/lib/CodeGen/HardwareLoops.cpp | |
parent | 0a43d1fa719983a6f1ff0e9c15bc77beeea550c3 (diff) | |
download | bcm5719-llvm-46ce9e4fff45e9f744d8424f00386d650975fd31.tar.gz bcm5719-llvm-46ce9e4fff45e9f744d8424f00386d650975fd31.zip |
[HardwareLoops] NFC - move loop with irreducible control flow checking logic to isHardwareLoopProfitable()
llvm-svn: 364397
Diffstat (limited to 'llvm/lib/CodeGen/HardwareLoops.cpp')
-rw-r--r-- | llvm/lib/CodeGen/HardwareLoops.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/HardwareLoops.cpp b/llvm/lib/CodeGen/HardwareLoops.cpp index 43594915383..3d900e3b7f5 100644 --- a/llvm/lib/CodeGen/HardwareLoops.cpp +++ b/llvm/lib/CodeGen/HardwareLoops.cpp @@ -20,9 +20,7 @@ #include "llvm/PassSupport.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AssumptionCache.h" -#include "llvm/Analysis/CFG.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/LoopIterator.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpander.h" #include "llvm/Analysis/TargetTransformInfo.h" @@ -199,14 +197,8 @@ bool HardwareLoops::TryConvertLoop(Loop *L) { if (TryConvertLoop(*I)) return true; // Stop search. - // Bail out if the loop has irreducible control flow. - LoopBlocksRPO RPOT(L); - RPOT.perform(LI); - if (containsIrreducibleCFG<const BasicBlock *>(RPOT, *LI)) - return false; - HardwareLoopInfo HWLoopInfo(L); - if (TTI->isHardwareLoopProfitable(L, *SE, *AC, LibInfo, HWLoopInfo) || + if (TTI->isHardwareLoopProfitable(L, *LI, *SE, *AC, LibInfo, HWLoopInfo) || ForceHardwareLoops) { // Allow overriding of the counter width and loop decrement value. |