This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Rename/export combine_insn_cost as insn_rtx_cost
- From: Roger Sayle <roger at eyesopen dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Jul 2004 22:12:31 -0600 (MDT)
- Subject: 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
--