From e0e366e55459a2b934253ac1ada762bdade64571 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Tue, 23 Apr 2013 14:49:45 -0700 Subject: 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 --- include/llvm/Transforms/NaCl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/llvm/Transforms') 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(); -- cgit v1.2.3-70-g09d2