Use the subtarget on the dag to get TargetFrameLowering rather

than off the target machine.

llvm-svn: 219378
This commit is contained in:
Eric Christopher 2014-10-09 01:35:27 +00:00
parent ac33cc9ce7
commit 85de8f98a9
2 changed files with 2 additions and 2 deletions

View File

@ -1627,7 +1627,7 @@ void SelectionDAGLegalize::ExpandDYNAMIC_STACKALLOC(SDNode* Node,
Chain = SP.getValue(1);
unsigned Align = cast<ConstantSDNode>(Tmp3)->getZExtValue();
unsigned StackAlign =
TM.getSubtargetImpl()->getFrameLowering()->getStackAlignment();
DAG.getSubtarget().getFrameLowering()->getStackAlignment();
Tmp1 = DAG.getNode(ISD::SUB, dl, VT, SP, Size); // Value
if (Align > StackAlign)
Tmp1 = DAG.getNode(ISD::AND, dl, VT, Tmp1,

View File

@ -3441,7 +3441,7 @@ void SelectionDAGBuilder::visitAlloca(const AllocaInst &I) {
// the stack alignment, ignore it. If the size is greater than or equal to
// the stack alignment, we note this in the DYNAMIC_STACKALLOC node.
unsigned StackAlign =
TM.getSubtargetImpl()->getFrameLowering()->getStackAlignment();
DAG.getSubtarget().getFrameLowering()->getStackAlignment();
if (Align <= StackAlign)
Align = 0;