<br><br><div class="gmail_quote">On Wed, May 5, 2010 at 5:22 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><div>... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div class="im"></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+++ tools/llc/llc.cpp<span style="white-space:pre">     </span>(working copy)</div></div>
</div></blockquote><div>...  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
The first hunk is formatted wrong.  The second hunk looks fine except for the tabs.  In any case, this part of the patch can go in before everything else, please send it as a stand-alone patch.</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<br></div></div></div></blockquote><div><br></div><div>OK, fixed the formatting problems and have attached the patch to llc.cpp alone</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
Please follow the formatting of the rest of the llvm codebase, instead of:</div></div></div></blockquote><div>...</div><div> </div><div>I'm trying real hard :) </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+#include <stdio.h></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
+#ifndef NDEBUG</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+#define _dbg(x) x</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+#else</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
+#define _dbg(x)</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+#endif</div><div><br></div><div>Please use the DEBUG macro instead of rolling your own.</div></div></div></div></div></blockquote>
<div><br></div><div>this macro allows me to optionally declare stuff where the DEBUG macro will not...</div><div> </div><div>...</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div><div><div>Please make sure the case of hte filename (Coff) matches the case in the files.  I think that COFF is correct (since it is an acronym) and consistent with the rest of the codebase.</div>
</div></div></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div></div></div></blockquote><div><br></div><div>OK</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
@@ -57,7 +57,7 @@</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"> bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) {</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
   SetupMachineFunction(MF);</div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:12.0px Inconsolata;min-height:13.0px"> <br></p><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">-  if (Subtarget->isTargetCOFF()) {</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+  if (Subtarget->isTargetCOFF() && OutStreamer.hasRawTextSupport ()) {</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
     const Function *F = MF.getFunction();</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">     OutStreamer.EmitRawText("\t.def\t " + Twine(CurrentFnSym->getName()) +</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">                             ";\t.scl\t" +</div><div><br></div><div>This is *definitely* incorrect.  You need to add MCStreamer APIs for the COFF directives that don't have them.</div>
</div></div></div></blockquote><div><br></div><div>So I should turn this into EmitCOFFFunctionDefinition or something of that nature?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+++ lib/CodeGen/TargetLoweringObjectFileImpl.cpp<span style="white-space:pre">   </span>(working copy)</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">@@ -822,6 +822,7 @@</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">   TargetLoweringObjectFile::Initialize(Ctx, TM);</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">   TextSection = getCOFFSection("\t.text", true, SectionKind::getText());</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
   DataSection = getCOFFSection("\t.data", true, SectionKind::getDataRel());</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">+  BSSSection = getCOFFSection(".bss", true, SectionKind::getBSS());</div>
<div><br></div><div>Why is this needed?  You shouldn't have to change the lowering at all.</div></div></div></div></div></blockquote><div><br></div><div>I see that now after the conversation about uninitialized global variables and common symbols, I will fix that.</div>
<div><br></div><div>- Nathan</div><div><br></div></div>