Verified Commit edc3f533 authored by Camil Staps's avatar Camil Staps 🚀

Minor efficiency improvements for the ABC optimiser

parent 52af2ac1
Pipeline #23004 passed with stages
in 17 minutes and 31 seconds
......@@ -26,7 +26,7 @@ isBStackInstruction instr = case instr of
Ipop_b _ -> True
_ -> False
generic printInstruction a :: a -> String
generic printInstruction a :: !a -> String
printInstruction{|Int|} i = toString i
printInstruction{|Char|} c = printChar c
where
......
......@@ -34,14 +34,10 @@ optimise =
remove_comments
isCommutativeBStackInstruction :: !ABCInstruction -> Bool
isCommutativeBStackInstruction (IIns s) = isMember s
[ "eqC"
, "eqI"
, "eqB"
, "addI"
, "and%"
, "or%"
]
isCommutativeBStackInstruction (IIns s) =
s=="eqB" || s=="eqC" || s=="eqI" || s=="eqR" ||
s=="addI" ||
s=="and%" || s=="or%"
isCommutativeBStackInstruction _ = False
remove_comments :: ([ABCInstruction] -> [ABCInstruction])
......
......@@ -16,8 +16,8 @@ Global
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: True
DisableRTSFlags: True
MarkingCollector: False
DisableRTSFlags: False
StandardRuntimeEnv: True
Profile
Memory: False
......
......@@ -11,13 +11,13 @@ Global
HeapSize: 209715200
StackSize: 2048000
ExtraMemory: 8192
IntialHeapSize: 209715200
IntialHeapSize: 20971520
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: True
DisableRTSFlags: True
MarkingCollector: False
DisableRTSFlags: False
StandardRuntimeEnv: True
Profile
Memory: False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment