Page MenuHomePhabricator

[update_mir_test_checks] Handle MI flags properly
ClosedPublic

Authored by rtereshin on Oct 11 2019, 11:06 PM.

Details

Summary

previously we would generate literal check lines w/o no reg-exps for
vregs as MI flags (nsw, ninf, etc.) won't be recognized as a part of MI.

Fixing that. Includes updating the MIR tests that suffered from the
problem.

Diff Detail

Event Timeline

rtereshin created this revision.Oct 11 2019, 11:06 PM
bogner accepted this revision.Oct 14 2019, 10:14 AM

LGTM

utils/update_mir_test_checks.py
37–38 ↗(On Diff #224729)

It'd be kind of nice if we could ensure this list stays up to date somehow, but I suppose it really doesn't change much and we'll notice the first time someone updates a test with a flag that's missing here.

This revision is now accepted and ready to land.Oct 14 2019, 10:14 AM
rtereshin marked 2 inline comments as done.Oct 14 2019, 10:39 AM
rtereshin added inline comments.
utils/update_mir_test_checks.py
37–38 ↗(On Diff #224729)

Also, the list of flags in the MI def itself, the MIRParser part that handles them, as well as MIRPrinter are all hand-written and kept in sync manually at the moment. I think it's all good enough for now, if it becomes a problem, we will probably be looking into bigger fish to fry when it comes to keeping in sync everything that has to do with MIR syntax.

rtereshin marked an inline comment as done.Oct 14 2019, 2:56 PM
This revision was automatically updated to reflect the committed changes.