[PATCH] D34028: [Bitcode] Add thumb-mode to target-features in metadata loader.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 04:48:03 PDT 2017


fhahn created this revision.
Herald added subscribers: javed.absar, mehdi_amini, aemerson.

The thumb-mode target feature is used to control mixed ARM/Thumb
code generation in a single compilation unit. https://reviews.llvm.org/D33287 adds thumb-mode to
target-features for arm/thumb triples.

David Blaikie also suggested that we might be able to get rid of the
thumb triples altogether after the bitcode reader. Currently there are
about 30 checks that use Triple::thumb/thumbeb in the LLVM source code.

I had a look at most of them and unfortunately it seems like replacing
most of them with ARMSubtarget::isThumb will be quite hard, because
either no TargetMachine instance (e.g. the uses in
lib/Transforms/IPO/LowerTypeTests.cpp) or no function is available (e.g.
when initializing global sections in lib/MC/MCObjectFileInfo.cpp or
printing model-level inline asm lib/Target/ARM/ARMAsmPrinter.cpp).

I would appreciate any thoughts on Triple::thumb uses. At the moment it
seems to me replacing the remaining uses requires quite a bit of work
for relatively little benefits.


https://reviews.llvm.org/D34028

Files:
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Reader/MetadataLoader.cpp
  lib/Bitcode/Reader/MetadataLoader.h
  test/Bitcode/thumb-mode-upgrade-arm.ll
  test/Bitcode/thumb-mode-upgrade-arm.ll.bc
  test/Bitcode/thumb-mode-upgrade-thumb.ll
  test/Bitcode/thumb-mode-upgrade-thumb.ll.bc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34028.101894.patch
Type: text/x-patch
Size: 3678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170608/00ef24de/attachment.bin>


More information about the llvm-commits mailing list