aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips/MipsISelLowering.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-11-09 02:38:51 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-11-09 02:38:51 +0000
commit95830221bd4877816adc6707eb34ca68c5a515d2 (patch)
tree3a06f1281d43cd68c7baf0878c0aef34ee3c3e4a /lib/Target/Mips/MipsISelLowering.cpp
parentceb0d9c085492151f8e4538119bf3de29ff935c0 (diff)
downloadexternal_llvm-95830221bd4877816adc6707eb34ca68c5a515d2.zip
external_llvm-95830221bd4877816adc6707eb34ca68c5a515d2.tar.gz
external_llvm-95830221bd4877816adc6707eb34ca68c5a515d2.tar.bz2
[mips] Make sure there is a chain edge dependency between loads that read
formal arguments on the stack and stores created afterwards. We need this to ensure tail call optimized function calls do not write over the argument area of the stack before it is read out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsISelLowering.cpp')
-rw-r--r--lib/Target/Mips/MipsISelLowering.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp
index 7a0e666..5f82b4e 100644
--- a/lib/Target/Mips/MipsISelLowering.cpp
+++ b/lib/Target/Mips/MipsISelLowering.cpp
@@ -2650,9 +2650,11 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain,
// Create load nodes to retrieve arguments from the stack
SDValue FIN = DAG.getFrameIndex(FI, getPointerTy());
- InVals.push_back(DAG.getLoad(ValVT, DL, Chain, FIN,
- MachinePointerInfo::getFixedStack(FI),
- false, false, false, 0));
+ SDValue Load = DAG.getLoad(ValVT, DL, Chain, FIN,
+ MachinePointerInfo::getFixedStack(FI),
+ false, false, false, 0);
+ InVals.push_back(Load);
+ OutChains.push_back(Load.getValue(1));
}
}