//=== ValueProfilePlugins.inc - set of plugins used by ValueProfileCollector =// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file contains a set of plugin classes used in ValueProfileCollectorImpl. // Each plugin is responsible for collecting Value Profiling candidates for a // particular optimization. // Each plugin must satisfy the interface described in ValueProfileCollector.cpp // //===----------------------------------------------------------------------===// #include "ValueProfileCollector.h" #include "llvm/Analysis/IndirectCallVisitor.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/IR/InstVisitor.h" usingnamespacellvm; CandidateInfo; extern cl::opt<bool> MemOPOptMemcmpBcmp; ///--------------------------- MemIntrinsicPlugin ------------------------------ class MemIntrinsicPlugin : public InstVisitor<MemIntrinsicPlugin> { … }; ///------------------------ IndirectCallPromotionPlugin ------------------------ class IndirectCallPromotionPlugin { … }; ///--------------------- VirtualTableValueProfilingPlugin -------------------- class VTableProfilingPlugin { … }; ///----------------------- Registration of the plugins ------------------------- /// For now, registering a plugin with the ValueProfileCollector is done by /// adding the plugin type to the VP_PLUGIN_LIST macro. #define VP_PLUGIN_LIST …