mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-09-13 04:54:45 +00:00
Fix bug in pass manager that was making the branch extender too aggressive.
We need to let the zero-page collapser do as much work as it can before we get bent out of shape about out-of-range branches.
This commit is contained in:
parent
741390e955
commit
196cb47f05
@ -39,7 +39,8 @@ def run_all(infile, outfile):
|
||||
i = Ophis.Passes.InitLabels()
|
||||
l_basic = Ophis.Passes.UpdateLabels()
|
||||
l = Ophis.Passes.FixPoint("label update", [l_basic], lambda: l_basic.changed == 0)
|
||||
c = Ophis.Passes.Collapse()
|
||||
c_basic = Ophis.Passes.Collapse()
|
||||
c = Ophis.Passes.FixPoint("instruction selection 1", [l, c_basic], lambda: c_basic.collapsed == 0)
|
||||
b = Ophis.Passes.ExtendBranches()
|
||||
a = Ophis.Passes.Assembler()
|
||||
|
||||
@ -48,7 +49,7 @@ def run_all(infile, outfile):
|
||||
passes.append(Ophis.Passes.FixPoint("macro expansion", [m], lambda: m.changed == 0))
|
||||
passes.append(Ophis.Passes.FixPoint("label initialization", [i], lambda: i.changed == 0))
|
||||
passes.extend([Ophis.Passes.CircularityCheck(), Ophis.Passes.CheckExprs(), Ophis.Passes.EasyModes()])
|
||||
passes.append(Ophis.Passes.FixPoint("instruction selection", [l, c, b], lambda: c.collapsed == 0 and b.expanded == 0))
|
||||
passes.append(Ophis.Passes.FixPoint("instruction selection 2", [c, b], lambda: b.expanded == 0))
|
||||
passes.extend([Ophis.Passes.NormalizeModes(), Ophis.Passes.UpdateLabels(), a])
|
||||
|
||||
for p in passes: p.go(z, env)
|
||||
|
Loading…
Reference in New Issue
Block a user