aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-16 17:54:27 +0000
committerDan Gohman <gohman@apple.com>2010-07-16 17:54:27 +0000
commit9c3d5e41b94ff51dc78ae42397151b52d9c2b546 (patch)
treedc52f63c85eda229440c7052f78a452e56635806 /lib/CodeGen/SelectionDAG/FastISel.cpp
parent468a2a44e2a2efb5a2cd441205fc78b80edd3844 (diff)
Revert r108369, sorting llvm.dbg.declare information by source position,
since it doesn't work for front-ends which don't emit column information (which includes llvm-gcc in its present configuration), and doesn't work for clang for K&R style variables where the variables are declared in a different order from the parameter list. Instead, make a separate pass through the instructions to collect the llvm.dbg.declare instructions in order. This ensures that the debug information for variables is emitted in this order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index decaa769e9..cff7ace536 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -472,17 +472,7 @@ 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.
- // Note that if we have a byval struct argument, fast ISel is turned off;
- // those are handled in SelectionDAGBuilder.
- if (AI) {
- DenseMap<const AllocaInst*, int>::iterator SI =
- FuncInfo.StaticAllocaMap.find(AI);
- if (SI == FuncInfo.StaticAllocaMap.end()) break; // VLAs.
- int FI = SI->second;
- if (!DI->getDebugLoc().isUnknown())
- FuncInfo.MF->getMMI().setVariableDbgInfo(DI->getVariable(),
- FI, DI->getDebugLoc());
- } else
+ if (!AI)
// Building the map above is target independent. Generating DBG_VALUE
// inline is target dependent; do this now.
(void)TargetSelectInstruction(cast<Instruction>(I));