[interp] Add constant propagation of integers (mono/mono#17326)
* [interp] Make StackValue more intuitive
Replace the opcode field with an enum which will represent what type of value is contained (STACK_VALUE_LOCAL, STACK_VALUE_I4 etc)
* [interp] Add the mint type to the local data
Makes the emitting code easier and we no longer compute the mint type for each local access, which is fairly expensive.
* [interp] Handle indirect locals saner during cprop
Instead of checking for the indirect flag when loading from a local, simply never store a StackValue into such a local since we can't use it. We use the same logic when not pushing on the stack values for such locals.
* [interp] Add constant folding for integers
We decode the values from LDC_I4 and LDC_I8 opcodes and track/propagate the values on the stack and in the locals using the existing infrastructure. When loading a local, we try to load using the known constant value instead, so we might get to kill that local.
* [interp] Similar to stloc.np we can optimize pop/push pairs
If the pushing instruction pushes the same value that was popped by the previous instruction, we can kill them both
* [tests] Remove issue that seems to have been fixed for a while
Commit migrated from https://github.com/mono/mono/commit/
0aabccef9bf6f17313fa384349a8089e8d8b0642