[llvm] r300311 - This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs.

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 06:22:02 PDT 2017


On 14 Apr 2017, at 09:44, Andrew V. Tischenko via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Author: avt77
> Date: Fri Apr 14 02:44:23 2017
> New Revision: 300311
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=300311&view=rev
> Log:
> This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs.
> The details are here: https://reviews.llvm.org/D30941
...
> Modified: llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSubtargetInfo.h?rev=300311&r1=300310&r2=300311&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/MC/MCSubtargetInfo.h (original)
> +++ llvm/trunk/include/llvm/MC/MCSubtargetInfo.h Fri Apr 14 02:44:23 2017
> @@ -26,6 +26,8 @@
> #include <string>
> 
> namespace llvm {
> +class MachineInstr;
> +class MCInst;
> 
> //===----------------------------------------------------------------------===//
> ///
> @@ -167,6 +169,15 @@ public:
>     auto Found = std::lower_bound(ProcDesc.begin(), ProcDesc.end(), CPU);
>     return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
>   }
> +
> +  /// Returns string representation of scheduler comment
> +  virtual std::string getSchedInfoStr(const MachineInstr &MI) const {
> +    return std::string();
> +  }
> +
> +  virtual std::string getSchedInfoStr(MCInst const &MCI) const {
> +    return std::string();
> +  }
> };
> 
> } // end namespace llvm
> 

FYI, this addition of virtual methods now causes a lot of instances of the following warning:

In file included from
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:178:
In file included from include/llvm/Target/TargetSubtargetInfo.h:24:
include/llvm/MC/MCSubtargetInfo.h:36:7: warning: 'llvm::MCSubtargetInfo' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
class MCSubtargetInfo {
      ^
1 warning generated.

If MCSubtargetInfo is not supposed to be inherited from, please devirtualize these methods, otherwise please make the destructor virtual too.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170414/989cd251/attachment.sig>


More information about the llvm-commits mailing list