mirror of
https://github.com/KarolS/millfork.git
synced 2025-03-10 12:30:07 +00:00
Don't optimize away PLP
This commit is contained in:
parent
14a5a58134
commit
309f12cf82
@ -247,9 +247,9 @@ object AlwaysGoodOptimizations {
|
||||
val PoinlessFlagChange = new RuleBasedAssemblyOptimization("Pointless flag change",
|
||||
needsFlowInfo = FlowInfoRequirement.NoRequirement,
|
||||
(HasOpcodeIn(Set(CMP, CPX, CPY)) & Elidable) ~ NoopDiscardsFlags ~~> (_.tail),
|
||||
(OverwritesC & Elidable) ~ (LinearOrLabel & Not(ReadsC) & Not(DiscardsC)).* ~ DiscardsC ~~> (_.tail),
|
||||
(OverwritesD & Elidable) ~ (LinearOrLabel & Not(ReadsD) & Not(DiscardsD)).* ~ DiscardsD ~~> (_.tail),
|
||||
(OverwritesV & Elidable) ~ (LinearOrLabel & Not(ReadsV) & Not(DiscardsV)).* ~ DiscardsV ~~> (_.tail)
|
||||
(OverwritesC & Elidable & Not(ChangesStack)) ~ (LinearOrLabel & Not(ReadsC) & Not(DiscardsC)).* ~ DiscardsC ~~> (_.tail),
|
||||
(OverwritesD & Elidable & Not(ChangesStack)) ~ (LinearOrLabel & Not(ReadsD) & Not(DiscardsD)).* ~ DiscardsD ~~> (_.tail),
|
||||
(OverwritesV & Elidable & Not(ChangesStack)) ~ (LinearOrLabel & Not(ReadsV) & Not(DiscardsV)).* ~ DiscardsV ~~> (_.tail)
|
||||
)
|
||||
|
||||
// Optimizing Bxx to JMP is generally bad, but it may allow for better optimizations later
|
||||
|
Loading…
x
Reference in New Issue
Block a user