mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
[stackprotector] Small Bit of computation hoisting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b99272a521
commit
d4f478899e
@ -387,7 +387,8 @@ static bool CreatePrologue(Function *F, Module *M, ReturnInst *RI,
|
|||||||
/// value. It calls __stack_chk_fail if they differ.
|
/// value. It calls __stack_chk_fail if they differ.
|
||||||
bool StackProtector::InsertStackProtectors() {
|
bool StackProtector::InsertStackProtectors() {
|
||||||
bool HasPrologue = false;
|
bool HasPrologue = false;
|
||||||
bool SupportsSelectionDAGSP = false;
|
bool SupportsSelectionDAGSP =
|
||||||
|
EnableSelectionDAGSP && !TM->Options.EnableFastISel;
|
||||||
AllocaInst *AI = 0; // Place on stack that stores the stack guard.
|
AllocaInst *AI = 0; // Place on stack that stores the stack guard.
|
||||||
Value *StackGuardVar = 0; // The stack guard variable.
|
Value *StackGuardVar = 0; // The stack guard variable.
|
||||||
|
|
||||||
@ -398,12 +399,11 @@ bool StackProtector::InsertStackProtectors() {
|
|||||||
|
|
||||||
if (!HasPrologue) {
|
if (!HasPrologue) {
|
||||||
HasPrologue = true;
|
HasPrologue = true;
|
||||||
SupportsSelectionDAGSP = CreatePrologue(F, M, RI, TLI, Trip, AI,
|
SupportsSelectionDAGSP &= CreatePrologue(F, M, RI, TLI, Trip, AI,
|
||||||
StackGuardVar);
|
StackGuardVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnableSelectionDAGSP && !TM->Options.EnableFastISel &&
|
if (SupportsSelectionDAGSP) {
|
||||||
SupportsSelectionDAGSP) {
|
|
||||||
// Since we have a potential tail call, insert the special stack check
|
// Since we have a potential tail call, insert the special stack check
|
||||||
// intrinsic.
|
// intrinsic.
|
||||||
Instruction *InsertionPt = 0;
|
Instruction *InsertionPt = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user