Skip to content

Commit 7b8692a

Browse files
committed
[LICM][NFC] Do not forward declaration of hoistMinMax
They all are now handled by hoistArithmetics, and only it should be forwarded.
1 parent 0929302 commit 7b8692a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Transforms/Scalar/LICM.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,6 @@ static bool hoistArithmetics(Instruction &I, Loop &L,
175175
ICFLoopSafetyInfo &SafetyInfo,
176176
MemorySSAUpdater &MSSAU, AssumptionCache *AC,
177177
DominatorTree *DT);
178-
/// Try to simplify things like (A < INV_1 AND icmp A < INV_2) into (A <
179-
/// min(INV_1, INV_2)), if INV_1 and INV_2 are both loop invariants and their
180-
/// minimun can be computed outside of loop, and X is not a loop-invariant.
181-
static bool hoistMinMax(Instruction &I, Loop &L, ICFLoopSafetyInfo &SafetyInfo,
182-
MemorySSAUpdater &MSSAU);
183178
static Instruction *cloneInstructionInExitBlock(
184179
Instruction &I, BasicBlock &ExitBlock, PHINode &PN, const LoopInfo *LI,
185180
const LoopSafetyInfo *SafetyInfo, MemorySSAUpdater &MSSAU);
@@ -2418,6 +2413,9 @@ bool pointerInvalidatedByBlock(BasicBlock &BB, MemorySSA &MSSA, MemoryUse &MU) {
24182413
return false;
24192414
}
24202415

2416+
/// Try to simplify things like (A < INV_1 AND icmp A < INV_2) into (A <
2417+
/// min(INV_1, INV_2)), if INV_1 and INV_2 are both loop invariants and their
2418+
/// minimun can be computed outside of loop, and X is not a loop-invariant.
24212419
static bool hoistMinMax(Instruction &I, Loop &L, ICFLoopSafetyInfo &SafetyInfo,
24222420
MemorySSAUpdater &MSSAU) {
24232421
bool Inverse = false;

0 commit comments

Comments
 (0)