aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2024-03-19 20:07:07 +0000
committerGitHub <noreply@github.com>2024-03-19 20:07:07 +0000
commitffd08c7759000f55332f1657a1fab64a7adc03fd (patch)
treeffc35f7afc77e9aa3ff89031c72a9ec8e7321b2b /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent3cd9dccbb4235e057d0e53ab0b9673f3766800d4 (diff)
downloadllvm-ffd08c7759000f55332f1657a1fab64a7adc03fd.zip
llvm-ffd08c7759000f55332f1657a1fab64a7adc03fd.tar.gz
llvm-ffd08c7759000f55332f1657a1fab64a7adc03fd.tar.bz2
[RemoveDIs][NFC] Rename DPValue -> DbgVariableRecord (#85216)
This is the major rename patch that prior patches have built towards. The DPValue class is being renamed to DbgVariableRecord, which reflects the updated terminology for the "final" implementation of the RemoveDI feature. This is a pure string substitution + clang-format patch. The only manual component of this patch was determining where to perform these string substitutions: `DPValue` and `DPV` are almost exclusively used for DbgRecords, *except* for: - llvm/lib/target, where 'DP' is used to mean double-precision, and so appears as part of .td files and in variable names. NB: There is a single existing use of `DPValue` here that refers to debug info, which I've manually updated. - llvm/tools/gold, where 'LDPV' is used as a prefix for symbol visibility enums. Outside of these places, I've applied several basic string substitutions, with the intent that they only affect DbgRecord-related identifiers; I've checked them as I went through to verify this, with reasonable confidence that there are no unintended changes that slipped through the cracks. The substitutions applied are all case-sensitive, and are applied in the order shown: ``` DPValue -> DbgVariableRecord DPVal -> DbgVarRec DPV -> DVR ``` Following the previous rename patches, it should be the case that there are no instances of any of these strings that are meant to refer to the general case of DbgRecords, or anything other than the DPValue class. The idea behind this patch is therefore that pure string substitution is correct in all cases as long as these assumptions hold.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 8780f4b..dd19ee1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1245,14 +1245,14 @@ void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
}
}
- // We must skip DPValues if they've already been processed above as we
- // have just emitted the debug values resulting from assignment tracking
- // analysis, making any existing DPValues redundant (and probably less
- // correct). We still need to process DPLabels. This does sink DPLabels
+ // We must skip DbgVariableRecords if they've already been processed above as
+ // we have just emitted the debug values resulting from assignment tracking
+ // analysis, making any existing DbgVariableRecords redundant (and probably
+ // less correct). We still need to process DPLabels. This does sink DPLabels
// to the bottom of the group of debug records. That sholdn't be important
- // as it does so deterministcally and ordering between DPLabels and DPValues
- // is immaterial (other than for MIR/IR printing).
- bool SkipDPValues = DAG.getFunctionVarLocs();
+ // as it does so deterministcally and ordering between DPLabels and
+ // DbgVariableRecords is immaterial (other than for MIR/IR printing).
+ bool SkipDbgVariableRecords = DAG.getFunctionVarLocs();
// Is there is any debug-info attached to this instruction, in the form of
// DbgRecord non-instruction debug-info records.
for (DbgRecord &DR : I.getDbgRecordRange()) {
@@ -1264,44 +1264,45 @@ void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
continue;
}
- if (SkipDPValues)
+ if (SkipDbgVariableRecords)
continue;
- DPValue &DPV = cast<DPValue>(DR);
- DILocalVariable *Variable = DPV.getVariable();
- DIExpression *Expression = DPV.getExpression();
+ DbgVariableRecord &DVR = cast<DbgVariableRecord>(DR);
+ DILocalVariable *Variable = DVR.getVariable();
+ DIExpression *Expression = DVR.getExpression();
dropDanglingDebugInfo(Variable, Expression);
- if (DPV.getType() == DPValue::LocationType::Declare) {
- if (FuncInfo.PreprocessedDPVDeclares.contains(&DPV))
+ if (DVR.getType() == DbgVariableRecord::LocationType::Declare) {
+ if (FuncInfo.PreprocessedDVRDeclares.contains(&DVR))
continue;
- LLVM_DEBUG(dbgs() << "SelectionDAG visiting dbg_declare: " << DPV
+ LLVM_DEBUG(dbgs() << "SelectionDAG visiting dbg_declare: " << DVR
<< "\n");
- handleDebugDeclare(DPV.getVariableLocationOp(0), Variable, Expression,
- DPV.getDebugLoc());
+ handleDebugDeclare(DVR.getVariableLocationOp(0), Variable, Expression,
+ DVR.getDebugLoc());
continue;
}
- // A DPValue with no locations is a kill location.
- SmallVector<Value *, 4> Values(DPV.location_ops());
+ // A DbgVariableRecord with no locations is a kill location.
+ SmallVector<Value *, 4> Values(DVR.location_ops());
if (Values.empty()) {
- handleKillDebugValue(Variable, Expression, DPV.getDebugLoc(),
+ handleKillDebugValue(Variable, Expression, DVR.getDebugLoc(),
SDNodeOrder);
continue;
}
- // A DPValue with an undef or absent location is also a kill location.
+ // A DbgVariableRecord with an undef or absent location is also a kill
+ // location.
if (llvm::any_of(Values,
[](Value *V) { return !V || isa<UndefValue>(V); })) {
- handleKillDebugValue(Variable, Expression, DPV.getDebugLoc(),
+ handleKillDebugValue(Variable, Expression, DVR.getDebugLoc(),
SDNodeOrder);
continue;
}
- bool IsVariadic = DPV.hasArgList();
- if (!handleDebugValue(Values, Variable, Expression, DPV.getDebugLoc(),
+ bool IsVariadic = DVR.hasArgList();
+ if (!handleDebugValue(Values, Variable, Expression, DVR.getDebugLoc(),
SDNodeOrder, IsVariadic)) {
addDanglingDebugInfo(Values, Variable, Expression, IsVariadic,
- DPV.getDebugLoc(), SDNodeOrder);
+ DVR.getDebugLoc(), SDNodeOrder);
}
}
}