File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: c3c3e03649130d3f4d7f92f01e92d7903f9d9da3
2
+ refs/heads/master: ee04c0236c731a1ca3f3a885c16bce5e1ae0a72d
Original file line number Diff line number Diff line change @@ -563,7 +563,20 @@ let reg_alloc
563
563
let clobbers = cx.ctxt_abi.Abi. abi_clobbers quad in
564
564
let used = quad_used_vregs quad in
565
565
let defined = quad_defined_vregs quad in
566
+
567
+ let vreg_constrs v = (v, Bits. to_list (vreg_constraints.(v))) in
568
+ let used_constrs = List. map vreg_constrs used in
569
+ let constrs_collide (v1 ,c1 ) =
570
+ if List. length c1 <> 1
571
+ then false
572
+ else
573
+ List. exists
574
+ (fun (v2 ,c2 ) -> if v1 = v2 then false else c1 = c2)
575
+ used_constrs
576
+ in
566
577
begin
578
+ if List. exists constrs_collide used_constrs
579
+ then raise (Ra_error (" over-constrained vregs" ));
567
580
if List. exists (fun def -> List. mem def clobbers) defined
568
581
then raise (Ra_error (" clobber and defined sets overlap" ));
569
582
iflog cx
@@ -629,7 +642,7 @@ let reg_alloc
629
642
630
643
with
631
644
Ra_error s ->
632
- Session. fail sess " RA Error : %s" s;
645
+ Session. fail sess " RA error : %s\n " s;
633
646
(quads, 0 )
634
647
635
648
;;
You can’t perform that action at this time.
0 commit comments