[llvm] [RFC] implement convergence control in MIR using SelectionDAG (PR #71785)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 21:48:56 PST 2024
================
@@ -1193,7 +1193,9 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
// Run post-isel target hook to adjust this instruction if needed.
if (II.hasPostISelHook())
- TLI->AdjustInstrPostInstrSelection(*MIB, Node);
+ TLI->AdjustInstrPostInstrSelection(
+ *MIB, Node,
+ [this, &VRBaseMap](SDValue Op) { return getVR(Op, VRBaseMap); });
----------------
ssahasra wrote:
Actually, the `InstEmitter::getVR()` method invoked inside that callback does extra work like creating a new reg for every use of an implicit-def. So the current design looks like the right way to me, unless I am missing something.
https://github.com/llvm/llvm-project/pull/71785
More information about the llvm-commits
mailing list