[PATCH] D27190: Track validity of pass results
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 20:57:12 PST 2016
davide added a comment.
In https://reviews.llvm.org/D27190#615533, @sepavloff wrote:
> > However, I'd really like to isolate this for analysis passes only so that we don't have to do so much with skipFunction.
> This facility indeed is used only for analysis passes. However analysis passes share the same code path with non-analysis ones and it is easier to maintain the flag for all passes. Besides there is no simple way to know if this particular pass is an analysis. There is a comment to `PassInfo` that states it can be obtained from a `Pass` by `getPassInfo` (https://github.com/llvm-mirror/llvm/blob/master/include/llvm/PassInfo.h#L28-L29), however such method does not exist in `Pass`.
> On the other hand the new flag is not tied to analysis only, actually it tracks the fact whether the pass was executed or not. I renamed the flag to `Executed` and associated function accordingly in hope that the code becomes clearer.
> > Relatedly, the logic for when to set things available doesn't really make sense in the current patch. Might just need comments, but it seems very non-obvious when things become available.
> When the flag must change is described in the comment to the method `setExecuted`.
More information about the llvm-commits