From a7cde103c18224f426e613b64ecb228c2154300f Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Thu, 27 Jun 2019 07:48:06 +0000 Subject: [MachineFunction] Base support for call site info tracking Add an attribute into the MachineFunction that tracks call site info. ([8/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda Co-authored-by: Nikola Prica Co-authored-by: Ivan Baev Differential Revision: https://reviews.llvm.org/D61061 llvm-svn: 364506 --- llvm/lib/CodeGen/MachineVerifier.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp') diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index b40594ffe55..63fd05b2ea2 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -2193,6 +2193,10 @@ void MachineVerifier::visitMachineFunctionAfter() { verifyLiveVariables(); if (LiveInts) verifyLiveIntervals(); + + for (auto CSInfo : MF->getCallSitesInfo()) + if (!CSInfo.first->isCall()) + report("Call site info referencing instruction that is not call", MF); } void MachineVerifier::verifyLiveVariables() { -- cgit v1.2.3