On 2014 Mar 14, at 21:57, Duncan P. N. Exon Smith <[email protected]> wrote:

> Thanks for the review!

I’ve attached updated patches that address your comments.

>>> void CodeGenPGO::setFuncName(llvm::Function *Fn) {
>>> -  StringRef Func = Fn->getName();
>>> +  NormalFuncName = Fn->getName();
>> 
>> NormalFuncName? Is there a SpecialFuncName? This is just FunctionName,
>> isn't it?
> 
> There are three function names kicking around there:
> 
> - Fn->getName(), which sometimes has a \01 prefix.
> 
> - NormalFuncName, which takes off the \01 prefix.  It’s used as a suffix
>   for symbol names, like the “foo” in __llvm_pgo_counts_foo.
> 
> - FuncName, which already existed, and whose name I didn’t want to
>   change, and for static variables has a filename prefix.  E.g.,
>   “somefile.cpp:foo" if foo() is static and defined in somefile.cpp, or
>   “bar" if bar() is not static.  This is what gets saved in
>   __llvm_pgo_name_foo (or __llvm_pgo_name_bar) and used to be sent as an
>   argument into llvm_pgo_writeout().
> 
> NormalFuncName is normal in that it has no \01 or filename prefix.
> 
> I’m open to suggestions, but FunctionName would clash awkwardly with
> FuncName.

I renamed both.

  - FuncName => PrefixedFuncName
  - NormalFuncName => RawFuncName

I don’t like either name, since Prefixed isn’t always prefixed and
Raw seems to indicate (incorrectly) that it includes the \01, but I
think it’s an improvement.  Let me know if you come up with
something better.

Attachment: pgo-static-data-structures-clang-2.patch
Description: Binary data

Attachment: pgo-static-data-structures-compiler-rt-2.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to