[llvm] r339670 - [TableGen] Pass string/vector types by const reference (PR37666). NFCI

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 13:48:11 PDT 2018


No worries, thanks!

On Tue, Sep 4, 2018 at 1:40 PM Simon Pilgrim <llvm-dev at redking.me.uk> wrote:

> It should have been fixed by rL340819 - sorry I forgot to CC you!
> On 04/09/2018 20:06, David Blaikie wrote:
>
> Thanks Simon - any update on this?
>
> On Mon, Aug 27, 2018 at 10:12 AM Simon Pilgrim <llvm-dev at redking.me.uk>
> wrote:
>
>> Oops - sorry David I didn't see your reply - I'll take another look.
>> On 27/08/2018 18:01, David Blaikie wrote:
>>
>> Ping
>>
>> On Mon, Aug 20, 2018 at 2:19 PM David Blaikie <dblaikie at gmail.com> wrote:
>>
>>> Looks to me like these should be passed by value but the missing thing
>>> was the std::move in the ctor init list.
>>>
>>> (since the members are values - if a caller passes in a temporary, it'd
>>> be nice to avoid the copy & move the values into the members)
>>>
>>> On Tue, Aug 14, 2018 at 4:18 AM Simon Pilgrim via llvm-commits <
>>> llvm-commits at lists.llvm.org> wrote:
>>>
>>>> Author: rksimon
>>>> Date: Tue Aug 14 04:17:38 2018
>>>> New Revision: 339670
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=339670&view=rev
>>>> Log:
>>>> [TableGen] Pass string/vector types by const reference (PR37666). NFCI
>>>>
>>>> Modified:
>>>>     llvm/trunk/utils/TableGen/FastISelEmitter.cpp
>>>>
>>>> Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=339670&r1=339669&r2=339670&view=diff
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)
>>>> +++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Tue Aug 14 04:17:38
>>>> 2018
>>>> @@ -39,11 +39,12 @@ struct InstructionMemo {
>>>>    std::vector<std::string> PhysRegs;
>>>>    std::string PredicateCheck;
>>>>
>>>> -  InstructionMemo(std::string Name, const CodeGenRegisterClass *RC,
>>>> -                  std::string SubRegNo, std::vector<std::string>
>>>> PhysRegs,
>>>> -                  std::string PredicateCheck)
>>>> -    : Name(Name), RC(RC), SubRegNo(SubRegNo), PhysRegs(PhysRegs),
>>>> -      PredicateCheck(PredicateCheck) {}
>>>> +  InstructionMemo(const std::string &Name, const CodeGenRegisterClass
>>>> *RC,
>>>> +                  const std::string &SubRegNo,
>>>> +                  const std::vector<std::string> &PhysRegs,
>>>> +                  const std::string &PredicateCheck)
>>>> +      : Name(Name), RC(RC), SubRegNo(SubRegNo), PhysRegs(PhysRegs),
>>>> +        PredicateCheck(PredicateCheck) {}
>>>>
>>>>    // Make sure we do not copy InstructionMemo.
>>>>    InstructionMemo(const InstructionMemo &Other) = delete;
>>>>
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/029c512f/attachment.html>


More information about the llvm-commits mailing list