You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The rev8tab only contains indexing to that table, so it should be possible to prove that the array is not being modified. Of course that only holds, when assignment, slicing or addressing operator is not used.
If such table is replaced with a string, then the constant folding does work. However, that seems like an ugly hack to have.
If anyone wants to work on this, one way to approach it would be to mark the array symbol as readonly in the pre-SSA phase of the compiler (if you can prove it is in fact readonly). Then SSA optimizations for loading from readonly memory should kick in.