diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-04-29 06:33:38 +0000 | 
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-29 06:33:38 +0000 | 
| commit | 923679f92926c0e949b710bcf30954387ac6b9fa (patch) | |
| tree | 45c1f97f6018d4c43c4591b98f5c013e4e2f455c /llvm/lib | |
| parent | 9225b02096c62b9646cb47ed17aebab3a20f8e9f (diff) | |
| download | bcm5719-llvm-923679f92926c0e949b710bcf30954387ac6b9fa.tar.gz bcm5719-llvm-923679f92926c0e949b710bcf30954387ac6b9fa.zip  | |
Re-enable 102565 with fixes.
llvm-svn: 102602
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 16 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 | 
2 files changed, 8 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index fe52040d45c..9001894d6fa 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -3707,15 +3707,17 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI,      }    } -  if (!Reg) -    Reg = FuncInfo.ValueMap[V]; -  if (!Reg) -    return false; +  if (!Reg) { +    DenseMap<const Value *, unsigned>::iterator VMI = FuncInfo.ValueMap.find(V); +    if (VMI == FuncInfo.ValueMap.end()) +      return false; +    Reg = VMI->second; +  }    const TargetInstrInfo *TII = DAG.getTarget().getInstrInfo();    MachineInstrBuilder MIB = BuildMI(MF, getCurDebugLoc(),                                      TII->get(TargetOpcode::DBG_VALUE)) -    .addReg(Reg).addImm(Offset).addMetadata(Variable); +    .addReg(Reg, RegState::Debug).addImm(Offset).addMetadata(Variable);    FuncInfo.ArgDbgValues.push_back(&*MIB);    return true;  } @@ -3896,15 +3898,11 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {      } else {        SDValue &N = NodeMap[V];        if (N.getNode()) { -#if 0          if (!EmitFuncArgumentDbgValue(DI, V, Variable, Offset, N)) { -#endif            SDV = DAG.getDbgValue(Variable, N.getNode(),                                  N.getResNo(), Offset, dl, SDNodeOrder);            DAG.AddDbgValue(SDV, N.getNode(), false); -#if 0          } -#endif        } else {          // We may expand this to cover more cases.  One case where we have no          // data available is an unreferenced parameter; we need this fallback. diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7c4ad6d03d5..b8ebe8afff4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -212,15 +212,12 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {    SelectAllBasicBlocks(Fn); -  FuncInfo->clear(); - -  // If the first basic block in the function has live ins that need to be + // If the first basic block in the function has live ins that need to be    // copied into vregs, emit the copies into the top of the block before    // emitting the code for the block.    MachineBasicBlock *EntryMBB = MF->begin();    RegInfo->EmitLiveInCopies(EntryMBB, TRI, TII); -#if 0    // Insert DBG_VALUE instructions for function arguments to the entry block.    for (unsigned i = 0, e = FuncInfo->ArgDbgValues.size(); i != e; ++i) {      MachineInstr *MI = FuncInfo->ArgDbgValues[e-i-1]; @@ -237,7 +234,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {    // Release function-specific state. SDB and CurDAG are already cleared    // at this point.    FuncInfo->clear(); -#endif    return true;  }  | 

