mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 12:49:50 +00:00
Revert "WIP: [DAGCombiner] Assert that debug info is preserved"
This reverts commit r324648. It was committed accidentally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324650 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f1e6f8445
commit
5309a7b3dd
@ -1026,39 +1026,12 @@ SDValue DAGCombiner::CombineTo(SDNode *N, const SDValue *To, unsigned NumTo,
|
|||||||
|
|
||||||
WorklistRemover DeadNodes(*this);
|
WorklistRemover DeadNodes(*this);
|
||||||
DAG.ReplaceAllUsesWith(N, To);
|
DAG.ReplaceAllUsesWith(N, To);
|
||||||
ArrayRef<const SDValue> ToValues{To, NumTo};
|
|
||||||
#ifndef NDEBUG
|
|
||||||
// If the RAUW'd node has a debug value, at least one of its replacements
|
|
||||||
// should have one as well.
|
|
||||||
if (N->getHasDebugValue())
|
|
||||||
assert(any_of(ToValues,
|
|
||||||
[](const SDValue &ToVal) {
|
|
||||||
if (SDNode *ToN = ToVal.getNode())
|
|
||||||
return ToN->getHasDebugValue();
|
|
||||||
return false;
|
|
||||||
}) &&
|
|
||||||
"Dropped debug value");
|
|
||||||
|
|
||||||
// If the RAUW'd node has a debug loc, at least one of its replacements
|
|
||||||
// should have a loc as well, unless they've *all* got merged locations.
|
|
||||||
if (N->getDebugLoc())
|
|
||||||
assert(any_of(ToValues,
|
|
||||||
[](const SDValue &ToVal) -> bool {
|
|
||||||
return ToVal.getDebugLoc();
|
|
||||||
}) ||
|
|
||||||
all_of(ToValues,
|
|
||||||
[](const SDValue &ToVal) {
|
|
||||||
return !ToVal.hasOneUse() && !ToVal.use_empty();
|
|
||||||
}) &&
|
|
||||||
"Dropped debug loc");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (AddTo) {
|
if (AddTo) {
|
||||||
// Push the new nodes and any users onto the worklist
|
// Push the new nodes and any users onto the worklist
|
||||||
for (const SDValue &ToVal : ToValues) {
|
for (unsigned i = 0, e = NumTo; i != e; ++i) {
|
||||||
if (SDNode *ToN = ToVal.getNode()) {
|
if (To[i].getNode()) {
|
||||||
AddToWorklist(ToN);
|
AddToWorklist(To[i].getNode());
|
||||||
AddUsersToWorklist(ToN);
|
AddUsersToWorklist(To[i].getNode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user