[NFC] Remove unused code (#5554)

This commit is contained in:
Natalie Chouinard 2024-02-01 09:47:42 -05:00 committed by GitHub
parent ad11927e6c
commit de65e81740
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,28 +27,6 @@ namespace spvtools {
namespace opt {
namespace analysis {
// Class for representing a use of id. Note that:
// * Result type id is a use.
// * Ids referenced in OpSectionMerge & OpLoopMerge are considered as use.
// * Ids referenced in OpPhi's in operands are considered as use.
struct Use {
Instruction* inst; // Instruction using the id.
uint32_t operand_index; // logical operand index of the id use. This can be
// the index of result type id.
};
inline bool operator==(const Use& lhs, const Use& rhs) {
return lhs.inst == rhs.inst && lhs.operand_index == rhs.operand_index;
}
inline bool operator!=(const Use& lhs, const Use& rhs) { return !(lhs == rhs); }
inline bool operator<(const Use& lhs, const Use& rhs) {
if (lhs.inst < rhs.inst) return true;
if (lhs.inst > rhs.inst) return false;
return lhs.operand_index < rhs.operand_index;
}
// Definition should never be null. User can be null, however, such an entry
// should be used only for searching (e.g. all users of a particular definition)
// and never stored in a container.