[llvm] MC: Store MCRelaxableFragment MCInst out-of-line (PR #147229)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 09:12:05 PDT 2025


MaskRay wrote:

> > This will allow re-encoding of Data+Relax+Data+Relax sequences as Frag+Frag.
> 
> Yes, this will significantly reduce the number of fragments on x86 due to relaxable jumps. For several other architectures, e.g. AArch64, it will probably have a slightly negative impact.

Agreed. The slightly negative impact should be offset by previous optimizations. After Data+Relax => Frag, I also plan to do pursue Data+Align => Frag (almost all text sections start with `Data,Align,Data,...`, so this will help) and all the other fragment kinds. 

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


More information about the llvm-commits mailing list