<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--@font-face
{体}
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal;
font-family:Arial;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1261912608;
mso-list-type:hybrid;
mso-list-template-ids:-2133156072 172546850 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:18.0pt;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
</head>
<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=Section1 style='layout-grid:15.6pt'>
<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'>Nobody give comments on
this?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'>Is the source to source
transformation of LLVM robust enough?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'>Thanks in advance.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'>Shengmei<o:p></o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal align=left style='text-align:left'><font size=2 face=宋体><span
lang=EN-US style='font-size:10.0pt;font-family:SimSun'>Problems of source to
source transformation of LLVM</span></font><font size=3><span lang=EN-US
style='font-size:12.0pt'><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal align=left style='text-align:left'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>Hi, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'> I did experiments
of the source transformation of LLVM on SPEC2000 C programs. But I found most
benchmarks can’t be<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>transformed from source to source successfully. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>The steps are as follows.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'><span
style='mso-list:Ignore'>1.<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><span
lang=EN-US>I write a script to transform every .c file into .bc file, and then
use llc to transform .bc file to .c files.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>I don’t
know if there are any method to transform many .c files into one .bc file and
then transform the .bc file into one .c file.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>If there are
any good method, pls tell me</span></font><font face=Wingdings><span
lang=EN-US style='font-family:Wingdings'>J</span></font><span lang=EN-US>. The
scripts are as follows.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>--------<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:18.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>for file in
*.c<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'> do<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>
echo $file...<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>
llvm-gcc -O3 -emit-llvm $file -c -o $file.bc<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>
llc -march=c $file.bc -o $file<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>
rm $file.bc<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'> done<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'> ----------------<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'><span
style='mso-list:Ignore'>2.<font size=1 face="Times New Roman"><span
style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><span
lang=EN-US>Then I use GCC –O3 to compile the new source .c files.<o:p></o:p></span></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>The problems occur when doing the source to source
transformation. I listed some error messages as follows.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal align=left style='margin-left:10.5pt;text-align:left;
text-indent:-10.5pt;text-autospace:none'><u><font size=2 face="Times New Roman"><span
lang=EN-US style='font-size:10.5pt'>1. 164.gzip<o:p></o:p></span></font></u></p>
<p class=MsoNormal align=left style='margin-left:9.05pt;mso-para-margin-left:
.86gd;text-align:left;text-indent:5.25pt;text-autospace:none'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>LLVM ERROR: The
C backend does not currently support integer types of widths other than 1, 8,
16, 32, 64.<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-indent:10.5pt;
text-autospace:none'><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>This is being tracked as PR 4158.<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><u><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>2.
253.perlbmk<o:p></o:p></span></font></u></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>MD5.c...<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>In file
included from perl.h:1276,<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>
from MD5.c:28:<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>cop.h:217:
error: expected specifier-qualifier-list before 'bool'<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><u><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>3.
255.gap<o:p></o:p></span></font></u></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>oa1.c:
In function 'OaCompare':<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>oa1.c:1714:
error: duplicate case value<o:p></o:p></span></font></p>
<p class=MsoNormal align=left style='text-align:left;text-autospace:none'><font
size=2 face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>oa1.c:1705:
error: previously used here<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='line-height:12.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>Can anyone
give help? Thanks very much in advance.<o:p></o:p></span></font></p>
<p class=MsoNormal style='line-height:12.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='line-height:12.0pt'><font size=2
face="Times New Roman"><span lang=EN-US style='font-size:10.5pt'>Shengmei<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>