mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
SelectionDAG: Use specialized metadata nodes in EmitFuncArgumentDbgValue(), NFC
Use `MDLocalVariable` and `MDExpression` directly for the arguments of `EmitFuncArgumentDbgValue()` to simplify a follow-up patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3ba15a9c9
commit
9dcb78c676
@ -998,8 +998,8 @@ void SelectionDAGBuilder::resolveDanglingDebugInfo(const Value *V,
|
|||||||
const DbgValueInst *DI = DDI.getDI();
|
const DbgValueInst *DI = DDI.getDI();
|
||||||
DebugLoc dl = DDI.getdl();
|
DebugLoc dl = DDI.getdl();
|
||||||
unsigned DbgSDNodeOrder = DDI.getSDNodeOrder();
|
unsigned DbgSDNodeOrder = DDI.getSDNodeOrder();
|
||||||
MDNode *Variable = DI->getVariable();
|
MDLocalVariable *Variable = DI->getVariable();
|
||||||
MDNode *Expr = DI->getExpression();
|
MDExpression *Expr = DI->getExpression();
|
||||||
uint64_t Offset = DI->getOffset();
|
uint64_t Offset = DI->getOffset();
|
||||||
// A dbg.value for an alloca is always indirect.
|
// A dbg.value for an alloca is always indirect.
|
||||||
bool IsIndirect = isa<AllocaInst>(V) || Offset != 0;
|
bool IsIndirect = isa<AllocaInst>(V) || Offset != 0;
|
||||||
@ -4448,11 +4448,9 @@ static unsigned getTruncatedArgReg(const SDValue &N) {
|
|||||||
/// EmitFuncArgumentDbgValue - If the DbgValueInst is a dbg_value of a function
|
/// EmitFuncArgumentDbgValue - If the DbgValueInst is a dbg_value of a function
|
||||||
/// argument, create the corresponding DBG_VALUE machine instruction for it now.
|
/// argument, create the corresponding DBG_VALUE machine instruction for it now.
|
||||||
/// At the end of instruction selection, they will be inserted to the entry BB.
|
/// At the end of instruction selection, they will be inserted to the entry BB.
|
||||||
bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V,
|
bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(
|
||||||
MDNode *Variable,
|
const Value *V, MDLocalVariable *Variable, MDExpression *Expr,
|
||||||
MDNode *Expr, int64_t Offset,
|
int64_t Offset, bool IsIndirect, const SDValue &N) {
|
||||||
bool IsIndirect,
|
|
||||||
const SDValue &N) {
|
|
||||||
const Argument *Arg = dyn_cast<Argument>(V);
|
const Argument *Arg = dyn_cast<Argument>(V);
|
||||||
if (!Arg)
|
if (!Arg)
|
||||||
return false;
|
return false;
|
||||||
@ -4636,8 +4634,8 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
|||||||
}
|
}
|
||||||
case Intrinsic::dbg_declare: {
|
case Intrinsic::dbg_declare: {
|
||||||
const DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
|
const DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
|
||||||
MDNode *Variable = DI.getVariable();
|
MDLocalVariable *Variable = DI.getVariable();
|
||||||
MDNode *Expression = DI.getExpression();
|
MDExpression *Expression = DI.getExpression();
|
||||||
const Value *Address = DI.getAddress();
|
const Value *Address = DI.getAddress();
|
||||||
DIVariable DIVar(Variable);
|
DIVariable DIVar(Variable);
|
||||||
assert((!DIVar || DIVar.isVariable()) &&
|
assert((!DIVar || DIVar.isVariable()) &&
|
||||||
@ -4724,8 +4722,8 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
|||||||
if (!DIVar)
|
if (!DIVar)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
MDNode *Variable = DI.getVariable();
|
MDLocalVariable *Variable = DI.getVariable();
|
||||||
MDNode *Expression = DI.getExpression();
|
MDExpression *Expression = DI.getExpression();
|
||||||
uint64_t Offset = DI.getOffset();
|
uint64_t Offset = DI.getOffset();
|
||||||
const Value *V = DI.getValue();
|
const Value *V = DI.getValue();
|
||||||
if (!V)
|
if (!V)
|
||||||
|
@ -823,9 +823,9 @@ private:
|
|||||||
/// EmitFuncArgumentDbgValue - If V is an function argument then create
|
/// EmitFuncArgumentDbgValue - If V is an function argument then create
|
||||||
/// corresponding DBG_VALUE machine instruction for it now. At the end of
|
/// corresponding DBG_VALUE machine instruction for it now. At the end of
|
||||||
/// instruction selection, they will be inserted to the entry BB.
|
/// instruction selection, they will be inserted to the entry BB.
|
||||||
bool EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable, MDNode *Expr,
|
bool EmitFuncArgumentDbgValue(const Value *V, MDLocalVariable *Variable,
|
||||||
int64_t Offset, bool IsIndirect,
|
MDExpression *Expr, int64_t Offset,
|
||||||
const SDValue &N);
|
bool IsIndirect, const SDValue &N);
|
||||||
|
|
||||||
/// Return the next block after MBB, or nullptr if there is none.
|
/// Return the next block after MBB, or nullptr if there is none.
|
||||||
MachineBasicBlock *NextBlock(MachineBasicBlock *MBB);
|
MachineBasicBlock *NextBlock(MachineBasicBlock *MBB);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user