[PATCH] D87435: [PGO] Skip if an IndirectBrInst critical edge cannot be split

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 01:03:49 PDT 2020


lebedev.ri added a comment.

In D87435#2265101 <https://reviews.llvm.org/D87435#2265101>, @lebedev.ri wrote:

> In D87435#2265077 <https://reviews.llvm.org/D87435#2265077>, @MaskRay wrote:
>
>> In D87435#2265038 <https://reviews.llvm.org/D87435#2265038>, @lebedev.ri wrote:
>>
>>> I believe every other caller ensures that as a precondition.
>>> Why is the existing approach incorrect, and `PGOInstrumentation` shouldn't be fixed itself?
>>
>> How do other callers handle such a critical edge?
>
> By doing this check before calling the function?
>
>> `SplitCriticalEdge` is a generic API where some cases are already skipped (`return nullptr`), see isEHPad and other `return nullptr` in the function.

TBN i personally don't care whether all the callers do all these checks, or `SplitCriticalEdge()` itself does them (latter is likely slower),
but i would think we should be consistent.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87435



More information about the llvm-commits mailing list