aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-04-23 14:49:45 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-04-23 14:49:45 -0700
commite0e366e55459a2b934253ac1ada762bdade64571 (patch)
tree8d75f1e95c84511fc9d265341d2d0c688f51a20d /include/llvm/Transforms
parent744ccd6c8bd149a17575b9d768b9a90ce06bf122 (diff)
PNaCl: Add FlattenGlobals pass for simplifying global variable initializers
This pass converts initializers for global variables into a flattened normal form which removes nested struct types and simplifies ConstantExprs. In the future, we might change the bitcode format to use the flattened bytes+relocs representation for global initializers. In that case, we will be able to reuse the FlattenedConstant class in the bitcode reader/writer for converting to and from this form. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3113 TEST=test/Transforms/NaCl/flatten-globals.ll Review URL: https://codereview.chromium.org/14017011
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/NaCl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h
index 0a857653ba..650779c058 100644
--- a/include/llvm/Transforms/NaCl.h
+++ b/include/llvm/Transforms/NaCl.h
@@ -25,6 +25,7 @@ BasicBlockPass *createExpandGetElementPtrPass();
ModulePass *createExpandTlsPass();
ModulePass *createExpandTlsConstantExprPass();
ModulePass *createExpandVarArgsPass();
+ModulePass *createFlattenGlobalsPass();
ModulePass *createGlobalCleanupPass();
ModulePass *createResolveAliasesPass();
ModulePass *createStripMetadataPass();