[PATCH] D44928: [MC] Pass MCSubtargetInfo through to fixupNeedsRelaxation

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 12:15:11 PDT 2018


efriedma added a comment.

> Rather than adding STI to the Data Fragments with relaxations I propose to pass a pointer to STI that will be null for Data Fragments.

This seems fine.

> I think that an EmitAssemblerFlag that is used in the same way as the flag to switch from Thumb to Arm can toggle the support for the Architectural NOP without having to do large amounts of source code changes, most of them outside the ARM backend.

This is really hacky... the fragments in question should really have an STI instead.  Plus there are actually separate features; whether NOP is supported in ARM mode (which is what hasNOP queries), and whether NOP is supported in Thumb mode (i.e. whether Thumb2 is supported).  Plus other architectures have similar problems (e.g. x86 changes the generated NOPs based on the target).  If you're not going to fix it properly, please just leave it as-is for now, with a FIXME.


https://reviews.llvm.org/D44928





More information about the llvm-commits mailing list