[llvm-commits] [llvm] r109413 - in /llvm/trunk: include/llvm/Support/StandardPasses.h lib/Transforms/Scalar/LoopDeletion.cpp lib/Transforms/Scalar/LoopUnrollPass.cpp lib/Transforms/Utils/LCSSA.cpp lib/Transforms/Utils/LoopSimplify.cpp
Dan Gohman
gohman at apple.com
Mon Jul 26 11:42:11 PDT 2010
On Jul 26, 2010, at 11:23 AM, Devang Patel wrote:
>
> On Jul 26, 2010, at 11:11 AM, Dan Gohman wrote:
>
>> Author: djg
>> Date: Mon Jul 26 13:11:16 2010
>> New Revision: 109413
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=109413&view=rev
>> Log:
>> Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogus
>> dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier
>> pass in StandardPasses.h to ensure that it gets scheduled at the right
>> time.
>
> If a Pass breaks because DominanceFrontier was not explicitly added in pass manager queue then the pass is broken. A pass is supposed to request all the required analysis itself.
>
> $ opt -mypass
>
> should just work even if mypass needs DominanceFrontier. It is mypass's responsibility to request dominance frontier.
>
> Enforcing `$ opt -domfrontier -mypass` requirement completely goes against getAnalysisUsage() mechanism.
The issue here is ordering, not correctness. Everything works if
DominanceFrontier is left out of the StandardCompileOpts list, however
the pass manager ends up inserting DominanceFrontier in the middle of
the loop passes, which splits them up and clobbers LoopSimplify so
that it must be re-run.
Dan
More information about the llvm-commits
mailing list