diff options
author | Robert Muth <robertm@chromium.org> | 2012-09-17 15:27:33 -0400 |
---|---|---|
committer | Robert Muth <robertm@chromium.org> | 2012-09-17 15:27:33 -0400 |
commit | 8d211d5b87f167bfa4ddedc81b039c94e192f3ca (patch) | |
tree | d0c983deb0720e0eac757e9a3ae7bdda52b2d35f /lib/CodeGen/Passes.cpp | |
parent | 0365986a33ef5d04ea505cf1d73299386f01fdf9 (diff) |
Add a pass to llvm to rewrite the bitcode in an
arch specific way to mimic the native calling convention.
The goal is to make this good enough for ppapi interfaces.
Review URL: https://chromiumcodereview.appspot.com/10912128
Diffstat (limited to 'lib/CodeGen/Passes.cpp')
-rw-r--r-- | lib/CodeGen/Passes.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index 56526f2732..d68c6740f8 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -352,6 +352,16 @@ void TargetPassConfig::addIRPasses() { addPass(createTypeBasedAliasAnalysisPass()); addPass(createBasicAliasAnalysisPass()); + // @LOCALMOD-START + addPass(createNaClCcRewritePass(TM->getTargetLowering())); + // TODO: consider adding a cleanup pass, e.g. constant propagation + // Note: we run this before the verfier step because it may cause + // a *temporary* inconsistency: + // A function may have been rewritting before we are rewriting + // its callers - which would lead to a parameter mismatch complaint + // from the verifier. + // @LOCALMOD-END + // Before running any passes, run the verifier to determine if the input // coming from the front-end and/or optimizer is valid. if (!DisableVerify) |