[llvm] [llvm-exegesis] Align loop MBB in loop repetitor (PR #77264)

Clement Courbet via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 7 23:03:22 PST 2024


================
@@ -74,6 +74,10 @@ class LoopSnippetRepetitor : public SnippetRepetitor {
       auto Loop = Filler.addBasicBlock();
       auto Exit = Filler.addBasicBlock();
 
+      // Align the loop machine basic block to a sixteen byte boundary
+      // so that instruction fetch on modern x86 platforms works optimally.
+      Loop.MBB->setAlignment(Align(16));
----------------
legrosbuffle wrote:

This should probably be using `TargetLowering::getPrefLoopAlignment`

https://github.com/llvm/llvm-project/pull/77264


More information about the llvm-commits mailing list