aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-05-24 12:56:47 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-05-24 12:56:47 -0700
commitde078f629ea70df5987a28390c1d3a0da5c844d5 (patch)
treefa512e24a4bb83c618df63f7bcd3d6fdab293802 /tools
parentc90dfbd2f293eb69e9ba40454e87525a3d4e94c7 (diff)
PNaCl: Add pass to expand out Clang-generated umul.with.overflow calls
This adds a pass, ExpandMulWithOverflow, to expand out the llvm.umul.with.overflow calls that Clang generates to implement an overflow check for C++'s new[] operator. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3434 TEST=expand-mul-with-overflow.ll Review URL: https://codereview.chromium.org/14649027
Diffstat (limited to 'tools')
-rw-r--r--tools/opt/opt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 94ff313937..3179e17733 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -589,6 +589,7 @@ int main(int argc, char **argv) {
initializeExpandConstantExprPass(Registry);
initializeExpandCtorsPass(Registry);
initializeExpandGetElementPtrPass(Registry);
+ initializeExpandMulWithOverflowPass(Registry);
initializeExpandTlsPass(Registry);
initializeExpandTlsConstantExprPass(Registry);
initializeExpandVarArgsPass(Registry);