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] Add reg_truncated_to_mode to rtl_hooks


Paolo Bonzini writes:
> > + bool
> > + truncated_to_mode (enum machine_mode mode, rtx x)
> 
> This function is very small and will not be inlined.  Would you consider 
> inlining it manually into the sole place where it is used?

Actually, I am planning to change combine.c to use this function
instead of reg_truncated_to_mode.  I tried to add a generic enough
comment in front the function to suggest that I had plans further
expanding the implementation.  But I guess I should have mentioned it
more explicitly.  Anyway, I'd like to start experimenting with adding
a target hook and I imagined truncated_to_mode to be the place of
calling the hook.

The problem with TRUNCATEs is that for !TRULY_NOOP_TRUNCATION targets
for the bits outside of the destination machine mode it basically acts
like an UNSPEC.  I am hoping that if the target can expose when a
TRUNCATE is equivalent to a SUBREG the middle-end would be able to do
a much better job of eliminating unnecessary TRUNCATEs.

Thanks for your comments and the original patch,
Adam


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