mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-06 20:37:05 +00:00
Detect undef value early and save unnecessary NodeMap query.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
24bde5bce1
commit
3f74a116c8
@ -4074,6 +4074,17 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
// absolute, but not relative, values are different depending on whether
|
||||
// debug info exists.
|
||||
++SDNodeOrder;
|
||||
|
||||
// Check if address has undef value.
|
||||
if (isa<UndefValue>(Address) ||
|
||||
(Address->use_empty() && !isa<Argument>(Address))) {
|
||||
SDDbgValue*SDV =
|
||||
DAG.getDbgValue(Variable, UndefValue::get(Address->getType()),
|
||||
0, dl, SDNodeOrder);
|
||||
DAG.AddDbgValue(SDV, 0, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDValue &N = NodeMap[Address];
|
||||
if (!N.getNode() && isa<Argument>(Address))
|
||||
// Check unused arguments map.
|
||||
|
Loading…
x
Reference in New Issue
Block a user