<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 13, 2017 at 9:34 PM Eric Christopher via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: echristo<br>
Date: Thu Jul 13 21:33:43 2017<br>
New Revision: 307999<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=307999&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=307999&view=rev</a><br>
Log:<br>
Add a set of comments explaining why getSubtargetImpl() is deleted on these targets.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h<br>
    llvm/trunk/lib/Target/ARM/ARMTargetMachine.h<br>
    llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h<br>
    llvm/trunk/lib/Target/X86/X86TargetMachine.h<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h (original)<br>
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.h Thu Jul 13 21:33:43 2017<br>
@@ -36,6 +36,8 @@ public:<br>
<br>
   ~AArch64TargetMachine() override;<br>
   const AArch64Subtarget *getSubtargetImpl(const Function &F) const override;<br>
+  // The no argument getSubtargetImpl, while it exists on some, targets is<br></blockquote><div><br>comma in the wrong spot here ^ ? ("on some targets, is ...")<br><br>Other than that, is there any documentation that could be pointed to.<br><br>Possible edit: "is deprecated and should not be used in those targets, nor reimplemented in this/any other" (the sentence sort of reads like it's talking about other targets getSubtargetImpl, but not really talking about this one? (how could a function that doesn't exist be deprecated? so it must be talking about the other ones, not this one)) *shrug*<br><br>Alternatively: // DO NOT IMPLEMENT: There is no such thing as a valid default subtarget, subtargets are per-function entities based on the target-specific attributes of each function.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+  // deprecated and should not be used.<br>
   const AArch64Subtarget *getSubtargetImpl() const = delete;<br>
<br>
   // Pass Pipeline Configuration<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.h (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.h Thu Jul 13 21:33:43 2017<br>
@@ -47,6 +47,8 @@ public:<br>
   ~ARMBaseTargetMachine() override;<br>
<br>
   const ARMSubtarget *getSubtargetImpl(const Function &F) const override;<br>
+  // The no argument getSubtargetImpl, while it exists on some targets, is<br>
+  // deprecated and should not be used.<br>
   const ARMSubtarget *getSubtargetImpl() const = delete;<br>
   bool isLittleEndian() const { return isLittle; }<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Thu Jul 13 21:33:43 2017<br>
@@ -41,6 +41,8 @@ public:<br>
   ~PPCTargetMachine() override;<br>
<br>
   const PPCSubtarget *getSubtargetImpl(const Function &F) const override;<br>
+  // The no argument getSubtargetImpl, while it exists on some targets, is<br>
+  // deprecated and should not be used.<br>
   const PPCSubtarget *getSubtargetImpl() const = delete;<br>
<br>
   // Pass Pipeline Configuration<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.h?rev=307999&r1=307998&r2=307999&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/X86TargetMachine.h (original)<br>
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.h Thu Jul 13 21:33:43 2017<br>
@@ -40,6 +40,8 @@ public:<br>
   ~X86TargetMachine() override;<br>
<br>
   const X86Subtarget *getSubtargetImpl(const Function &F) const override;<br>
+  // The no argument getSubtargetImpl, while it exists on some targets, is<br>
+  // deprecated and should not be used.<br>
   const X86Subtarget *getSubtargetImpl() const = delete;<br>
<br>
   TargetIRAnalysis getTargetIRAnalysis() override;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>