Currently all ops are added to the ILOpHolder. Every instruction which is added there will be printed as a single statement in the resulting C code.
E.g.:
RzIlOpPure *op_ADD_0 = ADD(Rs, VARL("s"));
Especially for very short expressions this is not necessary. ADD(Rs, VARL("s") could also just be inlined.
# Like this
RzIlOpEffect *op_ASSIGN_1 = SETL("EA", ADD(Rs, VARL("s"));
# Instead of
RzIlOpEffect *op_ASSIGN_1 = SETL("EA", op_ADD_0);
To enable this we should add a flag to ILOpHolder.add_pure() to either add the pure to the "print as statement list" or don't do it.
Question is: When do we inline an op?
Currently all ops are added to the
ILOpHolder
. Every instruction which is added there will be printed as a single statement in the resulting C code.E.g.:
Especially for very short expressions this is not necessary.
ADD(Rs, VARL("s")
could also just be inlined.To enable this we should add a flag to
ILOpHolder.add_pure()
to either add the pure to the "print as statement list" or don't do it. Question is: When do we inline an op?