summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commitb7cd3419012622fa88ffc9ed1f94ed11c96ac9ce (patch)
tree0a823cbe70c9ee0a13dcc6704e486a4bce8895fa /llvm/lib/CodeGen
parent1fde8ece371a86fe3aae232e9d143fbd8dc34d08 (diff)
downloadbcm5719-llvm-b7cd3419012622fa88ffc9ed1f94ed11c96ac9ce.tar.gz
bcm5719-llvm-b7cd3419012622fa88ffc9ed1f94ed11c96ac9ce.zip
Stop emitting lifetime region info when stack coloring is not enabled in O0
- this should fix PR13780 llvm-svn: 163370
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b587884b504..1eb251d0a68 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud