<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>To my knowledge, I don't think there is an easy way to get the MVT information from a MachineOperand. Why do you need it for? In my mind, the MachineInstr and its associated operands represent a physical machine instruction and I typically want to think of those as machine opcodes and machine register files. I am typically interested in the mapping of MVTs to register classes when I'm generating machine instructions. Note that a register class may map to multiple MVTs depending on your description.</div><div><br></div><div>-- Mon Ping</div><div><br></div><div><div>On Sep 24, 2008, at 12:15 PM, Villmow, Micah wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street">
<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">
<o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 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:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@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="blue" style="word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space">
<div class="Section1"><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">This only has the register class
information, not the register type information.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">My register class has multiple register
types and I need to know how to differentiate which register type of my
register class of the current register.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">The information in the MVT data type is
what I need, i.e. the position in the GPRVT array of each register.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Something equivalent to MVT getValueType()
but for registers.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Thanks,<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><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 style="font-size:12.0pt">
<hr size="2" width="100%" align="center" tabindex="-1">
</span></font></div><p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma">
<a href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a> [mailto:llvmdev-bounces@cs.uiuc.edu] <b><span style="font-weight:bold">On Behalf Of </span></b>Evan Cheng<br>
<b><span style="font-weight:bold">Sent:</span></b> Wednesday, September 24,
2008 10:22 AM<br>
<b><span style="font-weight:bold">To:</span></b> <st1:personname w:st="on">LLVM
Developers Mailing List</st1:personname><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [LLVMdev] Determining
the register type of a MachineOperand</span></font><o:p></o:p></p>
</div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">You can get to the MachineInstr from a MachineOperand. Then get to its
TargetInstrDesc and TargetOperandInfo which has register class information.<o:p></o:p></span></font></p>
<div><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><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">Evan<o:p></o:p></span></font></p>
</div>
<div><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><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">On Sep 23, 2008, at 12:44 PM, Villmow, Micah wrote:<o:p></o:p></span></font></p>
</div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><br>
<br>
<o:p></o:p></span></font></p>
<span style="orphans: 2;text-align:auto;widows: 2;-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0;word-spacing:0px"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="address">
<div link="blue" vlink="purple">
<div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">How do I determine what type of
register(i.e. i32, f32, etc..) I am accessing from a MachineOperand? I.e. how
do I get to the MVT struct, or equivalent information, from a MachineOperand
object?<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black"><u1:p> </u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">Micah Villmow<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">Systems Engineer<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">Advanced Technology & Performance<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">Advanced Micro Devices Inc.<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><ns0:street u2:insauthor="Micah Villmow" u2:insdate="2008-09-23T12:31:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-09-23T12:31:00Z"><ns0:address u2:insauthor="Micah Villmow" u2:insdate="2008-09-23T12:31:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-09-23T12:31:00Z"><st1:street u2:st="on"><st1:address u2:st="on"><st1:street w:st="on"><st1:address w:st="on"><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:black">4555 Great America Pkwy</span></font></st1:address><font size="2" color="black" face="Arial"></font></st1:street><font size="2" color="black" face="Arial"></font></st1:address></st1:street></ns0:address><font size="2" color="black" face="Arial"></font></ns0:street><font size="2" color="black" face="Arial"></font><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:black">,<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><ns0:place u2:insauthor="Micah Villmow" u2:insdate="2008-09-23T12:31:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-09-23T12:31:00Z"><ns0:city u2:insauthor="Micah Villmow" u2:insdate="2008-09-23T12:31:00Z" u2:endinsauthor="Micah Villmow" u2:endinsdate="2008-09-23T12:31:00Z"><st1:city u2:st="on"><st1:place u2:st="on"><st1:city w:st="on"><st1:place w:st="on"><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:black">Santa Clara</span></font></st1:place><font size="2" color="black" face="Arial"></font></st1:city><font size="2" color="black" face="Arial"></font></st1:place></st1:city></ns0:city><font size="2" color="black" face="Arial"></font></ns0:place><font size="2" color="black" face="Arial"></font><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:black">, CA. 95054<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">P: 408-572-6219<u1:p></u1:p></span></font><font color="black"><span style="color:black"><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="2" color="black" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:black">F: 408-572-6596</span></font><font color="black"><span style="color:black"><u1:p></u1:p><o:p></o:p></span></font></p>
</div>
<div><p class="MsoNormal"><font size="3" color="black" face="Times New Roman"><span style="font-size:12.0pt;color:black"><u1:p> </u1:p><o:p></o:p></span></font></p>
</div>
</div><p class="MsoNormal"><font size="1" color="black" face="Helvetica"><span style="font-size:9.0pt;font-family:Helvetica;color:black">_______________________________________________<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>
<br>
<o:p></o:p></span></font></p>
</div>
</u1:smarttagtype></u1:smarttagtype></u1:smarttagtype></u1:smarttagtype></span></div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"></span><o:p> </o:p></font></p>
</div>
</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></o:smarttagtype></o:smarttagtype></blockquote></div><br></body></html>