arocc icon indicating copy to clipboard operation
arocc copied to clipboard

Store values for initializer nodes?

Open ehaas opened this issue 1 year ago • 1 comments

I started working on an assembly backend and one thing I ran into is needing the value of initializer nodes that are the result of an expression. For example given the following (x is global):

int x = 2 + 2;

I want to be able to get the initializer value of 4 without having to recompute it in the backend. As things currently work I think I'd have to recompute it, unless I'm missing something.

ehaas avatar Oct 05 '24 21:10 ehaas

I don't remember any reason not to store the value and would have expected it to already be done. At least changing it is easy.

Vexu avatar Oct 06 '24 00:10 Vexu