This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36109] New: GET_MODE_SIZE is inefficient for constants
- From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2008 13:10:20 -0000
- Subject: [Bug middle-end/36109] New: GET_MODE_SIZE is inefficient for constants
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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