diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/NaCl/PNaClABISimplify.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/NaCl/PromoteIntegers.cpp | 10 |
2 files changed, 2 insertions, 11 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp index 71f0f23000..47e5fb67e6 100644 --- a/lib/Transforms/NaCl/PNaClABISimplify.cpp +++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp @@ -60,9 +60,6 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) { // We should not place arbitrary passes after ExpandConstantExpr // because they might reintroduce ConstantExprs. PM.add(createExpandConstantExprPass()); - // PromoteIntegersPass does not handle constexprs and creates GEPs, - // so it goes between those passes. - PM.add(createPromoteIntegersPass()); // ExpandGetElementPtr must follow ExpandConstantExpr to expand the // getelementptr instructions it creates. PM.add(createExpandGetElementPtrPass()); diff --git a/lib/Transforms/NaCl/PromoteIntegers.cpp b/lib/Transforms/NaCl/PromoteIntegers.cpp index c72fe5f80d..f1e45ae367 100644 --- a/lib/Transforms/NaCl/PromoteIntegers.cpp +++ b/lib/Transforms/NaCl/PromoteIntegers.cpp @@ -34,7 +34,6 @@ #include "llvm/IR/IRBuilder.h" #include "llvm/Pass.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Transforms/NaCl.h" using namespace llvm; @@ -54,12 +53,11 @@ INITIALIZE_PASS(PromoteIntegers, "nacl-promote-ints", "Promote integer types which are illegal in PNaCl", false, false) + // Legal sizes are currently 1, 8, 16, 32, and 64. // We can't yet expand types above 64 bit, so don't try to touch them for now. -// TODO(dschuff): expand >64bit types or disallow >64bit packed bitfields. -// There are currently none in our tests that use the ABI checker. -// See https://code.google.com/p/nativeclient/issues/detail?id=3360 static bool isLegalSize(unsigned Size) { + // TODO(dschuff): expand >64bit types or disallow >64bit packed bitfields if (Size > 64) return true; return Size == 1 || Size == 8 || Size == 16 || Size == 32 || Size == 64; } @@ -620,7 +618,3 @@ bool PromoteIntegers::runOnFunction(Function &F) { State.eraseReplacedInstructions(); return Modified; } - -FunctionPass* llvm::createPromoteIntegersPass() { - return new PromoteIntegers(); -} |