[llvm] r306864 - Make 0 argument getSubtargetImpl functions for the X86, AArch64, and PPC targets deleted so that no one is tempted to use them.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 21:35:21 PDT 2017


I've added a small comment in r307999. Extra wording or elaboration could
happen. Let me know what you think :)

-eric

On Wed, Jul 12, 2017 at 8:09 AM David Blaikie <dblaikie at gmail.com> wrote:

> Yeah, I reckon a comment's probably not a bad idea to explain why it's
> here, why adding an implementation is not a good idea, etc.
>
> On Wed, Jul 12, 2017 at 3:41 AM Eric Christopher <echristo at gmail.com>
> wrote:
>
>> They could - they're not catching ambiguous calls but rather providing as
>> documentation in case someone wants to add the functions back (they
>> shouldn't :). I can augment this with a comment if you'd like or we can
>> come up with some other way?
>>
>> Thanks!
>>
>> -eric
>>
>>
>> On Mon, Jul 10, 2017 at 11:59 AM David Blaikie <dblaikie at gmail.com>
>> wrote:
>>
>>> Could these function declarations be removed entirely? Looks like they
>>> aren't catching any ambiguous calls, etc, so probably?
>>>
>>> On Fri, Jun 30, 2017 at 12:49 PM Eric Christopher via llvm-commits <
>>> llvm-commits at lists.llvm.org> wrote:
>>>
>>>> Author: echristo
>>>> Date: Fri Jun 30 12:49:05 2017
>>>> New Revision: 306864
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=306864&view=rev
>>>> Log:
>>>> Make 0 argument getSubtargetImpl functions for the X86, AArch64, and
>>>> PPC targets deleted so that no one is tempted to use them.
>>>>
>>>> Modified:
>>>>     llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h
>>>>     llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h
>>>>     llvm/trunk/lib/Target/X86/X86TargetMachine.h
>>>>
>>>> Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h?rev=306864&r1=306863&r2=306864&view=diff
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h (original)
>>>> +++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h Fri Jun 30
>>>> 12:49:05 2017
>>>> @@ -36,6 +36,7 @@ public:
>>>>
>>>>    ~AArch64TargetMachine() override;
>>>>    const AArch64Subtarget *getSubtargetImpl(const Function &F) const
>>>> override;
>>>> +  const AArch64Subtarget *getSubtargetImpl() const = delete;
>>>>
>>>>    // Pass Pipeline Configuration
>>>>    TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
>>>>
>>>> Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=306864&r1=306863&r2=306864&view=diff
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h (original)
>>>> +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Fri Jun 30
>>>> 12:49:05 2017
>>>> @@ -41,6 +41,7 @@ public:
>>>>    ~PPCTargetMachine() override;
>>>>
>>>>    const PPCSubtarget *getSubtargetImpl(const Function &F) const
>>>> override;
>>>> +  const PPCSubtarget *getSubtargetImpl() const = delete;
>>>>
>>>>    // Pass Pipeline Configuration
>>>>    TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
>>>>
>>>> Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.h
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.h?rev=306864&r1=306863&r2=306864&view=diff
>>>>
>>>> ==============================================================================
>>>> --- llvm/trunk/lib/Target/X86/X86TargetMachine.h (original)
>>>> +++ llvm/trunk/lib/Target/X86/X86TargetMachine.h Fri Jun 30 12:49:05
>>>> 2017
>>>> @@ -40,6 +40,7 @@ public:
>>>>    ~X86TargetMachine() override;
>>>>
>>>>    const X86Subtarget *getSubtargetImpl(const Function &F) const
>>>> override;
>>>> +  const X86Subtarget *getSubtargetImpl() const = delete;
>>>>
>>>>    TargetIRAnalysis getTargetIRAnalysis() override;
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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/20170714/586d0ea0/attachment.html>


More information about the llvm-commits mailing list