diff options
author | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-11 17:41:24 +0000 |
---|---|---|
committer | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-11 17:41:24 +0000 |
commit | 09a175857d1d874775dcd00100214ece4945d9bb (patch) | |
tree | 4b63d698c47af01f476f8ddd1376746e9309a913 /gcc/targhooks.c | |
parent | 23423d0e7757b04c88648fa3fd964ce8f61477e1 (diff) | |
download | gcc-09a175857d1d874775dcd00100214ece4945d9bb.tar.gz |
* target.def (preferred_reload_class): New hook.
* doc/tm.texi.in (TARGET_PREFERRED_RELOAD_CLASS): Document.
* doc/tm.texi: Regenerate.
* targhooks.c (default_preferred_reload_class): New function.
* targhooks.h (default_preferred_reload_class): Declare.
* reload.c (find_dummy_reload): Change preferred_class variable type
from enum reg_class to reg_class_t. Use TARGET_PREFERRED_RELOAD_CLASS
target hook.
(find_reloads): Change goal_alternative array type from int to
reg_class_t. Use TARGET_PREFERRED_RELOAD_CLASS target hook.
(push_reload, find_reloads_address_part): Use
TARGET_PREFERRED_RELOAD_CLASS target hook.
* reload1.c (emit_input_reload_insns): Ditto.
* ira-costs.c (copy_cost): Use TARGET_PREFERRED_RELOAD_CLASS target
hook. Change rclass argument and secondary_class variable types from
'enum reg_class' to reg_class_t.
* config/i386/i386.h (PREFERRED_RELOAD_CLASS): Remove.
* config/i386/i386-protos (ix86_preferred_reload_class): Remove.
* config/i386/i386.c (ix86_preferred_reload_class): Make static.
Change regclass argument and result types from enum reg_class to
reg_class_t.
(TARGET_PREFERRED_RELOAD_CLASS): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165321 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 9d7ebc0a474..7a3dda3241b 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -1230,6 +1230,19 @@ default_profile_before_prologue (void) #endif } +/* The default implementation of TARGET_PREFERRED_RELOAD_CLASS. */ + +reg_class_t +default_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, + reg_class_t rclass) +{ +#ifdef PREFERRED_RELOAD_CLASS + return (reg_class_t) PREFERRED_RELOAD_CLASS (x, (enum reg_class) rclass); +#else + return rclass; +#endif +} + /* The default implementation of TARGET_CLASS_LIKELY_SPILLED_P. */ bool |