mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[LICM][NFC] Reorder checks to speed up things slightly
Side effect check is made faster than potentially heavy other checks.
This commit is contained in:
parent
747225250b
commit
4c8fb07eca
@ -497,10 +497,10 @@ bool llvm::sinkRegion(DomTreeNode *N, AliasAnalysis *AA, LoopInfo *LI,
|
||||
// operands of the instruction are loop invariant.
|
||||
//
|
||||
bool FreeInLoop = false;
|
||||
if (isNotUsedOrFreeInLoop(I, CurLoop, SafetyInfo, TTI, FreeInLoop) &&
|
||||
if (!I.mayHaveSideEffects() &&
|
||||
isNotUsedOrFreeInLoop(I, CurLoop, SafetyInfo, TTI, FreeInLoop) &&
|
||||
canSinkOrHoistInst(I, AA, DT, CurLoop, CurAST, MSSAU, true, &Flags,
|
||||
ORE) &&
|
||||
!I.mayHaveSideEffects()) {
|
||||
ORE)) {
|
||||
if (sink(I, LI, DT, CurLoop, SafetyInfo, MSSAU, ORE)) {
|
||||
if (!FreeInLoop) {
|
||||
++II;
|
||||
|
Loading…
Reference in New Issue
Block a user