diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-29 15:47:54 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-29 15:47:54 +0000 |
commit | 81bdf64f2035b8979549fc533915ea17d429dc9f (patch) | |
tree | 69e2b47b22500339535d6f5f37e3fca2350d4f3a /gcc/targhooks.c | |
parent | 7f1c23c2e7981438c251121d85cf5d807b9a4f5d (diff) | |
download | gcc-81bdf64f2035b8979549fc533915ea17d429dc9f.tar.gz |
2008-07-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r138226 [after tuple merge into trunk]
some compiler probe stuff are missing
* gcc/compiler-probe.h: more gimple, less tree
* gcc/compiler-probe.c: incomplete merge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@138247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 4064ad47411..4e9b9ad0675 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -709,4 +709,38 @@ default_hard_regno_scratch_ok (unsigned int regno ATTRIBUTE_UNUSED) return true; } +bool +default_target_option_valid_attribute_p (tree ARG_UNUSED (fndecl), + tree ARG_UNUSED (name), + tree ARG_UNUSED (args), + int ARG_UNUSED (flags)) +{ + return false; +} + +bool +default_target_option_can_inline_p (tree caller, tree callee) +{ + bool ret = false; + tree callee_opts = DECL_FUNCTION_SPECIFIC_TARGET (callee); + tree caller_opts = DECL_FUNCTION_SPECIFIC_TARGET (caller); + + /* If callee has no option attributes, then it is ok to inline */ + if (!callee_opts) + ret = true; + + /* If caller has no option attributes, but callee does then it is not ok to + inline */ + else if (!caller_opts) + ret = false; + + /* If both caller and callee have attributes, assume that if the pointer is + different, the the two functions have different target options since + build_target_option_node uses a hash table for the options. */ + else + ret = (callee_opts == caller_opts); + + return ret; +} + #include "gt-targhooks.h" |