This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Rename/export combine_insn_cost as insn_rtx_cost


On Fri, 16 Jul 2004, Zack Weinberg wrote:
> Unfortunately, p6 *is* call-clobbered on ia64.  HP's acc (which can do
> this transformation) uses the call-saved p1 instead.  But if-conversion
> happens after register allocation, so there would be no way to get the
> register allocator to do that, unless I'm missing something?

Doh!  I checked just to be sure; all calls in ifcvt.c to the function
cond_exec_process_if_block are guarded by checks for reload_completed.

In theory, if-conversion could do some register shuffling if there were
some predicate registers that weren't live.  But otherwise, we're caught
in a catch-22 where we don't want reload to choose a call saved register,
unless it has to.  It might be possible to do some register renaming
in machine-dependent reorg, for example prefering, saving and restoring
p1 early on, and then in machine dependent reorg, rename the register
(swap p1/p6?) if no function calls have been conditionalized, cleaning
up the prolog/epilog.


It might conceivably be possible to run "type 1 if-conversion" before
register allocation, though I hate to think how much of reload (and
new-ra) would have to be audited for COND_EXEC safety.  Thoughts?


Perhaps other backend maintainers can think of an another fix?

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]