aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Regalloc.ml
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-09-20 13:17:50 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-09-20 13:17:50 +0000
commit719d2c04a005714b3a1a1e838ffc653d65da662b (patch)
tree997d32925c5dbf0015c217897155a164b005813e /backend/Regalloc.ml
parent76ea1108be6f8b4ba9dc0118a13f685bcb62bc2b (diff)
downloadcompcert-kvx-719d2c04a005714b3a1a1e838ffc653d65da662b.tar.gz
compcert-kvx-719d2c04a005714b3a1a1e838ffc653d65da662b.zip
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
Diffstat (limited to 'backend/Regalloc.ml')
-rw-r--r--backend/Regalloc.ml8
1 files changed, 4 insertions, 4 deletions
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