arocc
arocc copied to clipboard
Store values for initializer nodes?
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.
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.