This is an archive of the discontinued LLVM Phabricator instance.

[SCCP] Notify the Solver when an instruction is removed.
AbandonedPublic

Authored by labrinea on May 26 2022, 3:13 AM.

Diff Detail

Event Timeline

labrinea created this revision.May 26 2022, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2022, 3:13 AM
labrinea requested review of this revision.May 26 2022, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2022, 3:13 AM
labrinea planned changes to this revision.May 26 2022, 3:14 AM

This is a proof of concept for RFC: Should we enable Function Specialization?, not ready for review.

labrinea added inline comments.May 26 2022, 3:47 AM
llvm/lib/Transforms/Utils/SCCPSolver.cpp
1713

This is something weren't checking before. There can be self-referencing PHI nodes which get replaced and then we are visiting them, which results in a crash.

1718–1724

Also this should happen first and then visit the users, otherwise the solver keeps invalid lattice state in the meantime.

labrinea updated this revision to Diff 441009.Jun 29 2022, 7:39 AM
labrinea retitled this revision from [WIP][IPSCCP] Invalidate the Lattice Value of deleted instructions. to [SCCP] Notify the Solver when an instruction is removed..
labrinea added a reviewer: llvm-commits.

rebased

labrinea updated this revision to Diff 443593.Jul 11 2022, 4:00 AM
labrinea updated this revision to Diff 444532.Jul 13 2022, 11:54 PM

Changes from last revision:

  • replace ssa_copy intrinsics on each iteration of Function Specialization
  • Clear the Solver's worklist before each iteration of Function Specialization
labrinea edited reviewers, added: efriedma; removed: eli.friedman.Aug 1 2022, 10:39 AM
labrinea edited the summary of this revision. (Show Details)Aug 15 2022, 1:45 AM
labrinea abandoned this revision.Dec 5 2022, 5:16 AM

Abandoning in favor of D126455.