<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 23, 2009, at 11:48 AM, Villmow, Micah wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address">
<o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City">
<o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:"\@MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<div lang="EN-US" link="blue" vlink="purple">
<div class="Section1"><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I have a pass that modifies my machine dependent
instructions and I have ran into a situation where I want to remove all
instructions that an instruction is dependent on when I remove an instruction.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Is there a way to do this using the API calls?</span></font></p></div></div></o:smarttagtype></o:smarttagtype></o:smarttagtype></blockquote><div><br></div>No. See DeadMachineInstructionElim.cpp.</div><div><br></div><div>Evan</div><div><br><blockquote type="cite"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">For example, I have a sequence of instructions<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">a = b + c<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">d = c * c<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">store d, *a<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">load e, *a<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">f = e + d<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">since the store and load are pointless I want to turn them
into a simple move turning the code into<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span lang="PT-BR" style="font-size:
10.0pt;font-family:Arial">a = b + c<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span lang="PT-BR" style="font-size:
10.0pt;font-family:Arial">d = c * c<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span lang="PT-BR" style="font-size:
10.0pt;font-family:Arial">tmp = d<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span lang="PT-BR" style="font-size:
10.0pt;font-family:Arial">e = tmp<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span lang="PT-BR" style="font-size:
10.0pt;font-family:Arial">f = e + d<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span lang="PT-BR" style="font-size:
10.0pt;font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">however I also want to remove the `a = b + c` instruction.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Any idea’s?<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><br>
Thanks,<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Micah Villmow<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Systems Engineer<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Advanced Technology & Performance<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Advanced Micro Devices Inc.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><ns13:street w:insauthor="Micah Villmow" w:insdate="2009-03-23T11:44:00Z" w:endinsauthor="Micah Villmow" w:endinsdate="2009-03-23T11:44:00Z"><ns13:address w:insauthor="Micah Villmow" w:insdate="2009-03-23T11:44:00Z" w:endinsauthor="Micah Villmow" w:endinsdate="2009-03-23T11:44:00Z">S1-609 One AMD Place</ns13:address></ns13:street></span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><ns13:place w:insauthor="Micah Villmow" w:insdate="2009-03-23T11:44:00Z" w:endinsauthor="Micah Villmow" w:endinsdate="2009-03-23T11:44:00Z"><ns13:city w:insauthor="Micah Villmow" w:insdate="2009-03-23T11:44:00Z" w:endinsauthor="Micah Villmow" w:endinsdate="2009-03-23T11:44:00Z"><st1:city w:st="on"><st1:place w:st="on">Sunnyvale</st1:place></st1:city></ns13:city></ns13:place>,
CA. 94085</span></font><o:p></o:p></p><p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">P: 408-749-3966</span></font><o:p></o:p></p><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><o:p></o:p></span></font></p><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p>
</div>
</div>
_______________________________________________<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">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></o:smarttagtype></o:smarttagtype></o:smarttagtype></blockquote></div><br></body></html>