diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-09-18 22:08:59 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-09-18 22:08:59 +0000 |
commit | 0a4371a2073d8841768cf3e8cf65601a8d7cc4fc (patch) | |
tree | eed35444b6249b58112877ed7f057dae4120ac6f /lib | |
parent | 51279d45f787758acca1a885f9cb979c5b0033cc (diff) | |
download | external_llvm-0a4371a2073d8841768cf3e8cf65601a8d7cc4fc.tar.gz external_llvm-0a4371a2073d8841768cf3e8cf65601a8d7cc4fc.tar.bz2 external_llvm-0a4371a2073d8841768cf3e8cf65601a8d7cc4fc.zip |
Debug info: Get rid of the VLA indirection hack in FastISel.
Use the DIVariable::isIndirect() flag set by the frontend instead of
guessing whether to set the machine location's indirection bit.
Paired commit with CFE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index b25e031783..5fef4be5de 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -638,29 +638,24 @@ bool FastISel::SelectCall(const User *I) { (!isa<AllocaInst>(Address) || !FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(Address)))) Op = MachineOperand::CreateReg(FuncInfo.InitializeRegForValue(Address), - false); + false); - if (Op) + if (Op) { if (Op->isReg()) { - // Set the indirect flag if the type and the DIVariable's - // indirect field are in disagreement: Indirectly-addressed - // variables that are nonpointer types should be marked as - // indirect, and VLAs should be marked as indirect eventhough - // they are a pointer type. - bool IsIndirect = DI->getAddress()->getType()->isPointerTy() - ^ DIVar.isIndirect(); Op->setIsDebug(true); BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::DBG_VALUE), - IsIndirect, Op->getReg(), Offset, DI->getVariable()); - } else - BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, - TII.get(TargetOpcode::DBG_VALUE)).addOperand(*Op).addImm(0) - .addMetadata(DI->getVariable()); - else + false, Op->getReg(), 0, DI->getVariable()); + } else + BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, + TII.get(TargetOpcode::DBG_VALUE)) + .addOperand(*Op).addImm(0) + .addMetadata(DI->getVariable()); + } else { // We can't yet handle anything else here because it would require // generating code, thus altering codegen because of debug info. DEBUG(dbgs() << "Dropping debug info for " << *DI << "\n"); + } return true; } case Intrinsic::dbg_value: { |