<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><span dir="ltr" id=":43">I would like to create some tables for my instructions in the IR. For example a table that has all the store instructions.</span><br><span class="kn" title="tasoskalogero@gmail.com"></span><span dir="ltr" id=":3p">I want all the arguments to a function or instruction or constant etc to be trivial. <br>So to fix my previous example instead of having : <br></span><br><span dir="ltr" id=":3p"> call void @llvm.memcpy.i32(i8* %19, i8* getelementptr inbounds ([2 x [2
 x [3 x i8]]]* @main.s, i32 0, i32 0, i32 0, i32 0), i32 12, i32 1) <br>i would like to have in my IR the following :<br></span><br><span dir="ltr" id=":3p"><b>%temp</b> = <span style="line-height:22px;font-size:12pt;"> </span><span style="line-height:22px;font-size:12pt;">i8* getelementptr inbounds ([2 x [2 x [3 x i8]]]* @main.s, i32 0)<br></span></span><span dir="ltr" id=":3p"><span style="line-height:22px;font-size:12pt;"><b>%temp1</b> = <span style="line-height:22px;font-size:12pt;"> </span><span style="line-height:22px;font-size:12pt;">i8* getelementptr inbounds( <b>%temp</b>, i32 0)<br></span></span></span><span dir="ltr" id=":3p"><span style="line-height:22px;font-size:12pt;"><span style="line-height:22px;font-size:12pt;"><b>%temp2</b> = <span style="line-height:22px;font-size:12pt;"> </span><span style="line-height:22px;font-size:12pt;">i8* getelementptr inbounds (<b>%temp1</b>, i32 0)</span></span></span>                                                                                 <br></span><span dir="ltr" id=":3p"><span dir="ltr" id=":3p"><span dir="ltr" id=":3p"><span style="line-height:22px;font-size:12pt;"><span style="line-height:22px;font-size:12pt;"><b>%temp4</b> = <span style="line-height:22px;font-size:12pt;"> </span><span style="line-height:22px;font-size:12pt;">i8* getelementptr inbounds (<b>%temp3</b>, i32 0)</span></span></span> <br></span></span></span><br><span dir="ltr" id=":3p"><span dir="ltr" id=":3p"><span dir="ltr" id=":3p"><span dir="ltr" id=":3p">call void @llvm.memcpy.i32(i8* %19, i8* <b>%temp4,</b> i32 12, i32 1) </span>        <br><br>What i'm asking is, if LLVM can do this for me (for example with a certain flag while compiling the code) or i should break on my own these kind of expressions into simpler.      <br><br>                                                                  </span></span></span><div><hr id="stopSpelling"><br><br><div dir="ltr">Let me rephrase your question slightly. Would you be satisfied if the disassembled llvm format showed constant expressions on their own line, without turning them into instructions or changing the binary representation at all?<br>
</div><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">On Thu, Jul 11, 2013 at 4:05 AM, Eirini _ <span dir="ltr"><<a href="mailto:eirini_dit@windowslive.com" target="_blank">eirini_dit@windowslive.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">


<div><div dir="ltr"><span style="color:rgb(68,68,68);font-size:15px;line-height:21px;">Hi,</span><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;"><br></div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">
 i would like to ask you, if i can get a lower-level representation than the llvm IR.</div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">For example, having the following instruction in the llvm IR, </div>
<div style="line-height:21px;color:rgb(68,68,68);font-size:15px;"> call void @llvm.memcpy.i32(i8* %19, i8* getelementptr inbounds ([2 x [2 x [3 x i8]]]* @main.s, i32 0, i32 0, i32 0, i32 0), i32 12, i32 1)</div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">
<br></div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">i would like to get something like this (in <u>A-normal form</u> (without nested instructions):</div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">
<b>%temp</b> = <span style="line-height:22px;font-size:12pt;"> </span><span style="line-height:22px;font-size:12pt;">i8* getelementptr inbounds ([2 x [2 x [3 x i8]]]* @main.s, i32 0, i32 0, i32 0, i32 0)</span></div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">
 call void @llvm.memcpy.i32(i8* %19,<b> %temp</b>, i32 12, i32 1)</div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;"><br></div><div style="line-height:21px;color:rgb(68,68,68);font-size:15px;"><br></div>
<div style="line-height:21px;color:rgb(68,68,68);font-size:15px;">Thanks</div>                                      </div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>                                       </div></body>
</html>