[llvm-dev] SimplifyCFG recursion

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 1 15:26:43 PDT 2018


Ping

~Craig


On Wed, Sep 26, 2018 at 4:03 PM Craig Topper <craig.topper at gmail.com> wrote:

> SimplifyCFG has many places that do this
>
> return simplifyCFG(BB, TTI, Options) || true;
>
> As far as I can tell this calls the global entry point for SimplifyCFG
> which creates a SimplifyCFGOpt object to call run(BB) on. So I think this
> means SimplifyCFG can create a new SimplifyCFGOpt object each time it
> recurses like this. I don't know how deep it goes in practice.
>
> The global entry point also has a 4th argument called LoopHeaders that is
> defaulted to nullptr. I think we lose the LoopHeaders pointer the first
> time we recurse because none of the recursive calls pass it along.
>
> Should we instead be recursing to the run function on the current
> SimplifyCFGOpt object?
>
> ~Craig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181001/d2bb4591/attachment.html>


More information about the llvm-dev mailing list