This is an archive of the discontinued LLVM Phabricator instance.

[NewGVN] Optimize processing as instructions don't get more trivially dead over time
ClosedPublic

Authored by davide on Jan 19 2017, 4:55 PM.

Details

Summary

Don't call isTriviallyDeadInstructions() once we discover that an instruction is dead. Instead, set DFS number zero (as suggested by Danny) and forget about it (this also speeds up things as we won't try to reprocess that block).

Diff Detail

Event Timeline

davide created this revision.Jan 19 2017, 4:55 PM
davide added inline comments.
lib/Transforms/Scalar/NewGVN.cpp
241–243

This also adds a comment explaining what these array are for (in case it wasn't entirely obvious) and the special meaning of DFS number == 0

This passes 3-stage bootstrap on Linux, FWIW

dberlin accepted this revision.Jan 20 2017, 3:15 PM
This revision is now accepted and ready to land.Jan 20 2017, 3:15 PM
This revision was automatically updated to reflect the committed changes.