Make it cheaper to test whether an SSA name is a virtual operand
virtual_operand_p handled SSA names by looking at the flags of the
underlying variable. This seems to be a relatively common source
of cache misses, mainly because virtual_operand_p is the first thing
tested by is_gimple_reg.
This patch caches the information in the SSA name itself. Several
flags seem to be free so the patch arbitrarily uses public_flag.
Tested on aarch64-linux-gnu and x86_64-linux-gnu. It improves
compile time by a small (<1%) but reproducable amount on the
tests I've tried.
gcc/
* tree-core.h (tree_base): Document the meaning of public_flag
for SSA names.
* tree.h (SSA_NAME_IS_VIRTUAL_OPERAND): New macro.
(SET_SSA_NAME_VAR_OR_IDENTIFIER): Record whether the variable
is a virtual operand.
* gimple-expr.h (virtual_operand_p): Use SSA_NAME_IS_VIRTUAL_OPERAND.
From-SVN: r243916