GET_MODE_SIZE always does an array lookup.  This is inefficient for mode
constants; in this case, it would be better to compare for equality for each
mode and then decide on the actual size.  When workingh with mode macros, this
would allow conditionals to be folded to 0 or 1, and thus save both compiler
code
size and compilation time.


-- 
           Summary: GET_MODE_SIZE is inefficient for constants
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36109

Reply via email to