jasmin icon indicating copy to clipboard operation
jasmin copied to clipboard

-pliveness can be too late

Open eponier opened this issue 1 year ago • 4 comments

It can happen that reg alloc fails before the printing of liveness, making it hard to debug. For instance, it happens for the code here.

EDIT: I changed "crashes" with "fails", it corresponds more to what happens

eponier avatar Jun 21 '24 13:06 eponier

Can you please elaborate? What is the error in that case?

vbgl avatar Jun 21 '24 13:06 vbgl

compilation error:
register allocation: conflicting variables “pstate.12972” and “a.9970” must be merged due to:
...

eponier avatar Jun 21 '24 13:06 eponier

Before the call to greedy_allocation, there are multiple collect_conflict functions (opn, intra-procedural, return address, inter-procedural, syscalls). If it fails in one of these functions, the liveness info is not printed.

eponier avatar Jun 21 '24 13:06 eponier

In the particular example, do you really think that liveness information can help fixing the issue?

However, I do agree that it would be nice to be able to access the liveness information even if there are other issues.

It might be worth collecting all errors that might be trigger by those “collect conflict” functions and print them all together after the printing of the liveness information.

vbgl avatar Jun 24 '24 08:06 vbgl