This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Use recursivelyDeleteUnusedNodes in CommitTargetLoweringOpt.
ClosedPublic

Authored by deadalnix on Jul 24 2022, 6:11 PM.

Details

Summary

It simplifies the logic and removes the need for manual bookkeeping.

Diff Detail

Event Timeline

deadalnix created this revision.Jul 24 2022, 6:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2022, 6:11 PM
deadalnix requested review of this revision.Jul 24 2022, 6:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2022, 6:11 PM
foad added a comment.Jul 25 2022, 1:06 AM

AMDGPU diffs LGTM!

Should I proceed with this? This isn't vital, but it is fairly trivial, and seems better to me.

foad added a reviewer: Restricted Project.Jul 28 2022, 3:45 AM
arsenm accepted this revision.Jul 28 2022, 10:05 AM
This revision is now accepted and ready to land.Jul 28 2022, 10:05 AM
craig.topper added inline comments.Jul 28 2022, 10:10 AM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
1209

Why don't we need the WorklistRemove here anymore? The comment applies to what can happen inside of ReplaceAllUsesOfValueWith.

deadalnix added inline comments.Jul 29 2022, 5:39 AM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
1209

The run call itself already adds a WorkListRemover, so this one is redundant.

This revision was landed with ongoing or failed builds.Jul 29 2022, 6:49 AM
This revision was automatically updated to reflect the committed changes.