<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Eli Bendersky</b> <span dir="ltr"><<a href="mailto:eliben@google.com">eliben@google.com</a>></span><br>
Date: Tue, Apr 16, 2013 at 3:44 PM<br>Subject: Re: [llvm] r179601 - Cleanup naming: DataLayout s/TD/DL/<br>To: Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>><br><br><br><div dir="ltr"><div class="im">
On Tue, Apr 16, 2013 at 2:44 PM, Jim Grosbach <span dir="ltr"><<a href="mailto:grosbach@apple.com" target="_blank">grosbach@apple.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><div class="im">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div>
<div>On Apr 16, 2013, at 2:32 PM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:</div><br><blockquote type="cite"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<div dir="ltr">On Tue, Apr 16, 2013 at 12:05 PM, Jim Grosbach<span> </span><span dir="ltr"><<a href="mailto:grosbach@apple.com" target="_blank">grosbach@apple.com</a>></span><span> </span>wrote:<br><div class="gmail_extra">

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">DL and dl often are used for debugloc elsewhere. Thoughts on alternatives?</blockquote>

<div><br></div><div>Good point. I don't think there should be a lot of places where there's a conflict between the two, and wherever it is, the conflict can be resolved by using longer an more meaningful names. I'm not sure it's the only place in LLVM code where there's such a conflict...</div>

<div><br></div><div>Eli</div><div><br></div></div></div></div></div></blockquote></div><div>Sounds reasonable. Just something that caught my eye. Thanks!</div><span><font color="#888888"><div><br></div></font></span></div>

</div></blockquote><div><br></div><div><br></div></div><div>Rats... a lot of work has to be done to make it consistent:</div><div><br></div><div><div>$ git grep "\bTD\b" | grep "\.cpp"|wc -l</div>
<div>1766</div><div>$ git grep "\bDL\b" | grep "\.cpp"|wc -l</div><div>2705</div><div><br></div></div><div>And there are a number of places where both are used (FastIsel and its target subclasses, for instance).</div>

<div><br></div><div>DL makes more sense for DataLayout because it's most similar to other "information classes", i.e:</div><div><br></div><div><div>  const TargetMachine &TM;</div>
<div>  const DataLayout &TD;               <------------ DL</div><div>  const TargetInstrInfo &TII;</div><div>  const TargetLowering &TLI;</div><div>  const TargetRegisterInfo &TRI;</div><div><br></div>

<div>So DebugLoc probably has to cede its throne and be converted to DbgLoc or something similar? Again, that's ~4.5K substitutions to make in order to be completely consistent :-(</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>
Eli</div><div><br></div></font></span></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>
</div><br></div>