[llvm] Merge sourcelocation in CSEMIRBuilder::getDominatingInstrForID. (PR #90922)
Shubham Sandeep Rastogi via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 11:40:27 PDT 2024
================
@@ -99,6 +100,8 @@ class LegalizationArtifactCombiner {
const LLT DstTy = MRI.getType(DstReg);
if (isInstLegal({TargetOpcode::G_CONSTANT, {DstTy}})) {
auto &CstVal = SrcMI->getOperand(1);
+ Builder.MergedLocation = DILocation::getMergedLocation(
----------------
rastogishubham wrote:
@arsenm I concur with Adrian, one of the issues with the current approach is that there are multiple code paths that reach `CSEMIRBuilder::getDominatingInstrForID` so I have to clear the `MergedLocation` right after using it for the dominating instruction. If pass the DILocation through the API, we can just have a default nullptr value on it, and it doesn't change much.
https://github.com/llvm/llvm-project/pull/90922
More information about the llvm-commits
mailing list