[MCA] Anchoring the vtable of CustomBehaviour

Put the dtor of mca::CustomBehaviour into the cpp file to avoid
undefined vtable when linking libLLVMMCACustomBehaviourAMDGPU as shared
library.

Differential Revision: https://reviews.llvm.org/D104401
This commit is contained in:
Min-Yih Hsu 2021-06-16 10:34:57 -07:00
parent 066b320723
commit c29555342c
3 changed files with 4 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public:
const MCInstrInfo &MCII)
: STI(STI), SrcMgr(SrcMgr), MCII(MCII) {}
virtual ~CustomBehaviour() {}
virtual ~CustomBehaviour();
// Before the llvm-mca pipeline dispatches an instruction, it first checks
// for any register or resource dependencies / hazards. If it doesn't find

View File

@ -16,6 +16,8 @@
namespace llvm {
namespace mca {
CustomBehaviour::~CustomBehaviour() {}
unsigned CustomBehaviour::checkCustomHazard(ArrayRef<InstRef> IssuedInst,
const InstRef &IR) {
// 0 signifies that there are no hazards that need to be waited on

View File

@ -6,6 +6,7 @@ include_directories(
set(LLVM_LINK_COMPONENTS
AMDGPU
Core
MCA
Support
)