This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Increase FoldID bits size cover common cases.
ClosedPublic

Authored by fhahn on Feb 20 2023, 4:50 AM.

Details

Summary

This should fix the regressions introduced by a53d940cee6f, while
retaining support for arbitrary SCEV expressions.

Alternative to D144335.

Compile-time impact:

  • NewPM-O3: -0.11%
  • NewPM-ReleaseThinLTO: -0.10%

*NewPM-ReleaseLTO-g: -0.08%

https://llvm-compile-time-tracker.com/compare.php?from=df016a9525e5722dfd1e1e1632cec3ed7b33bc8a&to=c1c64de4a973bcecaddbc4038a539234eb39413b&stat=instructions:u

Diff Detail

Event Timeline

fhahn created this revision.Feb 20 2023, 4:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2023, 4:50 AM
fhahn requested review of this revision.Feb 20 2023, 4:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2023, 4:50 AM
fhahn edited the summary of this revision. (Show Details)Feb 20 2023, 4:52 AM
nikic accepted this revision.Feb 20 2023, 5:28 AM

LGTM, this looks like the better backport candidate.

This revision is now accepted and ready to land.Feb 20 2023, 5:28 AM
vitalybuka accepted this revision.Feb 21 2023, 6:39 PM
vitalybuka added inline comments.
llvm/include/llvm/Analysis/ScalarEvolution.h
1300

it's precisely 5 for 64 and 3 for 32

https://github.com/llvm/llvm-project/commit/f1124364336b8bfa341e8a39caba1170205cb6c3

its evaluates to the same improvement.
Either way prevent SmallVector from using heap,

1300

Would you like to submit this one and back-port? it's just missed rc3

This revision was landed with ongoing or failed builds.Feb 24 2023, 12:43 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Feb 24 2023, 9:39 AM

Just landed with adjusted size to 5. I filed https://github.com/llvm/llvm-project/issues/60978 for the back-port.