[llvm-dev] RFC: Pass Execution Instrumentation interface
Philip Pfaffe via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 13 10:03:20 PDT 2018
On Wed, Jun 13, 2018 at 6:46 PM David A. Greene via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> [...]
>
> The harder cases are where the analysis phase itself does some
> transformation (possily to facilitate analysis) and then decides the
> larger-goal transformation is not viable. If the pass then tries to
> undo the first transformation, it's possible that -pass-max will result
> in code that never would have been generated, because it could do the
> first transformation but then not undo it because it hit the max number
> of transforms. Sometimes it's difficult to find where things are undone
> and update the transformation index (basically allow the undo and
> decrement the index to reflect the undo).
>
It should be pointed out that analyses don't transform the IR. At least not
in the new PassManager, which I think we should focus on in this proposal.
Cheers,
Philip
>
> In code:
>
> if (not hit max)
> do anlysis transform
> ++index
>
> return
>
> <some other function>
>
> if (transform legal)
> if (not hit max)
> do big transform
> ++index
>
> return
>
> <some third function>
> if (need to undo analysis transform)
> if (not hit max)
> undo it
> ++index
>
> Sometimes it is not obvious that these three places are logically
> connected. Ideally we wouldn't increment the index for the analysis
> transform or we would allow the undo and decrement the index, but it's
> not always clear from the code that that is what should happen.
>
> -David
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180613/dbfc8009/attachment.html>
More information about the llvm-dev
mailing list