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
This commit is contained in:
Eric Christopher 2012-03-20 01:07:58 +00:00
parent 0a61365e70
commit fea2d0f83a

View File

@ -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,