When is the hardware related register is allocated?
Joern Rennecke
amylaar@spamcop.net
Thu Nov 17 14:15:00 GMT 2011
Quoting Feng LI <nemokingdom@gmail.com>:
> So I suppose with (clobber (reg:CC FLAGS_REG)), the compiler
> will be capable to know this register will be modified in this
> instruction and
> apply proper behavior when necessary?
Depends. It will stop the compiler moving a FLAGS_REG setter and/or user
such that FLAGS_REG becomes live across your insn pattern.
But if you emit this pattern in a place where FLAGS_REG is already live
(e.g. when you generate it from some combiner pattern, or create it
via a split / peephole2 without FLAGS_REG clobber), there is a problem.
More information about the Gcc
mailing list