This is an archive of the discontinued LLVM Phabricator instance.

[IndVars][NFC] Refactor to make modifications of Changed transparent
ClosedPublic

Authored by mkazantsev on Sep 10 2018, 1:02 AM.

Details

Summary

IndVarSimplify's design is somewhat odd in the way how it reports that
some transform has made a change. It has a Changed field which can
be set from within any function, which makes it hard to track whether or
not it was set properly after a transform was made. It leads to oversights
in marking it properly, see example in PR38855.

This patch removes the Changed field, turns it into a local and unifies
the signatures of all relevant transform functions to return boolean value
which designates whether or not this transform has made a change.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.Sep 10 2018, 1:02 AM
skatkov accepted this revision.Sep 10 2018, 7:08 PM
This revision is now accepted and ready to land.Sep 10 2018, 7:08 PM
This revision was automatically updated to reflect the committed changes.