PATCH to lookup_label

Per Bothner per@bothner.com
Mon Jun 13 19:54:00 GMT 2005


I checked the attached patch into mainline.

The function lookup_label generates a LABEL_DECL from a bytecode offset.
It used to do this by mapping a bytecode offset to an identifier
"LJpc=NNN" where NNN is the bytecode offset (pc).  Unfortunately,
different methods may need different labels at the same offset.
This causes confusion - at least when inlining is done.  I fixed
the problem by instead generating (informally) "LJpc=MMMNNN" where
MMM is counter that is incremented for each new method.  This
assumes that all calls to lookup_label for a given method happen
before we call expand_byte_code for the next method.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lookup_label.patch
Type: text/x-patch
Size: 3195 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050613/55a4265b/attachment.bin>


More information about the Gcc-patches mailing list