diff options
author | Derek Schuff <dschuff@chromium.org> | 2013-05-10 17:11:46 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2013-05-10 17:11:46 -0700 |
commit | a0efa09c7ed20cc0ab394f3cf69383d585f7fa7b (patch) | |
tree | 7ae88ebcd88db871bbfb2d04fa808c6537705d1b /include | |
parent | 52daf9d821c963f84dd312ff90921bfe1b1cc0a1 (diff) |
PNaCl ABI: Promote illegal integer types
This pass (mostly) legalizes integer types by promoting them.
It has some limitations (e.g. it can't change function types)
but it is more than sufficient for what clang and SROA generate.
A more significant limitation of promotion is that packed
bitfields of size > 64 bits are still not handled. There are
none in our tests (other than callingconv_case_by_case which
doesn't require a stable pexe) but we will want to either
handle them by correctly expanding them, or find a better way
to error out.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360
R=eliben@chromium.org, jvoung@chromium.org
Review URL: https://codereview.chromium.org/14569012
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/InitializePasses.h | 1 | ||||
-rw-r--r-- | include/llvm/Transforms/NaCl.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index 1f81c9770e..8eea55474d 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -290,6 +290,7 @@ void initializeInsertDivideCheckPass(PassRegistry&); void initializeNaClCcRewritePass(PassRegistry&); void initializePNaClABIVerifyModulePass(PassRegistry&); void initializePNaClABIVerifyFunctionsPass(PassRegistry&); +void initializePromoteIntegersPass(PassRegistry&); void initializeResolveAliasesPass(PassRegistry&); void initializeStripMetadataPass(PassRegistry&); // @LOCALMOD-END diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h index edd641e901..0e790c1749 100644 --- a/include/llvm/Transforms/NaCl.h +++ b/include/llvm/Transforms/NaCl.h @@ -28,6 +28,7 @@ ModulePass *createExpandTlsConstantExprPass(); ModulePass *createExpandVarArgsPass(); ModulePass *createFlattenGlobalsPass(); ModulePass *createGlobalCleanupPass(); +FunctionPass *createPromoteIntegersPass(); ModulePass *createResolveAliasesPass(); ModulePass *createStripMetadataPass(); FunctionPass *createInsertDivideCheckPass(); |