[PATCH] D145516: [Inliner] Avoid excessive inlining through devirtualised calls

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 19:21:41 PDT 2023


aeubanks added a comment.

the inline cost multiplier looks good (could even be split out)

but I just realized that this will apply to all devirtualization, which can't be good for performance. we only want to penalize devirtualization that can cause mutually recursive inlining. it's pretty tricky figuring out what conditions this inlining explosion can arise from

I believe something along the lines of "`F` has a ref edge to `NewCallee` and `NewCallee` has a ref edge to itself (or maybe is in a non-trivial RefSCC?)", then this can occur? we want to be as precise as possible limiting when we add the inline cost penalty


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145516/new/

https://reviews.llvm.org/D145516



More information about the llvm-commits mailing list