Ajout du smart allocator .... disfonctionnel

This commit is contained in:
2022-11-14 23:42:42 +01:00
parent 2c50bbaaa0
commit 0a8c02ec83
6 changed files with 174 additions and 24 deletions
-6
View File
@@ -29,12 +29,6 @@ class AllInMemAllocator(Allocator):
if(isinstance(arg, Temporary)):
after.append(RiscV.sd(subst[arg],self._fdata._pool.get_alloced_loc(arg)))
# TODO (Exercise 7): compute before,after,args.
# TODO (Exercise 7): iterate over old_args, check which argument
# TODO (Exercise 7): is a temporary (e.g. isinstance(..., Temporary)),
# TODO (Exercise 7): and if so, generate ld/sd accordingly. Replace the
# TODO (Exercise 7): temporary with S[1], S[2] or S[3] physical registers.
try:
new_instr = old_instr.substitute(subst)
except Exception: