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
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ class BasicBlock(NamedValue):
lines = ["{}:".format(escape_name(self.name))] lines = ["{}:".format(escape_name(self.name))]
if self.function is not None: if self.function is not None:
lines[0] += " ; predecessors: {}".format( 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 # Annotated instructions
loc = None loc = None