Hello,

On Wed, Sep 11 2024, Prachi Godbole via Gcc wrote:
> Hi,
>
> I am trying to generate out-of-line clones of ipcp clones for an IPA
> pass that runs after IPA inline, where the new clone has same function
> body and same updated signature as the ipcp clone. This fails or
> asserts based on how the clone is created:
>

Dealing with param_adjustements post-inlining might be a bit interesting
but hopefully not too much(?).  It is difficult to see what exactly the
issues you are facing might be but perhaps pass_ipa_sra, though it runs
before inlining, could be an inspiration because it also can create
clones of IPA-CP clones.

> 1. If param_adjustments and tree_map are not provided:
>     fails in clone materialization (tree_function_versioning ()) when 
> updating signature and remapping calls because clone_of (i.e. ipcp clone) and 
> the new clone differ in param information, or
>
> 2. If param_adjustments and tree_map are provided:
>     asserts in fnsummary duplication
>
> What are the possible approaches to make it work?
>

I'm not sure I can help knowing just the above.  Can you post the
back-traces?  But as I said, looking at how process_isra_node_results in
ipa-sra.cc deals with pre-existing clone_info might be the best thing to
look at.

Martin

Reply via email to