1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/include/llvm/CodeGen
Craig Topper ca39e09647 [TargetLowering][AMDGPU] Remove the SimplifyDemandedBits function that takes a User and OpIdx. Stop using it in AMDGPU target for simplifyI24.
As we saw in D56057 when we tried to use this function on X86, it's unsafe. It allows the operand node to have multiple users, but doesn't prevent recursing past the first node when it does have multiple users. This can cause other simplifications earlier in the graph without regard to what bits are needed by the other users of the first node. Ideally all we should do to the first node if it has multiple uses is bypass it when its not needed by the user we started from. Doing any other transformation that SimplifyDemandedBits can do like turning ZEXT/SEXT into AEXT would result in an increase in instructions.

Fortunately, we already have a function that can do just that, GetDemandedBits. It will only make transformations that involve bypassing a node.

This patch changes AMDGPU's simplifyI24, to use a combination of GetDemandedBits to handle the multiple use simplifications. And then uses the regular SimplifyDemandedBits on each operand to handle simplifications allowed when the operand only has a single use. Unfortunately, GetDemandedBits simplifies constants more aggressively than SimplifyDemandedBits. This caused the -7 constant in the changed test to be simplified to remove the upper bits. I had to modify computeKnownBits to account for this by ignoring the upper 8 bits of the input.

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

llvm-svn: 350560
2019-01-07 19:30:43 +00:00
..
GlobalISel Add vtable anchor to classes. 2018-12-29 02:02:13 +00:00
MIRParser
PBQP
AccelTable.h DwarfDebug: Reduce duplication in addAccel*** methods 2018-07-20 15:24:13 +00:00
Analysis.h
AsmPrinter.h [DebugInfo] Make AsmPrinter struct HandlerInfo and Handlers protected 2018-12-19 04:07:47 +00:00
AsmPrinterHandler.h [DebugInfo] Move several private headers to include directory 2018-12-18 23:10:17 +00:00
AtomicExpandUtils.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
BasicTTIImpl.h [CostModel][X86] Don't count 2 shuffles on the last level of a pairwise arithmetic or min/max reduction 2018-12-13 19:08:10 +00:00
BuiltinGCs.h [GC] Rename a header for consistency 2018-11-10 16:08:10 +00:00
CalcSpillWeights.h
CallingConvLower.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
CommandFlags.inc [AArch64] Add Tiny Code Model for AArch64 2018-08-22 11:31:39 +00:00
CostTable.h
DAGCombine.h
DbgEntityHistoryCalculator.h [DebugInfo] Move several private headers to include directory 2018-12-18 23:10:17 +00:00
DebugHandlerBase.h [DebugInfo] Move several private headers to include directory 2018-12-18 23:10:17 +00:00
DFAPacketizer.h
DIE.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
DIEValue.def
DwarfStringPoolEntry.h [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
EdgeBundles.h
ExecutionDomainFix.h
ExpandReductions.h
FastISel.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
FaultMaps.h
FunctionLoweringInfo.h AMDGPU: Fix various issues around the VirtReg2Value mapping 2018-11-30 22:55:29 +00:00
GCMetadata.h [GC][NFC] Simplify code now that we only have one safepoint kind 2018-11-12 22:03:53 +00:00
GCMetadataPrinter.h [CodeGen] Support custom format of stack maps 2018-11-26 18:43:48 +00:00
GCStrategy.h [GC][NFC] Simplify code now that we only have one safepoint kind 2018-11-12 22:03:53 +00:00
IntrinsicLowering.h
ISDOpcodes.h [Intrinsic] Signed Fixed Point Multiplication Intrinsic 2018-12-12 06:29:14 +00:00
LatencyPriorityQueue.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
LazyMachineBlockFrequencyInfo.h
LexicalScopes.h
LinkAllAsmWriterComponents.h [GC] Rename a header for consistency 2018-11-10 16:08:10 +00:00
LinkAllCodegenComponents.h [GC] Rename a header for consistency 2018-11-10 16:08:10 +00:00
LiveInterval.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
LiveIntervals.h Fix typos in comment 2018-10-30 01:11:52 +00:00
LiveIntervalUnion.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
LivePhysRegs.h LivePhysRegs/IfConversion: Change some types from unsigned to MCPhysReg; NFC 2018-11-06 19:00:11 +00:00
LiveRangeEdit.h
LiveRegMatrix.h
LiveRegUnits.h LivePhysRegs/IfConversion: Change some types from unsigned to MCPhysReg; NFC 2018-11-06 19:00:11 +00:00
LiveStacks.h
LiveVariables.h
LoopTraversal.h
LowLevelType.h
MachineBasicBlock.h [WebAssembly] Add isEHScopeReturn instruction property 2018-08-21 19:44:11 +00:00
MachineBlockFrequencyInfo.h
MachineBranchProbabilityInfo.h
MachineCombinerPattern.h
MachineConstantPool.h
MachineDominanceFrontier.h [WebAssembly] Add WebAssemblyException information analysis 2018-06-25 01:20:21 +00:00
MachineDominators.h
MachineFrameInfo.h [Power9] Allow gpr callee saved spills in prologue to vectors registers 2018-11-09 16:36:24 +00:00
MachineFunction.h MachineFunction: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:14 +00:00
MachineFunctionPass.h
MachineInstr.h Fix documentation of MachineInstr::getNumOperands 2018-10-12 12:26:37 +00:00
MachineInstrBuilder.h [MI] Change the array of MachineMemOperand pointers to be 2018-08-16 21:30:05 +00:00
MachineInstrBundle.h
MachineInstrBundleIterator.h
MachineJumpTableInfo.h
MachineLoopInfo.h
MachineMemOperand.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
MachineModuleInfo.h MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
MachineModuleInfoImpls.h [MinGW] [X86] Add stubs for references to data variables that might end up imported from a dll 2018-08-29 17:28:34 +00:00
MachineOperand.h CodeGen: Cleanup regmask construction; NFC 2018-07-26 00:27:47 +00:00
MachineOptimizationRemarkEmitter.h
MachineOutliner.h [MachineOutliner][NFC] Candidates don't need to be shared_ptrs anymore 2018-12-05 23:24:22 +00:00
MachinePassRegistry.h Type safe version of MachinePassRegistry 2018-11-09 17:19:45 +00:00
MachinePostDominators.h
MachineRegionInfo.h
MachineRegisterInfo.h [MachineCSE][GlobalISel] Making sure MachineCSE works mid-GlobalISel (again) 2018-10-20 00:06:15 +00:00
MachineScheduler.h Bias physical register immediate assignments 2018-11-14 21:11:53 +00:00
MachineSSAUpdater.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
MachineTraceMetrics.h
MachORelocation.h Remove trailing space 2018-07-30 19:41:25 +00:00
MacroFusion.h
MIRPrinter.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
MIRYamlMapping.h [MIR] Add hasWinCFI field 2018-10-24 21:07:38 +00:00
ParallelCG.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
Passes.h Rewrite objc intrinsics to runtime methods in PreISelIntrinsicLowering instead of SDAG. 2018-12-18 22:20:03 +00:00
PBQPRAConstraint.h
PreISelIntrinsicLowering.h Rewrite objc intrinsics to runtime methods in PreISelIntrinsicLowering instead of SDAG. 2018-12-18 22:20:03 +00:00
PseudoSourceValue.h [PSV] Update API to be able to use TargetCustom without UB. 2018-08-20 19:23:45 +00:00
ReachingDefAnalysis.h
RegAllocPBQP.h
RegAllocRegistry.h Type safe version of MachinePassRegistry 2018-11-09 17:19:45 +00:00
RegisterClassInfo.h
RegisterPressure.h
RegisterScavenging.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
RegisterUsageInfo.h MachineFunction: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:14 +00:00
ResourcePriorityQueue.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
RuntimeLibcalls.h Put "built-in" function definitions in global Used list, for LTO. (fix bug 34169) 2018-07-24 19:34:37 +00:00
ScheduleDAG.h MachineFunction: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:14 +00:00
ScheduleDAGInstrs.h ScheduleDAG: Cleanup dumping code; NFC 2018-09-19 00:23:35 +00:00
ScheduleDAGMutation.h
ScheduleDFS.h
ScheduleHazardRecognizer.h
SchedulerRegistry.h Type safe version of MachinePassRegistry 2018-11-09 17:19:45 +00:00
ScoreboardHazardRecognizer.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
SDNodeProperties.td
SelectionDAG.h Add vtable anchor to classes. 2018-12-29 02:02:13 +00:00
SelectionDAGAddressAnalysis.h [DAG] Add const variants for BaseIndexOffset functions. 2018-10-30 18:26:43 +00:00
SelectionDAGISel.h TableGen/ISel: Allow PatFrag predicate code to access captured operands 2018-11-30 14:15:13 +00:00
SelectionDAGNodes.h [SelectionDAG] Optional handling of UNDEF elements in matchBinaryPredicate (part 1 of 2) 2018-12-19 14:09:09 +00:00
SelectionDAGTargetInfo.h
SlotIndexes.h Fix typos in assert message 2018-10-19 20:17:05 +00:00
StackMaps.h [CodeGen] Expose some data types and accessors from StackMaps 2018-11-16 16:48:49 +00:00
StackProtector.h CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
TailDuplicator.h
TargetCallingConv.h
TargetFrameLowering.h
TargetInstrInfo.h [CodeGen][NFC] Make TII::getMemOpBaseImmOfs return a base operand 2018-11-28 12:00:20 +00:00
TargetLowering.h [TargetLowering][AMDGPU] Remove the SimplifyDemandedBits function that takes a User and OpIdx. Stop using it in AMDGPU target for simplifyI24. 2019-01-07 19:30:43 +00:00
TargetLoweringObjectFileImpl.h Implement -frecord-command-line (-frecord-gcc-switches) 2018-12-14 15:38:15 +00:00
TargetOpcodes.h
TargetPassConfig.h MIR: Add method to stop after specific runs of passes 2018-12-04 17:45:12 +00:00
TargetRegisterInfo.h [TargetRegisterInfo] Remove temporary hook enableMultipleCopyHints() 2018-10-05 14:23:11 +00:00
TargetSchedule.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
TargetSubtargetInfo.h [tblgen][llvm-mca] Add the ability to describe move elimination candidates via tablegen. 2018-10-12 11:23:04 +00:00
UnreachableBlockElim.h
ValueTypes.h
ValueTypes.td NFC Fix a comment in ValueTypes.td 2018-06-07 23:32:18 +00:00
VirtRegMap.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
WasmEHFuncInfo.h [WebAssembly] Add support for the event section 2018-11-14 02:46:21 +00:00
WinEHFuncInfo.h