<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:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The driving goal of 'optnone' is to have an easy way for programmers to get an "-O0 like" debugging experience for selected functions, without making them build
everything with –O0.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">To that end, we turn off as much optimization as we reasonably can, but in the context of a pipeline that is generally expecting optimizations to be enabled,
in practice we can't exactly match –O0 because "things break" if we turn off everything. Luckily, exactly matching –O0 isn't a requirement.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Contemplating the "things break" situation, I am entirely willing to believe (it may have actually happened) that problems can occur when using FastISel in
a pipeline that isn't expecting it. So, for purposes of diagnosing these 'optnone' problems, it seems useful to be able to force 'optnone' not to use FastISel. This is a different motivation than Daniel expressed, which is a more principled idea coming from
the "optnone should exactly match –O0" misconception; but the conclusion (that we should respect an explicit –fast-isel=false within 'optnone' functions) is the same.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Eric Christopher [mailto:echristo@gmail.com]
<br>
<b>Sent:</b> Wednesday, November 18, 2015 9:48 AM<br>
<b>To:</b> Robinson, Paul; Daniel Sanders; llvm-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [llvm-dev] Mips unconditionally uses fast-isel?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I'd have figured optnone was "no optimizations" not "use the entire O0 code path"?<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">At least that seemed to be the intent when you added it Paul?<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-eric<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Nov 18, 2015 at 8:05 AM Robinson, Paul via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Well, 'optnone' is already not identical to –O0, and given the nature of things, probably can't be; but I am persuaded that it's reasonable for it to
honor the –fast-isel option as a debugging tactic. I'll take an AI to make this happen.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">--paulr</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">P.S. One nit, the "O0 + optnone" case should not have an asterisk, the FastISel flag is not manipulated if the opt level is already zero. Does not affect
the strength of your argument, of course.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a name="msg-f:1518194089395188083__MailEndCompos"><span style="color:#1F497D"> </span></a><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Daniel Sanders [mailto:<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>]
<br>
<b>Sent:</b> Wednesday, November 18, 2015 2:19 AM<br>
<b>To:</b> Robinson, Paul; <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">
llvm-dev@lists.llvm.org</a></span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
<b>Subject:</b> RE: Mips unconditionally uses fast-isel?</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p><span lang="EN-GB">> </span>-----Original Message-----<o:p></o:p></p>
<p><span lang="EN-GB">> </span>From: Robinson, Paul [<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">mailto:Paul_Robinson@playstation.sony.com</a>]<o:p></o:p></p>
<p><span lang="EN-GB">> </span>Sent: 17 November 2015 22:58<o:p></o:p></p>
<p><span lang="EN-GB">> </span>To: Daniel Sanders; <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">
llvm-dev@lists.llvm.org</a><o:p></o:p></p>
<p><span lang="EN-GB">> </span>Subject: RE: Mips unconditionally uses fast-isel?<o:p></o:p></p>
<p><span lang="EN-GB">> </span><o:p></o:p></p>
<p><span lang="EN-GB">> > > The other thing that might work, is having TargetMachine remember how</span><o:p></o:p></p>
<p><span lang="EN-GB">> > > the fast-isel option got set, and make OptLevelChanger do the right</span><o:p></o:p></p>
<p><span lang="EN-GB">> > > thing. But that seems like a hack to work around Mips not obeying the</span><o:p></o:p></p>
<p><span lang="EN-GB">> > > specified optimization level, honestly.</span><o:p></o:p></p>
<p><span lang="EN-GB">> ></span><o:p></o:p></p>
<p><span lang="EN-GB">> > I think we should do that as well. I don't think it's right that optnone</span><o:p></o:p></p>
<p><span lang="EN-GB">> > enables Fast ISel even when it's been explicitly disabled. It should do</span><o:p></o:p></p>
<p><span lang="EN-GB">> > the same checks as addPassesToGenerateCode() does.</span><o:p></o:p></p>
<p><span lang="EN-GB">> </span><o:p></o:p></p>
<p><span lang="EN-GB">> Hm? What you're asking for is that "-O2" and "-O2 -fast-isel=none" are</span><o:p></o:p></p>
<p><span lang="EN-GB">> identical, unless you have an 'optnone' function. Do you really have a</span><o:p></o:p></p>
<p><span lang="EN-GB">> use-case for controlling the codegen path for an 'optnone' function?</span><o:p></o:p></p>
<p><span lang="EN-GB">> The whole point of 'optnone' is to avoid optimizations.</span><o:p></o:p></p>
<p><span lang="EN-GB">> --paulr</span><o:p></o:p></p>
<p><span lang="EN-GB">> </span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black"> </span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">No, that's already true. -O2 doesn't try to enable Fast ISel (unless the optnone attribute is given) so –fast-isel=false has no effect.</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black"> </span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">I'm saying that optnone means 'use –O0 for this function' and that optnone should</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">respect non-default values of the -fast-isel flag like –O0 does. This is the behaviour I'd expect:</span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black"> </span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border:solid windowtext 1.0pt;border-left:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-fast-isel=false</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border:solid windowtext 1.0pt;border-left:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-fast-isel=default</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border:solid windowtext 1.0pt;border-left:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-fast-isel=true</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O0</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O0 + optnone attribute</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG*</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O1 + optnone attribute</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG*</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O2 + optnone attribute</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG*</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O3 + optnone attribute</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG*</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O1</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O2</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
<tr>
<td width="201" valign="top" style="width:120.5pt;border:solid windowtext 1.0pt;border-top:none;background:#D9D9D9;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">-O3</span><o:p></o:p></p>
</td>
<td width="164" valign="top" style="width:98.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="153" valign="top" style="width:91.8pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">SelectionDAG</span><o:p></o:p></p>
</td>
<td width="151" valign="top" style="width:90.85pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p><span style="color:black">FastISel</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p><span lang="EN-GB" style="color:black">The cells marked with '*' differ from the current behaviour.</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> </span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">In terms of code, I think this part of OptLevelChanger::OptLevelChanger():</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> if (NewOptLevel == CodeGenOpt::None) {</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> DEBUG(dbgs() << "\nEnable FastISel for Function "</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> << IS.MF->getFunction()->getName() << "\n");</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> IS.TM.setFastISel(true);</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> }</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">Should be:</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> if (NewOptLevel == CodeGenOpt::None) {</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> DEBUG(dbgs() << "\nEnable FastISel for Function "</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> << IS.MF->getFunction()->getName() << "\n");</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> IS.TM.setFastISel(EnableFastISelOption != cl::BOU_FALSE);</span><o:p></o:p></p>
<p><span lang="EN-GB" style="font-family:"Courier New";color:black"> }</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">Where EnableFastISelOption has the same value as the global in LLVMTargetMachine.cpp</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black"> </span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">The main reason I'm asking for this is that I think it's weird to for optnone to use a different code generator</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">than –O0. These hidden overrides exist to help us debug code generation problems and, faced with a code</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">generation bug, –fast-isel=false is useful for quickly determining whether it's in FastISel or somewhere else.</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">The current behaviour allows optnone to overrule the hidden option to force-disable FastISel which will give</span><o:p></o:p></p>
<p><span lang="EN-GB" style="color:black">misleading guidance for bugs that lie in functions with optnone.</span><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>