aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-05-30 13:14:50 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-05-30 13:14:50 -0700
commit381b0fb87f1fe806d678af8c48b67b4e0dc3a43b (patch)
tree3f6d52d5fafbf9a2c952b8e723f832644b1d99f0 /lib/Analysis
parentf72e0b53e25548d6db9220a03a303e589c9773a4 (diff)
PNaCl ABI checker: Disallow llvm.lifetime.start/end intrinsics
Run StripDeadPrototypes as a final pass to ensure that the prototypes for lifetime.start/end are removed. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3443 TEST=PNaCl toolchain trybots Review URL: https://codereview.chromium.org/16063005
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/NaCl/PNaClABIVerifyModule.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
index 0e406e6512..9b2def5ac4 100644
--- a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
+++ b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
@@ -163,8 +163,6 @@ bool PNaClABIVerifyModule::isWhitelistedIntrinsic(const Function *F,
case Intrinsic::bswap: return isWhitelistedBswap(F);
case Intrinsic::invariant_end:
case Intrinsic::invariant_start:
- case Intrinsic::lifetime_end:
- case Intrinsic::lifetime_start:
case Intrinsic::memcpy:
case Intrinsic::memmove:
case Intrinsic::memset:
@@ -210,6 +208,13 @@ bool PNaClABIVerifyModule::isWhitelistedIntrinsic(const Function *F,
case Intrinsic::usub_with_overflow:
case Intrinsic::smul_with_overflow:
case Intrinsic::umul_with_overflow:
+ // Disallow lifetime.start/end because the semantics of what
+ // arguments they accept are not very well defined, and because it
+ // would be better to do merging of stack slots in the user
+ // toolchain than in the PNaCl translator.
+ // See https://code.google.com/p/nativeclient/issues/detail?id=3443
+ case Intrinsic::lifetime_end:
+ case Intrinsic::lifetime_start:
return false;
// (3) Dev intrinsics.