diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2020-04-16 20:23:35 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2020-04-20 13:30:03 +0200 |
commit | 438d541dbe5fe7d7fe6b7aacaa6e6ef070c2e237 (patch) | |
tree | f2ca20b3130b302bdaf3841d6105c8138dd48583 /backend/IRC.ml | |
parent | 0a2db0269809539ccc66f8ec73637c37fbd23580 (diff) | |
download | compcert-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.ml | 4 |
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 |