[PATCH] D74744: [TBLGEN] Inhibit generation of unneeded psets

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 15:40:26 PST 2020


rampitec added a comment.

FYI, these all PSets generated for AMDGPU with this patch instead of 255 of them:

  // Get the name of this register unit pressure set.
  const char *AMDGPUGenRegisterInfo::
  getRegPressureSetName(unsigned Idx) const {
    static const char *const PressureNameTable[] = {
      "SReg_32",
      "AGPR_32",
      "VGPR_32",
    };
    return PressureNameTable[Idx];
  }
  
  // Get the register unit pressure limit for this dimension.
  // This limit must be adjusted dynamically for reserved registers.
  unsigned AMDGPUGenRegisterInfo::
  getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const {
    static const uint16_t PressureLimitTable[] = {
      144,        // 0: SReg_32
      256,        // 1: AGPR_32
      256,        // 2: VGPR_32
    };
    return PressureLimitTable[Idx];
  }
  
  /// Table of pressure sets per register class or unit.
  static const int RCSetsTable[] = {
    /* 0 */ 0, -1,
    /* 2 */ 1, -1,
    /* 4 */ 2, -1,
  };


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74744/new/

https://reviews.llvm.org/D74744





More information about the llvm-commits mailing list