LLVM 23.0.0git
Instrumentor.cpp File Reference
#include "llvm/Transforms/IPO/Instrumentor.h"
#include "llvm/Transforms/IPO/InstrumentorConfigFile.h"
#include "llvm/Transforms/IPO/InstrumentorRuntimeHelper.h"
#include "llvm/Transforms/IPO/InstrumentorStubPrinter.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Verifier.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Transforms/IPO/InstrumentorUtils.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <cassert>
#include <cstdint>
#include <functional>
#include <iterator>
#include <memory>
#include <string>
#include <system_error>
#include <type_traits>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "instrumentor"

Functions

static Regex createRegex (StringRef Str, StringRef Name, LLVMContext &Ctx)
template<typename Ty>
static constexpr ValuegetValue (Ty &ValueOrUse)
template<typename Range>
static ValuecreateValuePack (const Range &R, InstrumentationConfig &IConf, InstrumentorIRBuilderTy &IIRB)
template<typename Range>
static void readValuePack (const Range &R, Value &Pack, InstrumentorIRBuilderTy &IIRB, function_ref< void(int, Value *)> SetterCB)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "instrumentor"

Definition at line 65 of file Instrumentor.cpp.

Function Documentation

◆ createRegex()

Regex createRegex ( StringRef Str,
StringRef Name,
LLVMContext & Ctx )
static

Definition at line 228 of file Instrumentor.cpp.

References llvm::DS_Error, and llvm::Regex::isValid().

◆ createValuePack()

◆ getValue()

template<typename Ty>
constexpr Value * getValue ( Ty & ValueOrUse)
staticconstexpr

Definition at line 840 of file Instrumentor.cpp.

Referenced by AddNodeIDCustom(), llvm::jitlink::aarch64::applyFixup(), BuildConstantFromSCEV(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::MDBuilder::createMutableTBAAAccessTag(), createValuePack(), llvm::MCExpr::evaluateAsRelocatableImpl(), llvm::mdconst::extract(), llvm::extractConstantMask(), llvm::hlsl::CBufferMetadata::get(), getCalledFnOperandIndex(), getCalledFunction(), llvm::PPCMCCodeEmitter::getDispRI34PCRelEncoding(), llvm::ImmutableMap< KeyT, ValT, ValInfo >::getMaxElement(), llvm::ImmutableMapRef< KeyT, ValT, ValInfo >::getMaxElement(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::MDNode::getMostGenericRange(), llvm::ScalarEvolution::getUnknown(), llvm::sandboxir::Context::getValue(), llvm::sandboxir::ResumeInst::getValue(), llvm::AttributeImpl::getValueAsInt(), isRegImmLoadOrStore(), LLVMDbgVariableRecordGetValue(), lowerFCOPYSIGN(), llvm::VPlanPatternMatch::match_poison::match(), llvm::MDNodeKeyImpl< DIEnumerator >::MDNodeKeyImpl(), llvm::MDNodeKeyImpl< DITemplateValueParameter >::MDNodeKeyImpl(), llvm::MemSDNode::MemSDNode(), MIsNeedChainEdge(), llvm::X86Operand::print(), propagateNaN(), readValuePack(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::RecordResolver::resolve(), llvm::sandboxir::LoadStoreVec::runOnRegion(), llvm::scaleProfData(), llvm::yaml::KeyValueNode::skip(), llvm::StringMap< EmptyStringSetTag, AllocatorTy >::StringMap(), and llvm::VPSCEVExpander::tryToExpand().

◆ readValuePack()