1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/include/llvm/Target
Sanjay Patel 7708490317 [DAG] convert vector select-of-constants to logic/math
This goes back to a discussion about IR canonicalization. We'd like to preserve and convert
more IR to 'select' than we currently do because that's likely the best choice in IR:
http://lists.llvm.org/pipermail/llvm-dev/2016-September/105335.html
...but that's often not true for codegen, so we need to account for this pattern coming in
to the backend and transform it to better DAG ops.

Steps in this patch:

  1. Add an EVT param to the existing convertSelectOfConstantsToMath() TLI hook to more finely
     enable this transform. Other targets will probably want that anyway to distinguish scalars
     from vectors. We're using that here to exclude AVX512 targets, but it may not be necessary.

  2. Convert a vselect to ext+add. This eliminates a constant load/materialization, and the
     vector ext is often free.

Implementing a more general fold using xor+and can be a follow-up for targets that don't have
a legal vselect. It's also possible that we can remove the TLI hook for the special case fold
implemented here because we're eliminating a constant, but it needs to be tested on other
targets.

Differential Revision: https://reviews.llvm.org/D36840

llvm-svn: 311731
2017-08-24 23:24:43 +00:00
..
GlobalISel [globalisel][tablegen] Add support for importing 'imm' operands. 2017-08-08 10:44:31 +00:00
CostTable.h [modules] Add missing include. 2016-08-19 08:30:42 +00:00
GenericOpcodes.td [GISEl]: Translate phi into G_PHI 2017-08-23 20:45:48 +00:00
Target.td Revert "r306529 - [X86] Correct dwarf unwind information in function epilogue" 2017-06-29 13:58:24 +00:00
TargetCallingConv.h Elide argument copies during instruction selection 2017-03-01 21:42:00 +00:00
TargetCallingConv.td Swift Calling Convention: add swifterror attribute. 2016-04-01 21:41:15 +00:00
TargetFrameLowering.h Add "Restored" flag to CalleeSavedInfo 2017-08-10 16:17:32 +00:00
TargetInstrInfo.h TargetInstrInfo: Change duplicate() to work on bundles. 2017-08-22 23:56:30 +00:00
TargetIntrinsicInfo.h GlobalISel: support translation of intrinsic calls. 2016-07-29 22:32:36 +00:00
TargetItinerary.td Fix comment typos. NFC. 2016-11-20 13:47:59 +00:00
TargetLowering.h [DAG] convert vector select-of-constants to logic/math 2017-08-24 23:24:43 +00:00
TargetLoweringObjectFile.h IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. 2017-06-12 20:10:48 +00:00
TargetMachine.h IPRA: Allow target to enable IPRA by default 2017-08-14 19:54:47 +00:00
TargetOpcodes.def [GISEl]: Translate phi into G_PHI 2017-08-23 20:45:48 +00:00
TargetOpcodes.h [GlobalISel] Don't RegBankSelect target-specific instructions. 2016-08-02 11:41:16 +00:00
TargetOptions.h sink DebugCompressionType into MC for exposing to clang 2017-06-09 00:40:19 +00:00
TargetRegisterInfo.h [Target] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-19 22:43:19 +00:00
TargetSchedule.td Fix comment typos. 2017-05-08 15:33:08 +00:00
TargetSelectionDAG.td [AArch64] LSE Atomics reorg - part 1 2017-08-05 04:30:55 +00:00
TargetSubtargetInfo.h [Target] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-19 22:43:19 +00:00