This is an archive of the discontinued LLVM Phabricator instance.

[CGP] Ensure splitgep gives deterministic output
ClosedPublic

Authored by dmgreen on Sep 10 2018, 2:14 AM.

Details

Summary

The output of splitLargeGEPOffsets does not appear to be deterministic because of the way that we iterate over a DenseMap. I've changed it to a MapVector for consistent output.

The test case here isn't particularly great. It shows a difference in output, but only really a cosmetic one. I have a (much) larger case that has the splitgep elements placed in a different order, leading to different registry allocation on Arm. It's the kind of problem goes away if I start removing comment out lines though :-/

Diff Detail

Repository
rL LLVM

Event Timeline

dmgreen created this revision.Sep 10 2018, 2:14 AM
This revision is now accepted and ready to land.Sep 11 2018, 11:54 AM
This revision was automatically updated to reflect the committed changes.