diff options
author | Devang Patel <dpatel@apple.com> | 2010-11-02 17:19:03 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-11-02 17:19:03 +0000 |
commit | 8bc9ef77b7e9910fbeb40725dfa49d793158db51 (patch) | |
tree | 1a97becf0289e812418028945e36d8e2f3c0b487 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | a90b305af910f0cbfa0c6934a2034a2a0444e715 (diff) | |
download | external_llvm-8bc9ef77b7e9910fbeb40725dfa49d793158db51.zip external_llvm-8bc9ef77b7e9910fbeb40725dfa49d793158db51.tar.gz external_llvm-8bc9ef77b7e9910fbeb40725dfa49d793158db51.tar.bz2 |
If value map does not have register for an argument then try to find frame index before giving up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index eb149e1..667cac7 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -3980,12 +3980,11 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable, if (!Reg) { // Check if ValueMap has reg number. DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V); - if (VMI == FuncInfo.ValueMap.end()) - return false; - Reg = VMI->second; + if (VMI != FuncInfo.ValueMap.end()) + Reg = VMI->second; } - - if (!Reg && N.getNode()) + + if (!Reg && N.getNode()) { // Check if frame index is available. if (LoadSDNode *LNode = dyn_cast<LoadSDNode>(N.getNode())) if (FrameIndexSDNode *FINode = @@ -3993,6 +3992,10 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable, Reg = TRI->getFrameRegister(MF); Offset = FINode->getIndex(); } + } + + if (!Reg) + return false; MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(), TII->get(TargetOpcode::DBG_VALUE)) |