diff options
| author | Eric Christopher <echristo@apple.com> | 2012-03-20 01:07:58 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2012-03-20 01:07:58 +0000 |
| commit | 60e01c560a2234bea7e7156c5a972672f43033cf (patch) | |
| tree | 76c2f916ec0473b24b370a9c6153fcf9cc83f104 /llvm/lib/CodeGen | |
| parent | 997aaa92378d2d5ea69a8a614c66614032d7b78a (diff) | |
| download | bcm5719-llvm-60e01c560a2234bea7e7156c5a972672f43033cf.tar.gz bcm5719-llvm-60e01c560a2234bea7e7156c5a972672f43033cf.zip | |
Do everything up to generating code to try to get a register for
a variable. The previous code would break the debug info changing
code invariant. This will regress debug info for arguments where
we elide the alloca created.
Fixes rdar://11066468
llvm-svn: 153074
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index c5efde37462..9f4a44a4927 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -590,7 +590,12 @@ bool FastISel::SelectCall(const User *I) { Reg = TRI.getFrameRegister(*FuncInfo.MF); } if (!Reg) - Reg = getRegForValue(Address); + Reg = lookUpRegForValue(Address); + + if (!Reg && isa<Instruction>(Address) && + (!isa<AllocaInst>(Address) || + !FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(Address)))) + Reg = FuncInfo.InitializeRegForValue(Address); if (Reg) BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, |

