summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2018-08-15 02:49:12 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2018-08-15 02:49:12 +0000
commit68290f838acf5c27eaa27d68fef11d5fbab33ea3 (patch)
tree0028eb6ba0e92c04dad9a4937b02dbf61d14a0c6 /llvm/lib/Transforms
parent633fe98e27107d629a7674025b8a67ef107c1bfe (diff)
downloadbcm5719-llvm-68290f838acf5c27eaa27d68fef11d5fbab33ea3.tar.gz
bcm5719-llvm-68290f838acf5c27eaa27d68fef11d5fbab33ea3.zip
[NFC][LICM] Make hoist method void
Method hoist always returns true. This patch makes it void. Differential Revision: https://reviews.llvm.org/D50696 Reviewed By: hiraditya llvm-svn: 339750
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index b99c6d3d4ea..890c449eb7e 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -93,7 +93,7 @@ static bool inSubLoop(BasicBlock *BB, Loop *CurLoop, LoopInfo *LI);
static bool isNotUsedOrFreeInLoop(const Instruction &I, const Loop *CurLoop,
const LoopSafetyInfo *SafetyInfo,
TargetTransformInfo *TTI, bool &FreeInLoop);
-static bool hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
+static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
const LoopSafetyInfo *SafetyInfo,
OptimizationRemarkEmitter *ORE);
static bool sink(Instruction &I, LoopInfo *LI, DominatorTree *DT,
@@ -487,7 +487,8 @@ bool llvm::hoistRegion(DomTreeNode *N, AliasAnalysis *AA, LoopInfo *LI,
isSafeToExecuteUnconditionally(
I, DT, CurLoop, SafetyInfo, ORE,
CurLoop->getLoopPreheader()->getTerminator()))) {
- Changed |= hoist(I, DT, CurLoop, SafetyInfo, ORE);
+ hoist(I, DT, CurLoop, SafetyInfo, ORE);
+ Changed = true;
continue;
}
@@ -1063,7 +1064,7 @@ static bool sink(Instruction &I, LoopInfo *LI, DominatorTree *DT,
/// When an instruction is found to only use loop invariant operands that
/// is safe to hoist, this instruction is called to do the dirty work.
///
-static bool hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
+static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
const LoopSafetyInfo *SafetyInfo,
OptimizationRemarkEmitter *ORE) {
auto *Preheader = CurLoop->getLoopPreheader();
@@ -1101,7 +1102,6 @@ static bool hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop,
else if (isa<CallInst>(I))
++NumMovedCalls;
++NumHoisted;
- return true;
}
/// Only sink or hoist an instruction if it is not a trapping instruction,
OpenPOWER on IntegriCloud