|
LLVM 24.0.0git
|
#include "llvm/CodeGen/DbgEntityHistoryCalculator.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/CodeGen/LexicalScopes.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/TargetLowering.h"#include "llvm/CodeGen/TargetRegisterInfo.h"#include "llvm/CodeGen/TargetSubtargetInfo.h"#include "llvm/IR/DebugInfoMetadata.h"#include "llvm/IR/DebugLoc.h"#include "llvm/MC/MCRegisterInfo.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include <cassert>#include <map>#include <optional>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "dwarfdebug" |
Functions | |
| static std::optional< ArrayRef< InsnRange >::iterator > | intersects (const MachineInstr *StartMI, const MachineInstr *EndMI, ArrayRef< InsnRange > Ranges, const InstructionOrdering &Ordering) |
| Check if the instruction range [StartMI, EndMI] intersects any instruction range in Ranges. | |
| static void | dropRegDescribedVar (RegDescribedVarsMap &RegVars, Register Reg, InlinedEntity Var) |
| static void | addRegDescribedVar (RegDescribedVarsMap &RegVars, Register Reg, InlinedEntity Var) |
| static void | clobberRegEntries (InlinedEntity Var, Register Reg, const MachineInstr &ClobberingInstr, DbgValueEntriesMap &LiveEntries, DbgValueHistoryMap &HistMap, SmallVectorImpl< Register > &FellowRegisters) |
Create a clobbering entry and end all open debug value entries for Var that are described by Reg using that entry. | |
| static void | handleNewDebugValue (InlinedEntity Var, const MachineInstr &DV, RegDescribedVarsMap &RegVars, DbgValueEntriesMap &LiveEntries, DbgValueHistoryMap &HistMap) |
Add a new debug value for Var. Closes all overlapping debug values. | |
| static void | clobberRegisterUses (RegDescribedVarsMap &RegVars, RegDescribedVarsMap::iterator I, DbgValueHistoryMap &HistMap, DbgValueEntriesMap &LiveEntries, const MachineInstr &ClobberingInstr) |
| static void | clobberRegisterUses (RegDescribedVarsMap &RegVars, Register Reg, DbgValueHistoryMap &HistMap, DbgValueEntriesMap &LiveEntries, const MachineInstr &ClobberingInstr) |
| #define DEBUG_TYPE "dwarfdebug" |
Definition at line 32 of file DbgEntityHistoryCalculator.cpp.
|
static |
Definition at line 315 of file DbgEntityHistoryCalculator.cpp.
References assert(), llvm::is_contained(), and Reg.
Referenced by handleNewDebugValue().
|
static |
Create a clobbering entry and end all open debug value entries for Var that are described by Reg using that entry.
Inserts into FellowRegisters the set of Registers that were also used to describe Var alongside Reg.
Definition at line 327 of file DbgEntityHistoryCalculator.cpp.
References assert(), llvm::SmallSet< T, N, C >::contains(), llvm::SmallVectorImpl< T >::erase(), llvm::DbgValueHistoryMap::getEntry(), llvm::SmallSet< T, N, C >::insert(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), Reg, and llvm::DbgValueHistoryMap::startClobber().
Referenced by clobberRegisterUses().
|
static |
Definition at line 436 of file DbgEntityHistoryCalculator.cpp.
References clobberRegEntries(), dropRegDescribedVar(), I, and Reg.
Referenced by llvm::calculateDbgEntityHistory(), and clobberRegisterUses().
|
static |
Definition at line 457 of file DbgEntityHistoryCalculator.cpp.
References clobberRegisterUses(), I, and Reg.
|
static |
Definition at line 301 of file DbgEntityHistoryCalculator.cpp.
References assert(), llvm::find(), I, and Reg.
Referenced by clobberRegisterUses(), and handleNewDebugValue().
|
static |
Add a new debug value for Var. Closes all overlapping debug values.
Definition at line 369 of file DbgEntityHistoryCalculator.cpp.
References addRegDescribedVar(), assert(), llvm::MachineInstr::debug_operands(), dropRegDescribedVar(), llvm::SmallVectorImpl< T >::erase(), llvm::DIExpression::fragmentsOverlap(), llvm::MachineInstr::getDebugExpression(), llvm::DbgValueHistoryMap::getEntry(), I, llvm::SmallVectorImpl< T >::insert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert_or_assign(), llvm::MachineInstr::isDebugEntryValue(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::DbgValueHistoryMap::startDbgValue().
Referenced by llvm::calculateDbgEntityHistory().
|
static |
Check if the instruction range [StartMI, EndMI] intersects any instruction range in Ranges.
EndMI can be nullptr to indicate that the range is unbounded. Assumes Ranges is ordered and disjoint. Returns true and points to the first intersecting scope range if one exists.
Definition at line 113 of file DbgEntityHistoryCalculator.cpp.
Referenced by llvm::ResourceSegments::add(), and llvm::DbgValueHistoryMap::trimLocationRanges().