[PATCH] D20762: AArch64: Do not test for CPUs, use SubtargetFeatures

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 18:10:01 PDT 2016


MatzeB created this revision.
MatzeB added reviewers: t.p.northover, rengolin, jmolloy, evandro, Jiangning, picopeak.
MatzeB added subscribers: llvm-commits, anemet.
MatzeB set the repository for this revision to rL LLVM.
Herald added subscribers: mcrosier, rengolin, aemerson.

Testing for specific CPUs has a number of problems, better use subtarget
features:
- When some tweak is added for a specific CPU it is often desirable for
  the next version of that CPU as well, yet we often forget to add it.
- It is hard to keep track of checks scattered around the target code;
  Declaring all target specifics together with the CPU in the tablegen
  file is a clear representation.
- Subtarget features can be tweaked from the command line.

To discourage people from using CPU checks in the future I removed the
isCortexXX(), isCyclone(), ... functions. I added an getProcFamily()
function for exceptional circumstances but made it clear in the comment
that usage is discouraged.

Reformat feature list in AArch64.td to have 1 feature per line in
alphabetical order to simplify merging and sorting for out of tree
tweaks.

No functional change intended.

Repository:
  rL LLVM

http://reviews.llvm.org/D20762

Files:
  include/llvm/Target/Target.td
  lib/Target/AArch64/AArch64.td
  lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64InstrInfo.cpp
  lib/Target/AArch64/AArch64InstrInfo.td
  lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
  lib/Target/AArch64/AArch64Subtarget.cpp
  lib/Target/AArch64/AArch64Subtarget.h
  lib/Target/AArch64/AArch64TargetMachine.cpp
  lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  utils/TableGen/SubtargetEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20762.58874.patch
Type: text/x-patch
Size: 26435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160528/b660f507/attachment.bin>


More information about the llvm-commits mailing list