<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:0cm;
        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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
.MsoPapDefault
        {mso-style-type:export-only;
        line-height:115%;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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">Duncan just committed this as r226570.<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>
<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""> llvm-commits-bounces@cs.uiuc.edu [mailto:llvm-commits-bounces@cs.uiuc.edu]
<b>On Behalf Of </b>Timur Iskhodzhanov<br>
<b>Sent:</b> Tuesday, January 20, 2015 17:54<br>
<b>To:</b> Duncan P. N. Exon Smith<br>
<b>Cc:</b> llvm-commits@cs.uiuc.edu<br>
<b>Subject:</b> Re: [llvm] r226490 - IR: Remove direct comparisons against Metadata::Storage, NFC<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="line-height:115%">This is what I get on my Windows machine:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">  $ cat test.cpp<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">  char hello;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">  $ bin\clang.exe -cc1 -gline-tables-only -triple i686-pc-linux -emit-obj -o z test.cpp<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">  Assertion failed: DbgNode->isTemporary() && "Expected temporary node", file ..\lib\IR\DebugInfo.cpp, line 350<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">but on Linux it's fine.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">Replacing <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="line-height:115%">  StorageType Storage : 2;<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">with<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">  unsigned Storage : 2;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">seems to resolve the issue.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">Shall I commit this change?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">Reid might know the enum stuff better.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="line-height:115%">On Tue Jan 20 2015 at 6:39:22 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;line-height:115%"><br>
> On 2015 Jan 20, at 07:32, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>> wrote:<br>
><br>
><br>
><br>
> On Tue Jan 20 2015 at 6:20:34 PM Duncan Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
><br>
><br>
> On Jan 20, 2015, at 3:48 AM, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>> wrote:<br>
><br>
>> Hi Duncan,<br>
>><br>
>> This has broken down "ninja check-asan" on 32-bit Windows.<br>
>> Assertion failed: Context.hasReplaceableUses() && "Expected RAUW support", file C:\src\llvm_bot\slave\win\build\llvm\include\llvm/IR/Metadata.h, line 976<br>
><br>
> Can you include the asan output?   A backtrace?   Point at a buildbot?   I don't have the tools to reproduce this.<br>
><br>
> There's no public buildbot for ASan itself, but turns out this problem is not even specific to ASan.<br>
><br>
> This public bot just builds Chromium with Clang<br>
> <a href="http://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/1295/steps/compile/logs/stdio" target="_blank">
http://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/1295/steps/compile/logs/stdio</a><br>
><br>
> Assertion failed: isTemporary() && "Expected temporary node", file C:\b\build\slave\CrWinClang\build\src\third_party\llvm\include\llvm/IR/Metadata.h, line 741<br>
> since r226499.<br>
><br>
> OK, I'll try to minimize...<br>
> (I suppose the change looks sane at the first glance and you can't come up with a repro yourself)<br>
><br>
> It seems to be hard to revert now...<br>
>> You've committed a lot of small changes in a very short timeframe -<br>
><br>
> Actually, I committed work over the span of an entire work day.<br>
><br>
> Oh, I see.<br>
>> - I assume you're using git?  Is there a reason why you don't squash your changes before committing?  It makes finding bad commits / reverting harder...<br>
><br>
> Besides being developer policy to separate changes as much as possible, it also makes changes easier to review, and isolating which change causes a problem easier to determine.<br>
><br>
> Unless it results in complex history and back-in-forth changes, I suppose.<br>
> I've spent more than an hour today trying to locally bisect and revert the changes and ended up just locally reverting 40+ of your commits after 226490 to make progress.  Unfortunately, reverting just r226490 results in a waterfall of merge conflicts.<br>
<br>
Yup, all the others depend on it.  I would have dealt with it myself<br>
if a buildbot had told me about it.<br>
<br>
> Do you think it's reasonable to temporarily revert your changes in the [r226490, HEAD] range to unbreak stuff?<br>
> I have a patch ready for that.<br>
<br>
Certainly an option, although I'm actively looking at this right now<br>
(sorry for the delay, I'm in PDT so I just woke up).<br>
<br>
Did you do a full bisect?  Are you sure that leaving this in and<br>
reverting the ones that follow don't also fix it?<br>
<br>
Do you know if MSVC handles things like:<br>
<br>
    enum StorageType { ... };<br>
    StorageType Storage : 2;<br>
<br>
correctly (well, the way I expect), or should I store it as an<br>
<br>
    unsigned Storage : 2;<br>
<br>
for compatibility?  Any chance it causes a weird layout problem that<br>
this commit happens to point out?<br>
<br>
(Given that this is MSVC-only, I suspect there's a layout problem or<br>
UB somewhere.)<br>
<br>
>> On Mon Jan 19 2015 at 10:30:36 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
>> Author: dexonsmith<br>
>> Date: Mon Jan 19 13:26:24 2015<br>
>> New Revision: 226490<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=226490&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=226490&view=rev</a><br>
>> Log:<br>
>> IR: Remove direct comparisons against Metadata::Storage, NFC<br>
>><br>
>> Modified:<br>
>>     llvm/trunk/lib/IR/Metadata.cpp<br>
>><br>
>> Modified: llvm/trunk/lib/IR/Metadata.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=226490&r1=226489&r2=226490&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=226490&r1=226489&r2=226490&view=diff</a><br>
>> ==============================================================================<br>
>> --- llvm/trunk/lib/IR/Metadata.cpp (original)<br>
>> +++ llvm/trunk/lib/IR/Metadata.cpp Mon Jan 19 13:26:24 2015<br>
>> @@ -402,7 +402,7 @@ MDNode::MDNode(LLVMContext &Context, uns<br>
>>    for (unsigned I = 0, E = MDs.size(); I != E; ++I)<br>
>>      setOperand(I, MDs[I]);<br>
>><br>
>> -  if (Storage == Temporary)<br>
>> +  if (isTemporary())<br>
>>      this->Context.makeReplaceable(<br>
>>          make_unique<ReplaceableMetadataImpl>(Context));<br>
>>  }<br>
>> @@ -416,7 +416,7 @@ static bool isOperandUnresolved(Metadata<br>
>>  UniquableMDNode::UniquableMDNode(LLVMContext &C, unsigned ID,<br>
>>                                   StorageType Storage, ArrayRef<Metadata *> Vals)<br>
>>      : MDNode(C, ID, Storage, Vals) {<br>
>> -  if (Storage != Uniqued)<br>
>> +  if (!isUniqued())<br>
>>      return;<br>
>><br>
>>    // Check whether any operands are unresolved, requiring re-uniquing.<br>
>> @@ -432,7 +432,7 @@ UniquableMDNode::UniquableMDNode(LLVMCon<br>
>>  }<br>
>><br>
>>  void UniquableMDNode::resolve() {<br>
>> -  assert(Storage == Uniqued && "Expected this to be uniqued");<br>
>> +  assert(isUniqued() && "Expected this to be uniqued");<br>
>>    assert(!isResolved() && "Expected this to be unresolved");<br>
>><br>
>>    // Move the map, so that this immediately looks resolved.<br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</div>
</div>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></body>
</html>