[PATCH] D75438: [X86] Reduce the number of emitted fragments due to branch align
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 21:15:29 PST 2020
skan marked an inline comment as done.
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:434
+ if (PendingBoundaryAlign &&
+ OS.getCurrentFragment()->getPrevNode() == PendingBoundaryAlign)
// Macro fusion actually happens and there is no other fragment inserted
----------------
reames wrote:
> Does this need to be a runtime check? Or can it be an assert?
>
> "assert(OS.getCurrentFragment()->getPrevNode() == PendingBoundaryAlign)" to be clear.
>
> Also, add braces. Even though there's a single statement the block comment deserves clear demarcation.
yes, we need to check it at runtime. An AlignFragment might be inserted after previous instruction(see the comment below), we need to insert a new BoundaryAlign before the JCC if there is a AlignFragment between the fusible pair.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75438/new/
https://reviews.llvm.org/D75438
More information about the llvm-commits
mailing list