[Bug tree-optimization/17616] New: Micro-optimize tree_code_class
kazu at cs dot umass dot edu
gcc-bugzilla@gcc.gnu.org
Wed Sep 22 18:54:00 GMT 2004
We can put IS_EXPR_CODE_CLASS items first in tree_code_class so that
IS_EXPR_CODE_CLASS can be implemented with a single assembly instruction.
That is, the suggested order would be
tcc_reference, /* A reference to storage. */
tcc_comparison, /* A comparison expression. */
tcc_unary, /* A unary arithmetic expression. */
tcc_binary, /* A binary arithmetic expression. */
tcc_statement, /* A statement expression, which have side effects
but usually no interesting value. */
tcc_expression, /* Any other expression. */
tcc_exceptional, /* An exceptional code (fits no category). */
tcc_constant, /* A constant. */
tcc_type, /* A type object code. */
tcc_declaration /* A declaration (also serving as variable refs). */
Currently, IS_EXPR_CODE_CLASS is effectively implemented as (CLASS - 4) <= 5.
After reordering, we can do CLASS <= 5.
--
Summary: Micro-optimize tree_code_class
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17616
More information about the Gcc-bugs
mailing list