mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
Use getValue() for PHINodes when direct NodeMap access does not work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d2552135d
commit
d47f3c803f
@ -3900,6 +3900,8 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
SDV = DAG.getDbgValue(Variable, V, Offset, dl, SDNodeOrder);
|
||||
DAG.AddDbgValue(SDV, 0, false);
|
||||
} else {
|
||||
bool createUndef = false;
|
||||
// FIXME : Why not use getValue() directly ?
|
||||
SDValue &N = NodeMap[V];
|
||||
if (N.getNode()) {
|
||||
if (!EmitFuncArgumentDbgValue(DI, V, Variable, Offset, N)) {
|
||||
@ -3907,7 +3909,19 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
N.getResNo(), Offset, dl, SDNodeOrder);
|
||||
DAG.AddDbgValue(SDV, N.getNode(), false);
|
||||
}
|
||||
} else {
|
||||
} else if (isa<PHINode>(V) && !V->use_empty()) {
|
||||
SDValue N = getValue(V);
|
||||
if (N.getNode()) {
|
||||
if (!EmitFuncArgumentDbgValue(DI, V, Variable, Offset, N)) {
|
||||
SDV = DAG.getDbgValue(Variable, N.getNode(),
|
||||
N.getResNo(), Offset, dl, SDNodeOrder);
|
||||
DAG.AddDbgValue(SDV, N.getNode(), false);
|
||||
}
|
||||
} else
|
||||
createUndef = true;
|
||||
} else
|
||||
createUndef = true;
|
||||
if (createUndef) {
|
||||
// We may expand this to cover more cases. One case where we have no
|
||||
// data available is an unreferenced parameter; we need this fallback.
|
||||
SDV = DAG.getDbgValue(Variable, UndefValue::get(V->getType()),
|
||||
|
Loading…
Reference in New Issue
Block a user