llvm.org GIT mirror llvm / 95ed1e1
Merging r303456: ------------------------------------------------------------------------ r303456 | eugenis | 2017-05-19 16:58:48 -0400 (Fri, 19 May 2017) | 3 lines [safestack] Disable stack coloring by default. Workaround for apparent miscompilation of PR32143. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@303687 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
5 changed file(s) with 8 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1919
2020 #define DEBUG_TYPE "safestackcoloring"
2121
22 // Disabled by default due to PR32143.
2223 static cl::opt ClColoring("safe-stack-coloring",
2324 cl::desc("enable safe stack coloring"),
24 cl::Hidden, cl::init(true));
25 cl::Hidden, cl::init(false));
2526
2627 const StackColoring::LiveRange &StackColoring::getLiveRange(AllocaInst *AI) {
2728 const auto IT = AllocaNumbering.find(AI);
None ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
0 ; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
11
22 ; %x and %y share a stack slot between them, but not with the stack guard.
33 define void @f() safestack sspreq {
None ; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
1 ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
0 ; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
1 ; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
22
33 define void @f() safestack {
44 entry:
None ; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
1 ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
0 ; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
1 ; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
22
33 ; x and y share the stack slot.
44 define void @f() safestack {
0 ; Test that safestack layout reuses a region w/o fragmentation.
1 ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
1 ; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
22
33 define void @f() safestack {
44 ; CHECK-LABEL: define void @f