1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[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 76e90724b1
commit 341aadfd56
3 changed files with 4 additions and 1 deletions

View File

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

View File

@ -16,6 +16,8 @@
namespace llvm { namespace llvm {
namespace mca { namespace mca {
CustomBehaviour::~CustomBehaviour() {}
unsigned CustomBehaviour::checkCustomHazard(ArrayRef<InstRef> IssuedInst, unsigned CustomBehaviour::checkCustomHazard(ArrayRef<InstRef> IssuedInst,
const InstRef &IR) { const InstRef &IR) {
// 0 signifies that there are no hazards that need to be waited on // 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 set(LLVM_LINK_COMPONENTS
AMDGPU AMDGPU
Core Core
MCA
Support Support
) )