OLD | NEW |
1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===// | 1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the Inst class and its target-independent | 10 // This file declares the Inst class and its target-independent |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 assert(Kind >= Target); | 834 assert(Kind >= Target); |
835 } | 835 } |
836 ~InstTarget() override {} | 836 ~InstTarget() override {} |
837 }; | 837 }; |
838 | 838 |
839 } // end of namespace Ice | 839 } // end of namespace Ice |
840 | 840 |
841 // Override the default ilist traits so that Inst's private ctor and | 841 // Override the default ilist traits so that Inst's private ctor and |
842 // deleted dtor aren't invoked. | 842 // deleted dtor aren't invoked. |
843 template <> | 843 template <> |
844 struct llvm::ilist_traits<Ice::Inst> : public llvm::ilist_default_traits< | 844 struct llvm::ilist_traits<Ice::Inst> |
845 Ice::Inst> { | 845 : public llvm::ilist_default_traits<Ice::Inst> { |
846 Ice::Inst *createSentinel() const { | 846 Ice::Inst *createSentinel() const { |
847 return static_cast<Ice::Inst *>(&Sentinel); | 847 return static_cast<Ice::Inst *>(&Sentinel); |
848 } | 848 } |
849 static void destroySentinel(Ice::Inst *) {} | 849 static void destroySentinel(Ice::Inst *) {} |
850 Ice::Inst *provideInitialHead() const { return createSentinel(); } | 850 Ice::Inst *provideInitialHead() const { return createSentinel(); } |
851 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); } | 851 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); } |
852 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 852 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
853 void deleteNode(Ice::Inst *) {} | 853 void deleteNode(Ice::Inst *) {} |
854 | 854 |
855 private: | 855 private: |
856 mutable ilist_half_node<Ice::Inst> Sentinel; | 856 mutable ilist_half_node<Ice::Inst> Sentinel; |
857 }; | 857 }; |
858 | 858 |
859 #endif // SUBZERO_SRC_ICEINST_H | 859 #endif // SUBZERO_SRC_ICEINST_H |
OLD | NEW |