[llvm] r303456 - [safestack] Disable stack coloring by default.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 13:58:48 PDT 2017
Author: eugenis
Date: Fri May 19 15:58:48 2017
New Revision: 303456
URL: http://llvm.org/viewvc/llvm-project?rev=303456&view=rev
Log:
[safestack] Disable stack coloring by default.
Workaround for apparent miscompilation of PR32143.
Modified:
llvm/trunk/lib/CodeGen/SafeStackColoring.cpp
llvm/trunk/test/Transforms/SafeStack/X86/coloring-ssp.ll
llvm/trunk/test/Transforms/SafeStack/X86/coloring.ll
llvm/trunk/test/Transforms/SafeStack/X86/coloring2.ll
llvm/trunk/test/Transforms/SafeStack/X86/layout-frag.ll
Modified: llvm/trunk/lib/CodeGen/SafeStackColoring.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SafeStackColoring.cpp?rev=303456&r1=303455&r2=303456&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SafeStackColoring.cpp (original)
+++ llvm/trunk/lib/CodeGen/SafeStackColoring.cpp Fri May 19 15:58:48 2017
@@ -20,9 +20,10 @@ using namespace llvm::safestack;
#define DEBUG_TYPE "safestackcoloring"
+// Disabled by default due to PR32143.
static cl::opt<bool> ClColoring("safe-stack-coloring",
cl::desc("enable safe stack coloring"),
- cl::Hidden, cl::init(true));
+ cl::Hidden, cl::init(false));
const StackColoring::LiveRange &StackColoring::getLiveRange(AllocaInst *AI) {
const auto IT = AllocaNumbering.find(AI);
Modified: llvm/trunk/test/Transforms/SafeStack/X86/coloring-ssp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SafeStack/X86/coloring-ssp.ll?rev=303456&r1=303455&r2=303456&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SafeStack/X86/coloring-ssp.ll (original)
+++ llvm/trunk/test/Transforms/SafeStack/X86/coloring-ssp.ll Fri May 19 15:58:48 2017
@@ -1,4 +1,4 @@
-; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
+; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
; %x and %y share a stack slot between them, but not with the stack guard.
define void @f() safestack sspreq {
Modified: llvm/trunk/test/Transforms/SafeStack/X86/coloring.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SafeStack/X86/coloring.ll?rev=303456&r1=303455&r2=303456&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SafeStack/X86/coloring.ll (original)
+++ llvm/trunk/test/Transforms/SafeStack/X86/coloring.ll Fri May 19 15:58:48 2017
@@ -1,5 +1,5 @@
-; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
-; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
+; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
+; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
define void @f() safestack {
entry:
Modified: llvm/trunk/test/Transforms/SafeStack/X86/coloring2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SafeStack/X86/coloring2.ll?rev=303456&r1=303455&r2=303456&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SafeStack/X86/coloring2.ll (original)
+++ llvm/trunk/test/Transforms/SafeStack/X86/coloring2.ll Fri May 19 15:58:48 2017
@@ -1,5 +1,5 @@
-; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
-; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
+; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s
+; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
; x and y share the stack slot.
define void @f() safestack {
Modified: llvm/trunk/test/Transforms/SafeStack/X86/layout-frag.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SafeStack/X86/layout-frag.ll?rev=303456&r1=303455&r2=303456&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SafeStack/X86/layout-frag.ll (original)
+++ llvm/trunk/test/Transforms/SafeStack/X86/layout-frag.ll Fri May 19 15:58:48 2017
@@ -1,5 +1,5 @@
; Test that safestack layout reuses a region w/o fragmentation.
-; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
+; RUN: opt -safe-stack -safe-stack-coloring=1 -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s
define void @f() safestack {
; CHECK-LABEL: define void @f
More information about the llvm-commits
mailing list