Skip to content

Commit 1f71b53

Browse files
a new duplicate tracker
1 parent 82506e2 commit 1f71b53

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define LLVM_LIB_TARGET_SPIRV_SPIRVTYPEMANAGER_H
1818

1919
#include "MCTargetDesc/SPIRVBaseInfo.h"
20-
#include "SPIRVDuplicatesTracker.h"
20+
#include "SPIRVIRMapping.h"
2121
#include "SPIRVInstrInfo.h"
2222
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
2323
#include "llvm/IR/Constant.h"
@@ -27,7 +27,7 @@ namespace llvm {
2727
class SPIRVSubtarget;
2828
using SPIRVType = const MachineInstr;
2929

30-
class SPIRVGlobalRegistry : public SPIRVIRMap {
30+
class SPIRVGlobalRegistry : public SPIRVIRMapping {
3131
// Registers holding values which have types associated with them.
3232
// Initialized upon VReg definition in IRTranslator.
3333
// Do not confuse this with DuplicatesTracker as DT maps Type* to <MF, Reg>
@@ -454,12 +454,6 @@ class SPIRVGlobalRegistry : public SPIRVIRMap {
454454
getOrCreateSpecialType(const Type *Ty, MachineIRBuilder &MIRBuilder,
455455
SPIRV::AccessQualifier::AccessQualifier AccQual);
456456

457-
std::tuple<Register, ConstantInt *, bool, unsigned> getOrCreateConstIntReg(
458-
uint64_t Val, SPIRVType *SpvType, MachineIRBuilder *MIRBuilder,
459-
MachineInstr *I = nullptr, const SPIRVInstrInfo *TII = nullptr);
460-
std::tuple<Register, ConstantFP *, bool, unsigned> getOrCreateConstFloatReg(
461-
APFloat Val, SPIRVType *SpvType, MachineIRBuilder *MIRBuilder,
462-
MachineInstr *I = nullptr, const SPIRVInstrInfo *TII = nullptr);
463457
SPIRVType *finishCreatingSPIRVType(const Type *LLVMTy, SPIRVType *SpirvType);
464458
Register getOrCreateBaseRegister(Constant *Val, MachineInstr &I,
465459
SPIRVType *SpvType,

llvm/lib/Target/SPIRV/SPIRVDuplicatesTracker.h renamed to llvm/lib/Target/SPIRV/SPIRVIRMapping.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
15-
#define LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
14+
#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVIRMAPPING_H
15+
#define LLVM_LIB_TARGET_SPIRV_SPIRVIRMAPPING_H
1616

1717
#include "MCTargetDesc/SPIRVBaseInfo.h"
1818
#include "MCTargetDesc/SPIRVMCTargetDesc.h"
@@ -118,7 +118,7 @@ inline IRHandle make_descr_ptr(const void *Ptr) {
118118
// Bi-directional mappings between LLVM entities and (v-reg, machine function)
119119
// pairs support management of unique SPIR-V definitions per machine function
120120
// per an LLVM/GlobalISel entity (e.g., Type, Constant, Machine Instruction).
121-
class SPIRVIRMap {
121+
class SPIRVIRMapping {
122122
DenseMap < std::pair<IRHandle, const MachineFunction *>,
123123
const MachineInstr *MI >> Vregs;
124124
DenseMap<const MachineInstr *, IRHandle> Defs;
@@ -176,4 +176,4 @@ class SPIRVIRMap {
176176
}
177177
};
178178
} // namespace llvm
179-
#endif // LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
179+
#endif // LLVM_LIB_TARGET_SPIRV_SPIRVIRMAPPING_H

0 commit comments

Comments
 (0)