[all-commits] [llvm/llvm-project] 39c8cf: MC: Optimize getOrCreateDataFragment

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Jul 19 16:55:52 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39c8cfb70d203439e3296dfdfe3d41f1cb2ec551
      https://github.com/llvm/llvm-project/commit/39c8cfb70d203439e3296dfdfe3d41f1cb2ec551
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-07-19 (Sat, 19 Jul 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCObjectStreamer.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/lib/MC/MCCodeView.cpp
    M llvm/lib/MC/MCObjectStreamer.cpp
    M llvm/lib/MC/MCStreamer.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp

  Log Message:
  -----------
  MC: Optimize getOrCreateDataFragment

... by eagerly allocating an empty fragment when adding a fragment
with a variable-size tail.

X86AsmBackend, The JCC erratum mitigation and x86-pad-for-align set a
flag for FT_Relaxable, which needs to be moved to emitInstructionBegin.
```
  if (CF->getKind() == MCFragment::FT_Relaxable)
    CF->setAllowAutoPadding(canPadInst(Inst, OS));
```

Follow-up to #148544



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list