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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 20:43:03 PDT 2017


On Fri, Oct 20, 2017 at 10:15 AM, David Blaikie <dblaikie at gmail.com> wrote:

> I'm guessing a small/empty module might be sufficiently stable to hash?
>
> Otherwise, not perfect, but lower false positive, would be a test with a
> regex for [0-9]* to ensure there are no hex digits?
>

Turns out there was already a test checking for [0-9A-F]+, so I just
changed it to [0-9]+ (r316544).


> On Wed, Oct 18, 2017 at 11:53 AM Teresa Johnson <tejohnson at google.com>
> wrote:
>
>>
>>
>> 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 <(408)%20460-2413>
>>
>


-- 
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/20171024/cc6089ba/attachment.html>


More information about the llvm-commits mailing list