public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) @ 2004-09-22 19:06 kazu at cs dot umass dot edu 2004-09-22 21:17 ` [Bug tree-optimization/17617] " pinskia at gcc dot gnu dot org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: kazu at cs dot umass dot edu @ 2004-09-22 19:06 UTC (permalink / raw) To: gcc-bugs We can reorder some tree codes in tree.def so that the four codes accepted by INTEGRAL_TYPE_P are all sequential. That way, fold() will convert INTEGRAL_TYPE_P into a range comparison. -- Summary: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 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=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/17617] Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu @ 2004-09-22 21:17 ` pinskia at gcc dot gnu dot org 2004-12-20 17:08 ` bangerth at dealii dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-09-22 21:17 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-22 21:17 ------- Confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |compile-time-hog Last reconfirmed|0000-00-00 00:00:00 |2004-09-22 21:17:04 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/17617] Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu 2004-09-22 21:17 ` [Bug tree-optimization/17617] " pinskia at gcc dot gnu dot org @ 2004-12-20 17:08 ` bangerth at dealii dot org 2004-12-20 17:15 ` bangerth at dealii dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bangerth at dealii dot org @ 2004-12-20 17:08 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-12-20 17:08 ------- A patch (with following long discussion) has been proposed here: http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01495.html W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/17617] Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu 2004-09-22 21:17 ` [Bug tree-optimization/17617] " pinskia at gcc dot gnu dot org 2004-12-20 17:08 ` bangerth at dealii dot org @ 2004-12-20 17:15 ` bangerth at dealii dot org 2004-12-21 17:42 ` nathan at gcc dot gnu dot org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bangerth at dealii dot org @ 2004-12-20 17:15 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-12-20 17:14 ------- The question raised in several of the messages in that discussion is whether an enumeration of equality checks is converted into a range check if the tested values are consecutive. Here is the answer: -------------------- enum E { eins = 1, zwei = 2, drei = 3, vier = 4, fuenf= 5, sechs= 6 }; bool test_range (E e) { return e==drei || e==vier || e==fuenf; } ------------------------ This is indeed compiled into a range check: _Z10test_range1E: pushl %ebp movl %esp, %ebp movl 8(%ebp), %eax popl %ebp subl $3, %eax cmpl $2, %eax setbe %al movzbl %al, %eax ret W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/17617] Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu ` (2 preceding siblings ...) 2004-12-20 17:15 ` bangerth at dealii dot org @ 2004-12-21 17:42 ` nathan at gcc dot gnu dot org 2004-12-21 17:43 ` nathan at gcc dot gnu dot org 2005-01-07 14:15 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: nathan at gcc dot gnu dot org @ 2004-12-21 17:42 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/17617] Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu ` (3 preceding siblings ...) 2004-12-21 17:42 ` nathan at gcc dot gnu dot org @ 2004-12-21 17:43 ` nathan at gcc dot gnu dot org 2005-01-07 14:15 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: nathan at gcc dot gnu dot org @ 2004-12-21 17:43 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From nathan at gcc dot gnu dot org 2004-12-21 17:43 ------- 2004-12-21 Nathan Sidwell <nathan@codesourcery.com> * system.c (IN_RANGE): Use plain unsigned, not unsigned HOST_WIDE_INT. * tree.def (VOID_TYPE, INTEGER_TYPE, REAL_TYPE, COMPLEX_TYPE, VECTOR_TYPE, OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, CHAR_TYPE, POINTER_TYPE, REFERENCE_TYPE, METHOD_TYPE, FUNCTION_TYPE, FILE_TYPE, ARRAY_TYPE, RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE): Reorder for better code efficiency. (CONST_DECL, TYPE_DECL, VAR_DECL, FIELD_DECL, PARM_DECL): Likewise. (INDIRECT_REF, ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF): Likewise. * tree.h (INDIRECT_REF_P): Reorder checks for better optimization. (IS_EXPR_CODE_CLASS): Use IN_RANGE. (INTEGRAL_TYPE_P, FLOAT_TYPE_P): Reorder checks for better optimization. * cp/cp-tree.def (TEMPLATE_TYPE_PARM, BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder for better code efficiency. * cp/cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check. (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization. (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P, INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P, CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P, TYPE_PTROBV_P): Likewise. -- What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/17617] Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu ` (4 preceding siblings ...) 2004-12-21 17:43 ` nathan at gcc dot gnu dot org @ 2005-01-07 14:15 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-01-07 14:15 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17617 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-01-07 14:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-09-22 19:06 [Bug tree-optimization/17617] New: Micro-optimize INTEGRAL_TYPE_P (or tree.def rather) kazu at cs dot umass dot edu 2004-09-22 21:17 ` [Bug tree-optimization/17617] " pinskia at gcc dot gnu dot org 2004-12-20 17:08 ` bangerth at dealii dot org 2004-12-20 17:15 ` bangerth at dealii dot org 2004-12-21 17:42 ` nathan at gcc dot gnu dot org 2004-12-21 17:43 ` nathan at gcc dot gnu dot org 2005-01-07 14:15 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).