aboutsummaryrefslogtreecommitdiffstats
path: root/backend/IRC.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2020-04-16 20:23:35 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2020-04-20 13:30:03 +0200
commit438d541dbe5fe7d7fe6b7aacaa6e6ef070c2e237 (patch)
treef2ca20b3130b302bdaf3841d6105c8138dd48583 /backend/IRC.ml
parent0a2db0269809539ccc66f8ec73637c37fbd23580 (diff)
downloadcompcert-kvx-438d541dbe5fe7d7fe6b7aacaa6e6ef070c2e237.tar.gz
compcert-kvx-438d541dbe5fe7d7fe6b7aacaa6e6ef070c2e237.zip
Move reserved_registers to CPragmas.
The list of reserved_registers is never reset between the compilation of multiple files. Instead of storing them in IRC they are moved in the CPragmas file and reset in the a new reset function for Cpragmas whic is called per file.
Diffstat (limited to 'backend/IRC.ml')
-rw-r--r--backend/IRC.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/backend/IRC.ml b/backend/IRC.ml
index b359da35..e94d6fbb 100644
--- a/backend/IRC.ml
+++ b/backend/IRC.ml
@@ -252,12 +252,10 @@ let class_of_loc = function
let no_spill_class = 2
-let reserved_registers = ref ([]: mreg list)
-
let rec remove_reserved = function
| [] -> []
| hd :: tl ->
- if List.mem hd !reserved_registers
+ if List.mem hd !CPragmas.reserved_registers
then remove_reserved tl
else hd :: remove_reserved tl