[llvm] [llvm-exegesis] Align loop MBB in loop repetitor (PR #77264)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 00:17:40 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));
----------------
boomanaiden154 wrote:
Thanks for the suggestion! That's definitely a lot cleaner. Currently X86 segfaults on this without passing a `MachineLoop` pointer which would be pretty difficult to get here. I've opened #77283 to fix the API issue. I'll land this patch after that one lands.
https://github.com/llvm/llvm-project/pull/77264
More information about the llvm-commits
mailing list