This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Regex the opcodes in unit test to fix non-deterministic ordering
ClosedPublic

Authored by mgrang on Feb 8 2019, 5:02 PM.

Diff Detail

Event Timeline

mgrang created this revision.Feb 8 2019, 5:02 PM
mgrang added a comment.Feb 8 2019, 5:06 PM

legalize-ext-csedebug-output.mir fails in a reverse iteration build because the OpcodeHitTable is a DenseMap and is iterated to print CSEInfo. We could have copied OpcodeHitTable to a vector and sorted it before iteration. Maybe that would be an overkill. I saw this comment in the test that we could regex the opcodes. Do we care about the order of the CSEInfo opcodes?

aditya_nandakumar accepted this revision.Feb 9 2019, 8:43 AM

legalize-ext-csedebug-output.mir fails in a reverse iteration build because the OpcodeHitTable is a DenseMap and is iterated to print CSEInfo. We could have copied OpcodeHitTable to a vector and sorted it before iteration. Maybe that would be an overkill. I saw this comment in the test that we could regex the opcodes. Do we care about the order of the CSEInfo opcodes?

Sorry this test is brittle. This change should have been done in the first place as there were a couple of build failures already. Thanks.

This revision is now accepted and ready to land.Feb 9 2019, 8:43 AM
mgrang closed this revision.Feb 10 2019, 11:54 AM

Committed in r353652.