Add a combined_fn enum
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 17 Nov 2015 18:34:47 +0000 (18:34 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 17 Nov 2015 18:34:47 +0000 (18:34 +0000)
commit00175cb22a6ec9029f64044a9665c7390d53e5f6
treeb256b1ce82752ff2bfe63d20fcfd0cc3bdde69f8
parent3e44547c936be9e741411e812fc1565f539641c1
Add a combined_fn enum

I'm working on a patch series that needs to be able to treat built-in
functions and internal functions in a similar way.  This patch adds a
new enum, combined_fn, that combines the two together.  It also adds
utility functions for seeing which combined_fn (if any) is called by
a given CALL_EXPR or gcall.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* tree-core.h (internal_fn): Move immediately after the definition
of built_in_function.
(combined_fn): New enum.
* tree.h (as_combined_fn, builtin_fn_p, as_builtin_fn)
(internal_fn_p, as_internal_fn): New functions.
(get_call_combined_fn, combined_fn_name): Declare.
* tree.c (get_call_combined_fn): New function.
(combined_fn_name): Likewise.
* gimple.h (gimple_call_combined_fn): Declare.
* gimple.c (gimple_call_combined_fn): New function.

From-SVN: r230472
gcc/ChangeLog
gcc/gimple.c
gcc/gimple.h
gcc/tree-core.h
gcc/tree.c
gcc/tree.h