This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17616] New: Micro-optimize tree_code_class
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2004 18:54:50 -0000
- Subject: [Bug tree-optimization/17616] New: Micro-optimize tree_code_class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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