[PATCH] D38405: [ThinLTO] Use decimal suffix for promoted values to match demanglers

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 11:53:04 PDT 2017


On Mon, Oct 9, 2017 at 3:40 PM, David Blaikie <dblaikie at gmail.com> wrote:

> Test case?
>

Sorry for the slow response. I considered adding a test but didn't, for the
same reason that we don't currently have any tests that check for the
actual suffix value - it is a hash of the IR and therefore any future
changes to IR would require the tests to be updated. It seems like this
would be too noisy. WDYT?

Teresa


> On Fri, Sep 29, 2017 at 8:08 AM Teresa Johnson via Phabricator via
> llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
>> tejohnson created this revision.
>> Herald added a subscriber: inglorion.
>>
>> Demanglers such as libiberty know how to strip suffixes of the form
>> \.[a-zA-Z]+\.\d+, but our current promoted value suffixes are
>> .llvm.${modulehash}, where the module hash is in hex. Change the
>> module hash to decimal to allow demanglers to handle this.
>>
>>
>> https://reviews.llvm.org/D38405
>>
>> Files:
>>   include/llvm/IR/ModuleSummaryIndex.h
>>
>>
>> Index: include/llvm/IR/ModuleSummaryIndex.h
>> ===================================================================
>> --- include/llvm/IR/ModuleSummaryIndex.h
>> +++ include/llvm/IR/ModuleSummaryIndex.h
>> @@ -743,7 +743,7 @@
>>    static std::string getGlobalNameForLocal(StringRef Name, ModuleHash
>> ModHash) {
>>      SmallString<256> NewName(Name);
>>      NewName += ".llvm.";
>> -    NewName += utohexstr(ModHash[0]); // Take the first 32 bits
>> +    NewName += utostr(ModHash[0]); // Take the first 32 bits
>>      return NewName.str();
>>    }
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>


-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171018/27cb71c5/attachment.html>


More information about the llvm-commits mailing list