compiler: sort predecessors in IR dump output.

Makes diffs more useful.
This commit is contained in:
whitequark 2018-05-19 16:57:47 +00:00
parent dc1c4ebf1d
commit fd110e9848

View File

@ -379,7 +379,7 @@ class BasicBlock(NamedValue):
lines = ["{}:".format(escape_name(self.name))]
if self.function is not None:
lines[0] += " ; predecessors: {}".format(
", ".join([escape_name(pred.name) for pred in self.predecessors()]))
", ".join(sorted([escape_name(pred.name) for pred in self.predecessors()])))
# Annotated instructions
loc = None