mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
[DebugInfo] Debug locations for constant SD nodes
Several updates for [DebugInfo] Add debug locations to constant SD nodes (r235989). Includes: * re-enabling the change (disabled recently); * missing change for FP constants; * resetting debug location of constant node if it's used more than at one place to prevent emission of wrong locations in case of coalesced constants; * a couple of additional tests. Now all look ups in CSEMap are wrapped by additional method. Comment in D9084 suggests that debug locations aren't useful for "target constants", so there might be one more change related to this API (namely, dropping debug locations for getTarget*Constant methods). Differential Revision: http://reviews.llvm.org/D9604 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237237 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1243,6 +1243,18 @@ private:
|
||||
SDValue N1, SDValue N2,
|
||||
const SDNodeFlags *Flags = nullptr);
|
||||
|
||||
/// Look up the node specified by ID in CSEMap. If it exists, return it. If
|
||||
/// not, return the insertion token that will make insertion faster. This
|
||||
/// overload is for nodes other than Constant or ConstantFP, use the other one
|
||||
/// for those.
|
||||
SDNode *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos);
|
||||
|
||||
/// Look up the node specified by ID in CSEMap. If it exists, return it. If
|
||||
/// not, return the insertion token that will make insertion faster. Performs
|
||||
/// additional processing for constant nodes.
|
||||
SDNode *FindNodeOrInsertPos(const FoldingSetNodeID &ID, DebugLoc DL,
|
||||
void *&InsertPos);
|
||||
|
||||
/// List of non-single value types.
|
||||
FoldingSet<SDVTListNode> VTListMap;
|
||||
|
||||
|
@ -1406,11 +1406,10 @@ public:
|
||||
class ConstantSDNode : public SDNode {
|
||||
const ConstantInt *Value;
|
||||
friend class SelectionDAG;
|
||||
// XXX: DebugLoc is unused intentionally until constant coalescing is resolved
|
||||
ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val,
|
||||
DebugLoc, EVT VT)
|
||||
DebugLoc DL, EVT VT)
|
||||
: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant,
|
||||
0, DebugLoc(), getSDVTList(VT)), Value(val) {
|
||||
0, DL, getSDVTList(VT)), Value(val) {
|
||||
SubclassData |= (uint16_t)isOpaque;
|
||||
}
|
||||
public:
|
||||
@ -1435,9 +1434,9 @@ public:
|
||||
class ConstantFPSDNode : public SDNode {
|
||||
const ConstantFP *Value;
|
||||
friend class SelectionDAG;
|
||||
ConstantFPSDNode(bool isTarget, const ConstantFP *val, EVT VT)
|
||||
ConstantFPSDNode(bool isTarget, const ConstantFP *val, DebugLoc DL, EVT VT)
|
||||
: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP,
|
||||
0, DebugLoc(), getSDVTList(VT)), Value(val) {
|
||||
0, DL, getSDVTList(VT)), Value(val) {
|
||||
}
|
||||
public:
|
||||
|
||||
|
Reference in New Issue
Block a user