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 --- tools/opt/opt.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 2998a047cf..ff6e5effeb 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -583,6 +583,7 @@ int main(int argc, char **argv) { initializeExpandTlsPass(Registry); initializeExpandTlsConstantExprPass(Registry); initializeExpandVarArgsPass(Registry); + initializeFlattenGlobalsPass(Registry); initializeGlobalCleanupPass(Registry); initializePNaClABIVerifyFunctionsPass(Registry); initializePNaClABIVerifyModulePass(Registry); -- cgit v1.2.3-18-g5258