<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 21, 2012, at 1:43 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_default" style="">On Fri, Dec 21, 2012 at 1:38 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank" class="cremed">rjmccall@apple.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><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 class="h5"><div><div>
On Dec 21, 2012, at 1:18 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank" class="cremed">chandlerc@gmail.com</a>> wrote:</div><blockquote type="cite"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
<div dir="ltr"><div>So, last time I tried, I needed a bit more tooling in place to do the renaming sanely. =] That's taken care of, and so I'm hoping to do the renaming from 'clang/lib/CodeGen/...' to 'clang/lib/IRGen/...' over the holidays (hopefully minimal patches outstanding).</div>

<div><br></div><div>I'm also going to try to systematically clean up the naming of files and classes.</div><div><br></div><div>
The current leading strategy for files:</div><div><br></div><div>  lib/CodeGen/CGCall.cpp -> lib/IRGen/Call.cpp</div><div>  lib/CodeGen/CodeGenFunction.cpp -> lib/IRGen/Function.cpp</div>
<div><br></div><div>The current leading strategy for classes:</div><div><br></div><div>  clang::CGFoo -> clang::irgen::Foo</div>
<div>  clang::CodeGenBar -> clang::irgen::Bar</div><div><br></div><div>I'm asking Doug and John to paint this bikeshed so that we don't just go around in circles endlessly.</div>
</div></div>
</blockquote></div><br></div></div><div>I really like having a prefix on file names so that they aren't immediately confusable — visually, by IDEs, by C-x b, etc. — with files from other parts of the compiler.  For example, I think it would be a real loss if there were three Decl.cpp files in clang: one in AST, one in Sema, and one in IRGen.</div>
</div></blockquote><div><br></div><div style="">Sure.</div><div style=""> </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><br></div>
<div>For lack of a better idea, let's go with replacing everything that's "CodeGen" with "IRGen" and "CG" with "IR".  "IR" has a pretty unambiguous meaning in the context of LLVM.</div>
</div></blockquote><div><br></div></div></div></div></div></blockquote><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style="">Can we pick just one prefix and have everything use that? Seems a great opportunity to no longer wonder "is it CGFunction or CodeGenFunction?"</div></div></div></div></div></blockquote><div><br></div>You're right.  Using a single prefix is fine;  it should be "IRGen", which makes everything nice and consistent.</div><div><br><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div style="">Should the prefix apply just to the files? 'clang::irgen::IRGenFunction' seems needlessly redundant, but if that's your preferred shade of bikeshed, I will make it so. ;]</div></div></div></div></div></blockquote><br></div><div>You keep trying to rename CodeGenFunction "Function", and worse, you think you're not out of your mind.  CodeGenFunction/CodeGenModule/CGF/CGM should become IRGenFunction/IRGenModule/IGF/IGM.  Otherwise, there's no need to throw prefixes on things that aren't already prefixed.</div><div><br></div><div>This is my preferred shade of bikeshed.  :)</div><div><br></div><div>John.</div></body></html>