[llvm] [TableGen] Add `PreferSmallerInstructions` for Targets. (PR #83587)

Alfie Richards via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 04:10:37 PDT 2024


AlfieRichardsArm wrote:

https://github.com/llvm/llvm-project/pull/83436#discussion_r1524596531
> I would add to this comment
> 
> (a) that this flag is useful for Arm (so that people who only know other architectures have an idea why it needs to be here in the first place)

Adding this now

> (b) what the preference order is if this flag is false. (Surely the only reason this flag exists, instead of just being always-true, is so that somebody can deliberately set it to false, in which case they have some reason to want a different preference order, and will need to know how to get it.)

The main reason for this flag is this change breaks a lot of assumptions that other backends (MIPS primarily) rely upon (see all the assumptions it broke in the ARM backend to get an idea (: ). I will add a comment to explain the default ordering and the change this makes.

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


More information about the llvm-commits mailing list