]> granicus.if.org Git - llvm/commitdiff
Merging r303456:
authorTom Stellard <tstellar@redhat.com>
Tue, 23 May 2017 20:49:01 +0000 (20:49 +0000)
committerTom Stellard <tstellar@redhat.com>
Tue, 23 May 2017 20:49:01 +0000 (20:49 +0000)
------------------------------------------------------------------------
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

lib/CodeGen/SafeStackColoring.cpp
test/Transforms/SafeStack/X86/coloring-ssp.ll
test/Transforms/SafeStack/X86/coloring.ll
test/Transforms/SafeStack/X86/coloring2.ll
test/Transforms/SafeStack/X86/layout-frag.ll

index 7fbeaddb38e8e260880f0cf25f600d1d0f62bcae..3bfd0551cb4836a7787a0819616b67a83dd65086 100644 (file)
@@ -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);
index d71babe200df86f272eaf0c641df594a7d560db4..b5b47e3bae67ceeea2a93c1cadf301230cdb7ecd 100644 (file)
@@ -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 {
index 3ed9ccb43f39ebaa1b70b231c0e2b5cae87a950c..50fa8918004cb643ea99b152b3c71719a34bbab7 100644 (file)
@@ -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:
index f3ac6d735c9dc4a904b996da04a64e449d7cf6e3..7de0e8503a705ed45b4c9960624a75436275f69b 100644 (file)
@@ -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 {
index 125eb0f8be9ae8ae580bd7011f44241f98a22877..8ee3775f80336543e5e656f7b08519be8b33a7eb 100644 (file)
@@ -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