<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 1, 2016 at 10:22 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">+<br>
+  // Check if we've already translated this type.<br>
+  auto I = TypeIndices.find(Ty);<br>
+  if (I != TypeIndices.end())<br>
+    return I->second;<br>
+<br></blockquote><div><br></div></div></div><div>Might be worth adding a comment somewhere here to mention that lowerType might add new TypeIndices and thus you can't avoid the double lookup (find and then unhinted insert) here. Pretty obvious I guess, but seems nice to have.</div></div></div></div></blockquote><div><br></div><div>I added this comment in a later patch, and Amjad found it confusing:</div><div><a href="http://reviews.llvm.org/D20924#inline-177103">http://reviews.llvm.org/D20924#inline-177103</a><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>At least for the DWARF tests we dwarfdump the output of LLVM and check against the pretty printed dump output. Is there a reason we need/prefer to test the asm directly here?</div></div></div></div></blockquote><div><br></div><div>inlining.ll already tests both the assembly output and the readobj output. The readobj output is a lot easier to read and validate for correctness, but I think it's also worth having a few tests of the assembly output, especially since inlining uses a bunch of custom directives.</div></div></div></div>