Suppression de l'allocation dans la zone Incoming. Ce code semble ineffectif et potentiellement incorrect vis-a-vis du GC
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6592 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
e2df31285a
commit
6e982319a2
|
@ -208,26 +208,6 @@ let assign_location reg =
|
|||
start_register.(cl) <- (if start+1 >= num_regs then 0 else start+1)
|
||||
end else begin
|
||||
(* Sorry, we must put the pseudoreg in a stack location *)
|
||||
(* First, check if we have a preference for an incoming location
|
||||
we do not conflict with. *)
|
||||
let best_score = ref 0 and best_incoming_loc = ref (-1) in
|
||||
List.iter
|
||||
(fun (r, w) ->
|
||||
match r.loc with
|
||||
Stack(Incoming n) ->
|
||||
if w > !best_score
|
||||
&& List.for_all (fun neighbour -> neighbour.loc <> r.loc)
|
||||
reg.interf
|
||||
then begin
|
||||
best_score := w;
|
||||
best_incoming_loc := n
|
||||
end
|
||||
| _ -> ())
|
||||
reg.prefer;
|
||||
if !best_incoming_loc >= 0 then
|
||||
reg.loc <- Stack(Incoming !best_incoming_loc)
|
||||
else begin
|
||||
(* Now, look for a location in the local area *)
|
||||
let nslots = Proc.num_stack_slots.(cl) in
|
||||
let score = Array.create nslots 0 in
|
||||
(* Compute the scores as for registers *)
|
||||
|
@ -279,7 +259,6 @@ let assign_location reg =
|
|||
reg.loc <- Stack(Local nslots);
|
||||
Proc.num_stack_slots.(cl) <- nslots + 1
|
||||
end
|
||||
end
|
||||
end;
|
||||
(* Cancel the preferences of this register so that they don't influence
|
||||
transitively the allocation of registers that prefer this reg. *)
|
||||
|
|
Loading…
Reference in New Issue