This is an archive of the discontinued LLVM Phabricator instance.

[CGP] Reset DT when optimizing select instructions
ClosedPublic

Authored by tejohnson on Mar 27 2019, 9:33 AM.

Details

Summary

A recent fix (r355751) caused a compile time regression because setting
the ModifiedDT flag in optimizeSelectInst means that each time a select
instruction is optimized the function walk in runOnFunction stops and
restarts again (which was needed to build a new DT before we started
building it lazily in r356937). Now that the DT is built lazily, a
simple fix is to just reset the DT at this point, rather than restarting
the whole function walk.

In the future other places that set ModifiedDT may want to switch to
just resetting the DT directly. But that will require an evaluation to
ensure that they don't otherwise need to restart the function walk.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Mar 27 2019, 9:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2019, 9:33 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
spatel accepted this revision.Mar 27 2019, 10:24 AM

LGTM

This revision is now accepted and ready to land.Mar 27 2019, 10:24 AM
This revision was automatically updated to reflect the committed changes.