Use OrderedDict rather than explicit sorting.

This reduces churn in the generated files, making it easier to inspect
changes.
This commit is contained in:
Dan Gohman
2018-03-15 10:18:51 -07:00
parent c842b9aaa1
commit b2acd457d5
2 changed files with 4 additions and 5 deletions

View File

@@ -600,8 +600,8 @@ def make_tables(cpumode):
table[ty][inst].encodings.append(enc)
# Ensure there are level 1 table entries for all types with a custom
# legalize action. Try to be stable relative to dict ordering.
for ty in sorted(cpumode.type_legalize.keys(), key=str):
# legalize action.
for ty in cpumode.type_legalize.keys():
table[ty]
return table