[llvm-commits] [llvm] r133108 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ include/llvm/Support/ include/llvm/Transforms/ lib/CodeGen/ lib/Transforms/Scalar/ test/Transforms/ObjCARC/
Chris Lattner
clattner at apple.com
Thu Jun 16 14:26:40 PDT 2011
On Jun 15, 2011, at 4:37 PM, John McCall wrote:
> Author: rjmccall
> Date: Wed Jun 15 18:37:01 2011
> New Revision: 133108
>
> URL: http://llvm.org/viewvc/llvm-project?rev=133108&view=rev
> Log:
> The ARC language-specific optimizer. Credit to Dan Gohman.
Hi Dan,
> +++ llvm/trunk/include/llvm/Support/PassManagerBuilder.h Wed Jun 15 18:37:01 2011
> @@ -188,6 +188,7 @@
> MPM.add(createArgumentPromotionPass()); // Scalarize uninlined fn args
>
> // Start of function pass.
> + MPM.add(createObjCARCExpandPass()); // Canonicalize ObjC ARC code.
> // Break up aggregate allocas, using SSAUpdater.
> MPM.add(createScalarReplAggregatesPass(-1, false));
> MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
> @@ -223,6 +224,7 @@
> MPM.add(createJumpThreadingPass()); // Thread jumps
> MPM.add(createCorrelatedValuePropagationPass());
> MPM.add(createDeadStoreEliminationPass()); // Delete dead stores
> + MPM.add(createObjCARCOptPass()); // Objective-C ARC optimizations.
> MPM.add(createAggressiveDCEPass()); // Delete dead instructions
> MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
> MPM.add(createInstructionCombiningPass()); // Clean up after everything.
I don't think that it makes sense to add this pass unconditionally to the pass manager. Non-ObjC languages shouldn't have to link in the pass etc. Can you change clang to use PassManagerBuilder::addExtension (adding extension points as needed)?
This way only clang will have to link in the pass, not everything that uses the standard sequence. Likewise for the codegen passmgr.
-Chris
More information about the llvm-commits
mailing list