summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-20 08:56:26 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-20 08:56:26 +0000
commit76c44be14a950e0d6a01face6bf2197df5566043 (patch)
tree615cc095a84261cd64119b0f88a53ed3534e4dd5 /llvm/lib/CodeGen
parent1977d15e024acc636f97dc2461fcd3fd01ddcd8f (diff)
downloadbcm5719-llvm-76c44be14a950e0d6a01face6bf2197df5566043.tar.gz
bcm5719-llvm-76c44be14a950e0d6a01face6bf2197df5566043.zip
[stackprotector] Small Bit of computation hoisting.
llvm-svn: 188771
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/StackProtector.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp
index 2cd2219ac92..86ca53dba45 100644
--- a/llvm/lib/CodeGen/StackProtector.cpp
+++ b/llvm/lib/CodeGen/StackProtector.cpp
@@ -387,7 +387,8 @@ static bool CreatePrologue(Function *F, Module *M, ReturnInst *RI,
/// value. It calls __stack_chk_fail if they differ.
bool StackProtector::InsertStackProtectors() {
bool HasPrologue = false;
- bool SupportsSelectionDAGSP = false;
+ bool SupportsSelectionDAGSP =
+ EnableSelectionDAGSP && !TM->Options.EnableFastISel;
AllocaInst *AI = 0; // Place on stack that stores the stack guard.
Value *StackGuardVar = 0; // The stack guard variable.
@@ -398,12 +399,11 @@ bool StackProtector::InsertStackProtectors() {
if (!HasPrologue) {
HasPrologue = true;
- SupportsSelectionDAGSP = CreatePrologue(F, M, RI, TLI, Trip, AI,
- StackGuardVar);
+ SupportsSelectionDAGSP &= CreatePrologue(F, M, RI, TLI, Trip, AI,
+ StackGuardVar);
}
- if (EnableSelectionDAGSP && !TM->Options.EnableFastISel &&
- SupportsSelectionDAGSP) {
+ if (SupportsSelectionDAGSP) {
// Since we have a potential tail call, insert the special stack check
// intrinsic.
Instruction *InsertionPt = 0;
OpenPOWER on IntegriCloud