This is an archive of the discontinued LLVM Phabricator instance.

Fix implementation of DAGTypeLegalizer::PerformExpensiveChecks
AbandonedPublic

Authored by sepavloff on Jan 26 2017, 8:16 AM.

Details

Summary

Implementation of DAGTypeLegalizer::PerformExpensiveChecks is out of sync
with the current algorithm of the type legalizer. In particular, it requests
that unprocessed nodes marked as NewNode must not be present in any of the
conversion maps except probably ReplacedValues. It is not true now, abandoned
nodes (they are also marked as NewNode) now may be found in the map
SoftenedFloats as well.

This change fixes several fails when expensive checks are enabled.

Event Timeline

sepavloff created this revision.Jan 26 2017, 8:16 AM
sepavloff updated this revision to Diff 86246.Jan 29 2017, 11:54 PM

Added one more case where legalization failed

With current implementation of the legalizer a node may present in both
SoftenedFloats and ReplacedValues. Now this change fixes 9 test fails
observed in builds with expensive checks enabled.

RKSimon added a subscriber: fhahn.Jan 30 2017, 3:51 AM
RKSimon added a subscriber: RKSimon.
fhahn added a comment.Jan 30 2017, 3:56 AM

I don't think we have to make the checks more permissive. I think it is possible to preserve the properties that DAGTypeLegalizer::PerformExpensiveChecks checks. See D29265 for my patch for that. I think we should remove replaced values from SoftenedFloats (and possibly other maps as well).

D29265 appears to be trying to achieve the same aim but with a different approach (removing stale entries from SoftenedFloats)

sepavloff updated this revision to Diff 86272.Jan 30 2017, 5:37 AM

Remove changes that relates to intersection of ReplacedValues and SoftenedFloats.

They are covered by D29265.

chh added a subscriber: chh.Feb 13 2017, 11:56 AM

Any feedback?

sepavloff abandoned this revision.Mar 6 2017, 2:44 AM

With current ToT (r297001) none of the llvm tests fails due to legalizer, if expensive checks are enabled. So the fix is not needed anymore.