[llvm] Merge sourcelocation in CSEMIRBuilder::getDominatingInstrForID. (PR #90922)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 14:29:15 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(
----------------
adrian-prantl wrote:

I don't think I like this solution of keeping global state in the MachineBuilder over threading it through the API.

https://github.com/llvm/llvm-project/pull/90922


More information about the llvm-commits mailing list