[PATCH] D33448: [CodeGen] Add thumb-mode to function target-features for arm/thumb triples.

Eric Christopher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 24 10:47:33 PDT 2017

echristo added a comment.

In https://reviews.llvm.org/D33448#763411, @fhahn wrote:

> In https://reviews.llvm.org/D33448#762410, @echristo wrote:
> > I probably would have added this as a feature in ARMTargetInfo similar to CRC/soft-float/etc.
> >
> > Thoughts?
> Do you mean ARMTargetMachine::getSubtargetImpl (https://github.com/llvm-mirror/llvm/blob/master/lib/Target/ARM/ARMTargetMachine.cpp#L305) ?
> It seems like that function is only used by llc (and not llvm-as for example) and at that stage it is too late to add thumb-mode, because llc operates on a single module with a single target triple.

No, I meant somewhere around here: https://github.com/llvm-mirror/clang/blob/master/lib/Basic/Targets.cpp#L5058 to define it and then in CGCall.cpp it'll get added along with the other target-features.

I think that'll enable you to handle -mthumb and -target in a fairly unified way?


More information about the cfe-commits mailing list