From 719d2c04a005714b3a1a1e838ffc653d65da662b Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 20 Sep 2013 13:17:50 +0000 Subject: Small improvements in compilation times for the register allocation pass. Maps.v: add a PTree.fold1 operation that doesn't maintain the key. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2329 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- backend/Regalloc.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backend/Regalloc.ml') diff --git a/backend/Regalloc.ml b/backend/Regalloc.ml index b73cbf57..3c56b430 100644 --- a/backend/Regalloc.ml +++ b/backend/Regalloc.ml @@ -424,8 +424,8 @@ let spill_costs f = let charge_block blk = List.iter charge_instr blk in - PTree.fold - (fun () pc blk -> charge_block blk) + PTree.fold1 + (fun () blk -> charge_block blk) f.fn_code (); if !option_dalloctrace then begin fprintf !pp "------------------ Unspillable variables --------------@ @."; @@ -615,8 +615,8 @@ let rec tospill_block alloc blk ts = | instr :: blk' -> tospill_block alloc blk' (tospill_instr alloc instr ts) let tospill_function f alloc = - PTree.fold - (fun ts pc blk -> tospill_block alloc blk ts) + PTree.fold1 + (fun ts blk -> tospill_block alloc blk ts) f.fn_code VSet.empty -- cgit