3 ms·
> compilers only emit flag testing instructions after instructions that are explicitly defined as having flag-modifying semantics. I think compiler writers som
by Someone 4y ago
> compilers only emit flag testing instructions after instructions that are explicitly defined as having flag-modifying semantics.
I think compiler writers sometimes also have to know that instructions do not modify the flags.
Such instructions can be inserted between flag-setting ones and the test of that flag.
- woodruffw 4y agoYes, good point! It would have been more accurate for me to say “the compiler should always have a model of the flags during lowering.”