diff options
author | Devang Patel <dpatel@apple.com> | 2010-09-10 20:32:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-09-10 20:32:09 +0000 |
commit | 4bafda9618f9dfa9edc8da08bb3001ef2d1a9b68 (patch) | |
tree | c5f689fc43cb810b496b0b3816fd06a683fc687b /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 1ec2ee65267d69ae9f0451d60e02d357877371ff (diff) |
Add DEBUG message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index a4eed71e65..db58e23d07 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -473,10 +473,18 @@ bool FastISel::SelectCall(const User *I) { return true; const AllocaInst *AI = dyn_cast<AllocaInst>(Address); // Don't handle byval struct arguments or VLAs, for example. - if (!AI) + if (!AI) { // Building the map above is target independent. Generating DBG_VALUE // inline is target dependent; do this now. - (void)TargetSelectInstruction(cast<Instruction>(I)); + DenseMap<const Value *, unsigned>::iterator It = + FuncInfo.ValueMap.find(Address); + if (0 && It != FuncInfo.ValueMap.end()) { + BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, + TII.get(TargetOpcode::DBG_VALUE)) + .addReg(It->second, RegState::Debug).addImm(0).addMetadata(DI->getVariable()); + } else + (void)TargetSelectInstruction(cast<Instruction>(I)); + } return true; } case Intrinsic::dbg_value: { |