diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-30 20:30:38 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-30 20:30:38 +0000 |
commit | 4a2ca8f34c2b84bbd04eff0d22f97046dfbd0f07 (patch) | |
tree | 16088611f26652c55d7f6a9b476049876bd2cdc8 /gcc/target.def | |
parent | d544dcee0ea5bd120aff284df06e22cb1ba44b37 (diff) | |
download | gcc-4a2ca8f34c2b84bbd04eff0d22f97046dfbd0f07.tar.gz |
2013-05-30 Vladimir Makarov <vmakarov@redhat.com>
* target.def (register_usage_leveling_p): New hook.
* targhooks.c (default_register_usage_leveling_p): New.
* targhooks.h (default_register_usage_leveling_p): New prototype.
* lra-assigns.c (register_usage_leveling_p): Use the hook.
* doc/tm.texi.in (TARGET_REGISTER_USAGE_LEVELING_P): New hook.
* doc/tm.texi: Update.
* config/i386/i386.c (TARGET_REGISTER_USAGE_LEVELING_P): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.def')
-rw-r--r-- | gcc/target.def | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/target.def b/gcc/target.def index f4776a8df37..3ba3e0a2454 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2444,6 +2444,21 @@ DEFHOOK int, (int), default_register_priority) +/* Return true if we need register usage leveling. */ +DEFHOOK +(register_usage_leveling_p, + "A target hook which returns true if we need register usage leveling.\ + That means if a few hard registers are equally good for the\ + assignment, we choose the least used hard register. The register\ + usage leveling may be profitable for some targets. Don't use the\ + usage leveling for targets with conditional execution or targets\ + with big register files as it hurts if-conversion and cross-jumping\ + optimizations.\ + \ + The default version of this target hook returns always false.", + bool, (void), + default_register_usage_leveling_p) + /* Return true if maximal address displacement can be different. */ DEFHOOK (different_addr_displacement_p, |