Page MenuHomePhabricator

[CodeGen] Store LiveRegs in SetVector

Authored by samparker on Jan 9 2020, 2:57 AM.



liveins are dumped in many of the test cases and so storing them in a set can result in non-deterministic failures. I'm not sure whether this could cause of issues too... I'm also wondering how this hasn't come up before, have I missed something? SparseSet has now been replaced with a SetVector.

Diff Detail

Event Timeline

samparker created this revision.Jan 9 2020, 2:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2020, 2:57 AM
Herald added a subscriber: dexonsmith. · View Herald Transcript
Eugene.Zelenko set the repository for this revision to rG LLVM Github Monorepo.

SpareSet is deterministic given the same input order - similar to SetVector. Printing the result is not the common use case, so changing the print function to sort the output first might be more useful for testing purposes.

Ah, thanks, then maybe I need to look elsewhere. I appear to be running into const issues when trying to sort in print and dump.

samparker abandoned this revision.Jan 16 2020, 8:08 AM