Page MenuHomePhabricator

[NFCI] LoopSink pass requires PGO, so rename it as PGOLoopSink
Changes PlannedPublic

Authored by lebedev.ri on Jul 13 2020, 9:20 AM.



The LoopSink pass doesn't actually do anything unless there's PGO profile info.
I'm interested in looking in adding an early, pre-LoopRotate aggressive LoopSink pass,
because i believe that will at the very least help to address several of vectorization failures i have analyzed.
But for that, i'll need to somehow convince LoopSink to skip profitability checks,
which results in half of the pass being conditional.

So instead, let's unsquat LoopSink pass, rename it as PGOLoopSink,
which makes room for an actual`LoopSink` pass.


Diff Detail

Unit TestsFailed

190 mswindows > Clang.CodeGen::Unknown Unit Message ("")
Script: -- : 'RUN: at line 5'; c:\ws\w64\llvm-project\premerge-checks\build\bin\opt.exe -thinlto-bc -o C:\ws\w64\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\thinlto-distributed-newpm.ll.tmp.o C:\ws\w64\llvm-project\premerge-checks\clang\test\CodeGen\thinlto-distributed-newpm.ll

Event Timeline

lebedev.ri created this revision.Jul 13 2020, 9:20 AM
mkazantsev accepted this revision.Jul 17 2020, 4:48 AM

Not sure why it is necessary to rename it in the first place, but looks fine.

This revision is now accepted and ready to land.Jul 17 2020, 4:48 AM

Not sure why it is necessary to rename it in the first place, but looks fine.

I've talked with @fhahn in IRC yesterday about all the pieces of the puzzle i'm seeing,
and right now i'm no longer very sure if it really should be renamed, or i should to refactor it to

  1. make it possible to disable cost model
  2. also allow sinking from header (w/o costmodel)
lebedev.ri planned changes to this revision.Jul 27 2020, 6:38 AM

While the problem i was looking at was resolved via other means, i wonder if i should land this, since the pass name is rather obviously ambiguous?