This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello,
I came across a function renaming issue in GCC 4.4.
~/work/install-x86/bin/gcc -Wall -Winline -O3 -g -D_FILE_OFFSET_BITS=64 -save-temps -c bzip2.c -fdump-tree-all
Function saveInputFileMetaInfo is renamed to T.251 after ipa passes, which are not dumped into intermediate files. So compare bzip2.c.038t.release_ssa and bzip2.c.049t.copyrename2 file,
;; Function saveInputFileMetaInfo (saveInputFileMetaInfo)
Released 3 names, 50.00%
saveInputFileMetaInfo (Char * srcName)
{
IntNative retVal;
<bb 2>:
retVal_4 = __xstat (1, srcName_1(D), &fileMetaInfo);
if (retVal_4 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
ioError ();
<bb 4>:
return;
}
becomes
;; Function T.251 (T.251)
T.251 ()
{
IntNative retVal;
<bb 2>:
retVal_1 = __xstat (1, &inName, &fileMetaInfo);
if (retVal_1 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
ioError ();
<bb 4>:
return;
}
The renamed function stays afterwards. My understanding is that ipa-cp pass did copy-propagation of the original function but still somehow create a clone as suggested bzip2.c.203t.statistics.
bzip2.c.203t.statistics:35 copyprop "Copies propagated" "saveInputFileMetaInfo" 1
bzip2.c.203t.statistics:35 copyprop "Statements deleted" "saveInputFileMetaInfo" 3
This seems unnecessary and causes trouble in our profiling/debugging tools. I could diable this by using -fno-ipa-cp. But is there any better way? Thanks in advance
Cheers,
Bingfeng Mei
Boradcom UKAttachment:
bzip2.c;size=58665;creation-date="Tue,
Description: bzip2.c
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |