Profiling on S390
Richard Henderson
rth@redhat.com
Wed Apr 23 19:56:00 GMT 2003
On Wed, Apr 23, 2003 at 08:50:15PM +0200, Jan Hubicka wrote:
> Perhaps, but Zdenek already has come code to measure extra stuff (like
> value ranges) that do other thinks than plain add. How would one
> accomplish that?
Hum. Perhaps
(1) Do life analysis to verify something's live across here. Here we
only have to check hard registers, and then we only have to care
about those with
GET_MODE_CLASS (reg_raw_mode[i]) == MODE_CC.
In the vast majority of cases, no such will be live, so we can
avoid extra work.
(2) Generate the code sequence for the edge. Examine it to see if
the flags register is actually killed. If not, do nothing.
Should help Sparc-like targets that have fine-grained control
over the setting of the flags register.
(3) Locate the (a) set that causes the flags register(s) to be live.
Remember the mode of the register, and we'll use gen_move_insn to
save/restore the value to a pseudo. If AVOID_CCMODE_COPIES, abort;
either the machine description or an optimizer is incorrect.
There are probably targets for which either AVOID_CCMODE_COPIES
or CCmode move support is missing.
Document that AVOID_CCMODE_COPIES implies that the flags register
cannot be live across basic blocks.
r~
More information about the Gcc
mailing list