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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 assert(Kind >= Target); | 831 assert(Kind >= Target); |
832 } | 832 } |
833 ~InstTarget() override {} | 833 ~InstTarget() override {} |
834 }; | 834 }; |
835 | 835 |
836 } // end of namespace Ice | 836 } // end of namespace Ice |
837 | 837 |
838 // Override the default ilist traits so that Inst's private ctor and | 838 // Override the default ilist traits so that Inst's private ctor and |
839 // deleted dtor aren't invoked. | 839 // deleted dtor aren't invoked. |
840 template <> | 840 template <> |
841 struct llvm::ilist_traits<Ice::Inst> : public llvm::ilist_default_traits< | 841 struct llvm::ilist_traits<Ice::Inst> |
842 Ice::Inst> { | 842 : public llvm::ilist_default_traits<Ice::Inst> { |
843 Ice::Inst *createSentinel() const { | 843 Ice::Inst *createSentinel() const { |
844 return static_cast<Ice::Inst *>(&Sentinel); | 844 return static_cast<Ice::Inst *>(&Sentinel); |
845 } | 845 } |
846 static void destroySentinel(Ice::Inst *) {} | 846 static void destroySentinel(Ice::Inst *) {} |
847 Ice::Inst *provideInitialHead() const { return createSentinel(); } | 847 Ice::Inst *provideInitialHead() const { return createSentinel(); } |
848 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); } | 848 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); } |
849 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 849 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
850 void deleteNode(Ice::Inst *) {} | 850 void deleteNode(Ice::Inst *) {} |
851 | 851 |
852 private: | 852 private: |
853 mutable ilist_half_node<Ice::Inst> Sentinel; | 853 mutable ilist_half_node<Ice::Inst> Sentinel; |
854 }; | 854 }; |
855 | 855 |
856 #endif // SUBZERO_SRC_ICEINST_H | 856 #endif // SUBZERO_SRC_ICEINST_H |
OLD | NEW |