llvm-project/llvm/lib/CodeGen/SelectionDAG
David Stuttard 31f482c26b [AMDGPU] Fix issues for backend divergence tracking
Summary:
A change to use divergence analysis in the AMDGPU backend was getting formal
arguments incorrect (not tagged as divergent) unless they were VGPR0, VGPR1 or
VGPR2

For graphics shaders it is possible to have more than these passed in as VGPR

Modified the checking code to check for any VGPR registers passed in as formal
arguments.

Also, some intrinsics that are sources of divergence may have been lowered
during instruction selection and are missed on subsequent calls to
isSDNodeSourceOfDivergence - added the relevant AMDGPUISD checks as well.

Finally, the FunctionLoweringInfo tracks virtual registers that are live across
basic block boundaries. This is used to check for divergence of CopyFromRegister
registers using the DivergenceAnalysis analysis. For multiple blocks the lazily
evaluated inverted map VirtReg2Value was not cleared when the ValueMap map was.

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits

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

Change-Id: I112f3bd6dfe0f62e63ce9b43b893982778e4bee3
llvm-svn: 330257
2018-04-18 13:53:31 +00:00
..
CMakeLists.txt Remove trailing whitespace to trigger re-cmaking 2017-10-02 21:54:38 +00:00
DAGCombiner.cpp [DAGCombiner] Fix for oss-fuzz bug 2018-04-17 07:22:34 +00:00
FastISel.cpp [XRay] Typed event logging intrinsic 2018-04-17 21:30:29 +00:00
FunctionLoweringInfo.cpp [AMDGPU] Fix issues for backend divergence tracking 2018-04-18 13:53:31 +00:00
InstrEmitter.cpp [SelectionDAG] Provide adequate register class for RegisterSDNode 2018-02-09 13:55:25 +00:00
InstrEmitter.h
LLVMBuild.txt
LegalizeDAG.cpp [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
LegalizeFloatTypes.cpp [PowerPC][LegalizeFloatTypes] Move the PPC hacks for (i32 fp_to_sint/fp_to_uint (ppcf128 X)) out of LegalizeFloatTypes and into PPC specific code 2018-03-20 18:49:28 +00:00
LegalizeIntegerTypes.cpp [LegalizeTypes] Remove unnecessary type action check on the type of operand 0 when promoting shift result type. NFC 2018-04-12 06:51:58 +00:00
LegalizeTypes.cpp Remap values in PromotedFloats 2018-03-27 17:42:36 +00:00
LegalizeTypes.h [SelectionDAG] Don't promote mask operand when widening mstore and mscatter. 2017-12-05 23:08:30 +00:00
LegalizeTypesGeneric.cpp [SelectionDAG] Replace a std::vector<SDValue> with a SmallVector. 2018-01-26 07:15:22 +00:00
LegalizeVectorOps.cpp [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
LegalizeVectorTypes.cpp [LegalizeTypes] In SplitVecOp_TruncateHelper, use GetSplitVector on the input instead of creating new extract_subvectors. 2018-03-13 01:17:40 +00:00
ResourcePriorityQueue.cpp Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
SDNodeDbgValue.h Doxygenify comments. 2017-10-24 17:23:40 +00:00
ScheduleDAGFast.cpp Add DBG_VALUE support to the linear DAG scheduler 2018-03-02 22:59:51 +00:00
ScheduleDAGRRList.cpp Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
ScheduleDAGSDNodes.cpp [CodeGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 18:08:42 +00:00
ScheduleDAGSDNodes.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
ScheduleDAGVLIW.cpp [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
SelectionDAG.cpp [SelectionDAG][NFC] haveNoCommonBitsSet(): add FIXME notes 2018-04-15 18:59:38 +00:00
SelectionDAGAddressAnalysis.cpp [DAG] Teach findBaseOffset to interpret indexes of indexed memory operations 2018-01-26 16:51:27 +00:00
SelectionDAGBuilder.cpp [XRay] Typed event logging intrinsic 2018-04-17 21:30:29 +00:00
SelectionDAGBuilder.h [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
SelectionDAGDumper.cpp [CodeGen] Allow printing MachineMemOperands with less context in SDAGDumper 2018-04-12 12:59:50 +00:00
SelectionDAGISel.cpp [X86] Use APInt::isSubsetof instead of APInt::intersects to avoid a negation of an APInt value. NFC 2018-04-15 19:11:25 +00:00
SelectionDAGPrinter.cpp Remove redundant includes from lib/CodeGen. 2017-12-13 21:30:47 +00:00
SelectionDAGTargetInfo.cpp [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-13 21:15:20 +00:00
StatepointLowering.cpp Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
StatepointLowering.h [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
TargetLowering.cpp Move TargetLoweringObjectFile from CodeGen to Target to fix layering 2018-03-23 23:58:19 +00:00