[PATCH] D42600: [CodeGen][Shrink-wrap]split restore point

Sushant Gokhale via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 06:43:11 PDT 2023


sushgokh added a comment.

In D42600#4327970 <https://reviews.llvm.org/D42600#4327970>, @ayzhao wrote:

> This is causing lld to crash on Chrome builds when PGO and ThinLTO are enabled: https://crbug.com/1443635

@ayzhao I request you to please provide me following information:

1. Reproducer of the function causing the assert failure
2. llc -print-before=shrink-wrap   for the function
3. llc -debug-only=shrink-wrap     for function

Also, I request to check if the following patch works since I suspect that PGO is changing the block frequencies:

  --- a/llvm/lib/CodeGen/ShrinkWrap.cpp
  +++ b/llvm/lib/CodeGen/ShrinkWrap.cpp
  @@ -632,7 +632,8 @@ bool ShrinkWrap::postShrinkWrapping(bool HasCandidate, MachineFunction &MF,
         FindIDom<>(**DirtyPreds.begin(), DirtyPreds, *MDT, false);
  
     while (NewSave && (hasDirtyPred(ReachableByDirty, *NewSave) ||
  -                     EntryFreq < MBFI->getBlockFreq(NewSave).getFrequency()))
  +                     EntryFreq < MBFI->getBlockFreq(NewSave).getFrequency() ||
  +                     MLI->getLoopFor(NewSave)))
       NewSave = FindIDom<>(**NewSave->pred_begin(), NewSave->predecessors(), *MDT,
                            false);




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D42600



More information about the llvm-commits mailing list