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 new target-hook truncated_to_mode


Adam Nemet wrote:



But what is the actual reason why you think that it makes sense to put
the reg_class information into the hook and not just use it from
CANNOT_CHANGE_MODE_CLASS. I.e. why can't we just say that before
register allocation you just check the new hook to see whether the
SIGN_EXTEND is a no-op but after register allocation you also check
CANNOT_CHANGE_MODE_CLASS along with it?


You should not be required to make CANNOT_CHANGE_MODE_CLASS
return nonzero for these cases. Access of vector elements and union fields
is done with integer modes, if floating point registers do not allow such
accesses of sub-fields, very inefficient code is generated, or you might even
get spill failures.



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