[Bug c/23830] New: inline optimization possibility - reorder compilation step
Atif dot Hussain at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 12 04:47:00 GMT 2005
subj: For functions specified inline, decision to inline them should be based on
inlined code size instead of un-inlined function length.
Here is a simple snippet of a larger complex.
inline int changePrecision(int x, int x_prec, int y_prec) {
if (y_prec>x_prec) return (x<<(y_prec-x_prec));
else
if (y_prec<x_prec) return (x>>(x_prec-y_prec));
else
return k;
}
which is intended to be called with constants x_prec & y_prec.
This code though assigned inline (it would be 0 or 1 cycles) is
first created into a function, observed to be long enough, and not inlined.
--
Summary: inline optimization possibility - reorder compilation
step
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Atif dot Hussain at gmail dot com
CC: Atif dot Hussain at gmail dot com,gcc-bugs at gcc dot
gnu dot org
GCC host triplet: frontend
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23830
More information about the Gcc-bugs
mailing list