From b370ba10d651f723af67669c585c655272578fa0 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Mon, 6 Jan 2025 11:22:12 +0000 Subject: [PATCH] Ignore source mapping for LLVM debug, lifetime, invariant instructions --- .../driver/shaders/dxil/dxil_disassemble.cpp | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp b/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp index 51c4686ad..c0f100072 100644 --- a/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_disassemble.cpp @@ -113,10 +113,10 @@ bool IsLLVMIntrinsicCall(const Instruction &inst) bool ShouldIgnoreSourceMapping(const Instruction &inst) { - // Do not set source mapping for handle creation instructions if(inst.op == Operation::Call) { rdcstr funcCallName = inst.getFuncCall()->name; + // Do not set source mapping for handle creation instructions if(funcCallName.beginsWith("dx.op.")) { DXOp dxOpCode = DXOp::NumOpCodes; @@ -131,6 +131,24 @@ bool ShouldIgnoreSourceMapping(const Instruction &inst) default: break; } } + else if(funcCallName.beginsWith("llvm.")) + { + // Do not set source mapping for LLVM debug instructions + if(funcCallName.beginsWith("llvm.dbg.")) + { + return true; + } + // Do not set source mapping for LLVM lifetime instructions + else if(funcCallName.beginsWith("llvm.lifetime.")) + { + return true; + } + // Do not set source mapping for LLVM invariant instructions + else if(funcCallName.beginsWith("llvm.invariant")) + { + return true; + } + } } return false; }