This is an archive of the discontinued LLVM Phabricator instance.

[NFC][GVNSink] Don't pretend that iteration is over instructions when it's actually over blocks
ClosedPublic

Authored by yurai007 on May 2 2022, 5:34 AM.

Diff Detail

Event Timeline

yurai007 created this revision.May 2 2022, 5:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 5:34 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
yurai007 requested review of this revision.May 2 2022, 5:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2022, 5:34 AM
nikic added inline comments.May 2 2022, 5:37 AM
llvm/lib/Transforms/Scalar/GVNSink.cpp
777–779

Make this something like erase_if(Preds, [](BasicBlock *BB) { return BB->getTerminator()->getNumSuccessors() != 1; }?

yurai007 updated this revision to Diff 426395.May 2 2022, 6:23 AM
yurai007 marked an inline comment as done.
nikic accepted this revision.May 2 2022, 6:25 AM

LGTM

This revision is now accepted and ready to land.May 2 2022, 6:25 AM
This revision was landed with ongoing or failed builds.May 3 2022, 8:21 AM
This revision was automatically updated to reflect the committed changes.