[llvm] GlobalISel lane masks merging (PR #73337)

Petar Avramovic via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 05:51:48 PST 2023


================
@@ -0,0 +1,79 @@
+#include "GCNSubtarget.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/CodeGen/MachinePostDominators.h"
+#include "llvm/CodeGen/MachineSSAUpdater.h"
+
+using namespace llvm;
+
+struct Incoming {
+  Register Reg;
+  MachineBasicBlock *Block;
+  Register UpdatedReg;
+
+  Incoming(Register Reg, MachineBasicBlock *Block, Register UpdatedReg)
+      : Reg(Reg), Block(Block), UpdatedReg(UpdatedReg) {}
+};
+
+Register createLaneMaskReg(MachineRegisterInfo *MRI,
+                           Register *LaneMaskRegAttrs);
+
+class PhiLoweringHelper {
+public:
+  PhiLoweringHelper(MachineFunction *MF, MachineDominatorTree *DT,
+                    MachinePostDominatorTree *PDT);
+  virtual ~PhiLoweringHelper() = default;
----------------
petar-avramovic wrote:

There are two:
class Vreg1LoweringHelper : public PhiLoweringHelper in SILowerI1Copies.cpp for sdag 
class DivergenceLoweringHelper : public PhiLoweringHelper in AMDGPUGlobalISelDivergenceLowering.cpp for globalisel

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


More information about the llvm-commits mailing list