[llvm] [LoopRotation] Enable LoopRotation with -Oz if header folds (PR #72842)
Daniil Fukalov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 29 13:43:48 PST 2024
================
@@ -365,6 +365,65 @@ static void updateBranchWeights(BranchInst &PreHeaderBI, BranchInst &LoopBI,
}
}
+// Check if duplicating the header to the preheader will fold all duplicated
+// instructions, terminating with an unconditional jump. So No code duplication
+// would be necessary.
+static bool canRotateWithoutDuplication(Loop *L, llvm::LoopInfo *LI,
----------------
dfukalov wrote:
It seems `LI` is not used.
https://github.com/llvm/llvm-project/pull/72842
More information about the llvm-commits
mailing list