On Tue, Jul 6, 2010 at 11:48 PM, Pengqi Cheng <chen...@gmail.com> wrote:

> Does anyone know how to use whirl2c/whirl2f to convert .B/.I files?
> I have tried that, but the result is like this: (errors are the same with
> -TARG:abi=32/64, or whirl2c_be)
>
> $ ./whirl2c ~/test/main.B
> "/home/open64/test/main.c": Error: Invalid format revision (abi of whirl
> file doesn't match abi from command-line) for intermediate compiler file
> (/home/open64/test/main.B)
> $ ./whirl2c ~/test/main.out.ipakeep/1.I
> "/home/open64/test/main.out.ipakeep/1.c": Error: Invalid format revision
> (abi of whirl file doesn't match abi from command-line) for intermediate
> compiler file (/home/open64/test/main.out.ipakeep/1.I)
>
> The code of main.c is : "int main(){}", complied with "opencc main.c -keep
> -ipa -o main.out".
> Could anyone give me some help? Thanks!
>
> It seems that whirl2c is broken. I also met the same error as yours on
32bit machine, but on 64bit, it is right. I only tried 4.2.3 branch.

Tianwei


>
> 2010/7/7 Gautam Chakrabarti <gautam.c...@yahoo.com>
>
> For control on generating the .I files from IPA, you can look at
>> ipa/common/ipc_bwrite.cxx (start from IP_WRITE_pu()). Basically by default,
>> it starts emitting PUs into a .I file, until the file size exceeds a
>> predefined limit, then it moves on to the next .I file.
>>  If you are looking for matching .I file for input files, you can use the
>> option -IPA:source_pu_order=on.
>>
>> Gautam
>>
>>  ------------------------------
>> *From:* Sun Chan <sun.c...@gmail.com>
>> *To:* Tianwei <tianwei.sh...@gmail.com>
>> *Cc:* Li Shengmei <lis...@gmail.com>; open64-devel@lists.sourceforge.net
>> *Sent:* Tue, July 6, 2010 1:55:14 AM
>> *Subject:* Re: [Open64-devel] The debug and generation of .I files during
>> IPA??
>>
>> you can also use whirl2c, whirl2f... to convert the .I files back to
>> .c/c++/f files for easier reading and debugging.
>> Sun
>>
>> On Tue, Jul 6, 2010 at 4:51 PM, Tianwei <tianwei.sh...@gmail.com> wrote:
>>
>>>
>>>
>>>  On Tue, Jul 6, 2010 at 4:17 PM, Li Shengmei <lis...@gmail.com> wrote:
>>>
>>>> Hi,all
>>>>        I want to know how the .I files which are generated during IPA.
>>>> The
>>>> debug document of IPA is "TBD" in the doc of Open64.
>>>>        Does anyone know the generation of .I files or give some
>>>> suggestions
>>>> about studying it?
>>>>        What is the principle of generating .I files? How can I control
>>>> the
>>>> generation?
>>>>
>>>> Basically, you can use "-show -keep" to see the process, and finally you
>>> will find a temporal directory, such as:
>>> a.out.ipakeep directory where it will store all the .I fines, also the
>>> symbol table information.
>>>
>>> For the .I files, in IPO transformation phase, it will be divided into
>>> two phases:
>>> 1. apply the transformation phase, generated the transformed IR, i.e .I
>>> files, also perform the alias analysis
>>> 2. after the transformation phase,  it will annotate the alias analysis
>>> result into the IR, the original .I files will be renamed into I.save
>>> and annotated IR will be the final .I files.
>>>
>>> for the debugging,
>>> you can debug the ipa_link directly, for example:
>>>  (gdb) file ipa_link
>>> Load new symbol table from
>>> "/home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64-open64-linux/4.2.3/ipa_link"?
>>> (y or n) y
>>> Reading symbols from
>>> /home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64-open64-linux/4.2.3/ipa_link...done.
>>> (gdb) b Perform_Interprocedural_Analysis
>>> Note: breakpoint 2 also set at pc 0x4c523f.
>>> Breakpoint 3 at 0x4c523f: file ../../ipa/main/analyze/ipa_main.cxx, line
>>> 267.
>>> (gdb) r
>>>  
>>> -INTERNAL:old_ld_lib_path="/home/tianwei/sdracer-vm/install//lib/gcc-lib/x86_64-open64-linux/4.2.3/;/home/tianwei/sdracer-vm/install//lib/gcc-lib/x\
>>> 86_64-open64-linux/4.2.3/;;/home/tianwei/sdracer-vm/install/bin/../i686-pc-linux-gnu/x86_32-linux/lib"
>>> -L/home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64\
>>> -open64-linux/4.2.3/32
>>> -Wl,-rpath,/home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> -Wl,-rpath-link,/home/tianwei/sdracer-vm/install\
>>> /lib/gcc-lib/x86_64-open64-linux/4.2.3/32 -INTERNAL:lang=C -keep
>>> -IPA:new_dsa=1 -IPA:dsa_fs=1 -IPA:svi=1 -m32 -m elf_i386
>>> -L/home/tianwei/sdracer-vm/install\
>>> /open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/
>>> -Wl,-rpath,/home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/\
>>> 4.2.0/
>>> -Wl,-rpath-link,/home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/
>>> -L/usr/lib/../lib/ -Wl,-rpath-link,/usr/l\
>>> ib/../lib/
>>> -L/home/tianwei/sdracer-vm/install///lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> -Wl,-rpath,/home/tianwei/sdracer-vm/install///lib/gcc-lib/x86_64-op\
>>> en64-linux/4.2.3/32
>>> -Wl,-rpath-link,/home/tianwei/sdracer-vm/install///lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> /usr/lib/../lib/crt1.o /usr/lib/../lib/crti.\
>>> o
>>> /home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/crtbegin.o
>>> -o test test.o -lpthread -lrace -lopen64rt -lgcc -lc\
>>>  -lgcc
>>> /home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/crtend.o
>>> /usr/lib/../lib/crtn.o
>>> Starting program:
>>> /home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64-open64-linux/4.2.3/ipa_link
>>> -INTERNAL:old_ld_lib_path="/home/tianwei/sdracer-vm/instal\
>>>
>>> l//lib/gcc-lib/x86_64-open64-linux/4.2.3/;/home/tianwei/sdracer-vm/install//lib/gcc-lib/x86_64-open64-linux/4.2.3/;;/home/tianwei/sdracer-vm/install/bin/../\
>>> i686-pc-linux-gnu/x86_32-linux/lib"
>>> -L/home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> -Wl,-rpath,/home/tianwei/sdracer-vm/install/\
>>> lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> -Wl,-rpath-link,/home/tianwei/sdracer-vm/install/lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> -INTERNAL:lang=C -keep -I\
>>> PA:new_dsa=1 -IPA:dsa_fs=1 -IPA:svi=1 -m32 -m elf_i386
>>> -L/home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/
>>> -Wl,-rp\
>>> ath,/home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/
>>> -Wl,-rpath-link,/home/tianwei/sdracer-vm/install/open64-gcc-\
>>> 4.2.0/bin/../lib/gcc/x86_64-redhat-linux/4.2.0/ -L/usr/lib/../lib/
>>> -Wl,-rpath-link,/usr/lib/../lib/
>>> -L/home/tianwei/sdracer-vm/install///lib/gcc-lib/x86_64-\
>>> open64-linux/4.2.3/32
>>> -Wl,-rpath,/home/tianwei/sdracer-vm/install///lib/gcc-lib/x86_64-open64-linux/4.2.3/32
>>> -Wl,-rpath-link,/home/tianwei/sdracer-vm/instal\
>>> l///lib/gcc-lib/x86_64-open64-linux/4.2.3/32 /usr/lib/../lib/crt1.o
>>> /usr/lib/../lib/crti.o
>>> /home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib/gcc/\
>>> x86_64-redhat-linux/4.2.0/crtbegin.o -o test test.o -lpthread -lrace
>>> -lopen64rt -lgcc -lc -lgcc
>>> /home/tianwei/sdracer-vm/install/open64-gcc-4.2.0/bin/../lib\
>>> /gcc/x86_64-redhat-linux/4.2.0/crtend.o /usr/lib/../lib/crtn.o
>>>
>>> Breakpoint 2, Perform_Interprocedural_Analysis () at
>>> ../../ipa/main/analyze/ipa_main.cxx:267
>>>
>>> Note that you need to add " " to wrapper around the old_ld_lib_path.
>>>
>>>
>>> you can use gdb to see how the IPO generate the .I files.
>>>
>>> Tianwei
>>>
>>>> Thanks a lot,
>>>> May
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.net <http://sf.net/> email is sponsored by Sprint
>>>> What will you do first with EVO, the first 4G phone?
>>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>>>> _______________________________________________
>>>> Open64-devel mailing list
>>>> Open64-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/open64-devel
>>>>
>>>
>>>
>>>
>>> --
>>> Sheng, Tianwei
>>> Inst. of High Performance Computing
>>> Dept. of Computer Sci. & Tech.
>>> Tsinghua Univ.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by Sprint
>>> What will you do first with EVO, the first 4G phone?
>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>>> _______________________________________________
>>> Open64-devel mailing list
>>> Open64-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/open64-devel
>>>
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> Open64-devel mailing list
>> Open64-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/open64-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
>


-- 
Sheng, Tianwei
Inst. of High Performance Computing
Dept. of Computer Sci. & Tech.
Tsinghua Univ.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to