aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-05-28 11:54:06 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-05-28 11:54:06 -0700
commit9a6f5fa4707744e76c4c89e6c569fea7b9f81fac (patch)
tree7cdcefa3960c8a641ae05baf572f57450f029fe5 /include/llvm/Transforms
parent7b1d0b48c95f7b9861b890c650f039d5cc636e89 (diff)
PNaCl: Extend ExpandMulWithOverflow pass to handle uadd.with.overflow too
It turned out that umul.with.overflow wasn't the only *.with.overflow intrinsic usage introduced by Clang. I knew that Clang's CGExprCXX.cpp generates umul.with.overflow for an overflow check for C++'s "new Foo[]". The same code for handling "new Foo[]" also generates uadd.with.overflow in some cases. This happens if class Foo has a destructor or a delete[] operator that takes a size argument. In those cases, the C++ ABI adds a "cookie" to the allocation which contains the array's size. Rename the pass to "ExpandArithWithOverflow" and rename files accordingly. Also enable the pass. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3434 TEST=*.ll tests + trybots + GCC torture tests Review URL: https://codereview.chromium.org/15688011
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/NaCl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h
index f42336fc67..92838e5fc7 100644
--- a/include/llvm/Transforms/NaCl.h
+++ b/include/llvm/Transforms/NaCl.h
@@ -21,11 +21,11 @@ class Use;
class Value;
ModulePass *createAddPNaClExternalDeclsPass();
+ModulePass *createExpandArithWithOverflowPass();
ModulePass *createExpandByValPass();
FunctionPass *createExpandConstantExprPass();
ModulePass *createExpandCtorsPass();
BasicBlockPass *createExpandGetElementPtrPass();
-ModulePass *createExpandMulWithOverflowPass();
ModulePass *createExpandTlsPass();
ModulePass *createExpandTlsConstantExprPass();
ModulePass *createExpandVarArgsPass();