summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2012-09-07 05:13:00 +0000
committerMichael Liao <michael.liao@intel.com>2012-09-07 05:13:00 +0000
commit1fdaee9995f1bf1553cecd4da62daba91fd4fa1f (patch)
tree3ee6237c0c8925d29e861ad3fdf45bc14b715ccc
parent04376ebe9f203213ef1eb4c69396fe280dc8c8b1 (diff)
downloadexternal_llvm-1fdaee9995f1bf1553cecd4da62daba91fd4fa1f.zip
external_llvm-1fdaee9995f1bf1553cecd4da62daba91fd4fa1f.tar.gz
external_llvm-1fdaee9995f1bf1553cecd4da62daba91fd4fa1f.tar.bz2
Stop emitting lifetime region info when stack coloring is not enabled in O0
- this should fix PR13780 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163370 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b587884..1eb251d 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -5218,6 +5218,12 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
}
case Intrinsic::lifetime_start:
case Intrinsic::lifetime_end: {
+ // Stack coloring is not enabled in O0, discard region information.
+ if (TM.getOptLevel() == CodeGenOpt::None) {
+ if (Intrinsic == Intrinsic::lifetime_start)
+ setValue(&I, DAG.getUNDEF(TLI.getPointerTy()));
+ return 0;
+ }
SDValue Ops[2];
AllocaInst *LifetimeObject =dyn_cast_or_null<AllocaInst>(
GetUnderlyingObject(I.getArgOperand(1), TD));