mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 17:21:06 +00:00
[NFC] Remove unused code (#5554)
This commit is contained in:
parent
ad11927e6c
commit
de65e81740
@ -27,28 +27,6 @@ namespace spvtools {
|
|||||||
namespace opt {
|
namespace opt {
|
||||||
namespace analysis {
|
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
|
// 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)
|
// should be used only for searching (e.g. all users of a particular definition)
|
||||||
// and never stored in a container.
|
// and never stored in a container.
|
||||||
|
Loading…
Reference in New Issue
Block a user