Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1305)

Side by Side Diff: src/IceInst.h

Issue 1127963004: Subzero ARM: lowerArguments (GPR), basic legalize(), and lowerRet(i32, i64). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fix warnings, etc Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceInst.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 Store, 60 Store,
61 Switch, 61 Switch,
62 Assign, // not part of LLVM/PNaCl bitcode 62 Assign, // not part of LLVM/PNaCl bitcode
63 BundleLock, // not part of LLVM/PNaCl bitcode 63 BundleLock, // not part of LLVM/PNaCl bitcode
64 BundleUnlock, // not part of LLVM/PNaCl bitcode 64 BundleUnlock, // not part of LLVM/PNaCl bitcode
65 FakeDef, // not part of LLVM/PNaCl bitcode 65 FakeDef, // not part of LLVM/PNaCl bitcode
66 FakeUse, // not part of LLVM/PNaCl bitcode 66 FakeUse, // not part of LLVM/PNaCl bitcode
67 FakeKill, // not part of LLVM/PNaCl bitcode 67 FakeKill, // not part of LLVM/PNaCl bitcode
68 Target // target-specific low-level ICE 68 Target // target-specific low-level ICE
69 // Anything >= Target is an InstTarget subclass. 69 // Anything >= Target is an InstTarget subclass.
70 // Note that the value-spaces are shared across targets.
71 // To avoid confusion over the definition of shared values,
72 // an object specific to one target should never be passed
73 // to a different target.
70 }; 74 };
71 InstKind getKind() const { return Kind; } 75 InstKind getKind() const { return Kind; }
72 76
73 InstNumberT getNumber() const { return Number; } 77 InstNumberT getNumber() const { return Number; }
74 void renumber(Cfg *Func); 78 void renumber(Cfg *Func);
75 enum { 79 enum {
76 NumberDeleted = -1, 80 NumberDeleted = -1,
77 NumberSentinel = 0, 81 NumberSentinel = 0,
78 NumberInitial = 2, 82 NumberInitial = 2,
79 NumberExtended = NumberInitial - 1 83 NumberExtended = NumberInitial - 1
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 static bool classof(const Inst *Inst) { return Inst->getKind() >= Target; } 920 static bool classof(const Inst *Inst) { return Inst->getKind() >= Target; }
917 921
918 protected: 922 protected:
919 InstTarget(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) 923 InstTarget(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest)
920 : Inst(Func, Kind, MaxSrcs, Dest) { 924 : Inst(Func, Kind, MaxSrcs, Dest) {
921 assert(Kind >= Target); 925 assert(Kind >= Target);
922 } 926 }
923 ~InstTarget() override {} 927 ~InstTarget() override {}
924 }; 928 };
925 929
930 bool checkForRedundantAssign(const Variable *Dest, const Operand *Source);
931
926 } // end of namespace Ice 932 } // end of namespace Ice
927 933
928 namespace llvm { 934 namespace llvm {
929 935
930 // Override the default ilist traits so that Inst's private ctor and 936 // Override the default ilist traits so that Inst's private ctor and
931 // deleted dtor aren't invoked. 937 // deleted dtor aren't invoked.
932 template <> 938 template <>
933 struct ilist_traits<Ice::Inst> : public ilist_default_traits<Ice::Inst> { 939 struct ilist_traits<Ice::Inst> : public ilist_default_traits<Ice::Inst> {
934 Ice::Inst *createSentinel() const { 940 Ice::Inst *createSentinel() const {
935 return static_cast<Ice::Inst *>(&Sentinel); 941 return static_cast<Ice::Inst *>(&Sentinel);
936 } 942 }
937 static void destroySentinel(Ice::Inst *) {} 943 static void destroySentinel(Ice::Inst *) {}
938 Ice::Inst *provideInitialHead() const { return createSentinel(); } 944 Ice::Inst *provideInitialHead() const { return createSentinel(); }
939 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); } 945 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); }
940 static void noteHead(Ice::Inst *, Ice::Inst *) {} 946 static void noteHead(Ice::Inst *, Ice::Inst *) {}
941 void deleteNode(Ice::Inst *) {} 947 void deleteNode(Ice::Inst *) {}
942 948
943 private: 949 private:
944 mutable ilist_half_node<Ice::Inst> Sentinel; 950 mutable ilist_half_node<Ice::Inst> Sentinel;
945 }; 951 };
946 952
947 } // end of namespace llvm 953 } // end of namespace llvm
948 954
949 #endif // SUBZERO_SRC_ICEINST_H 955 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « no previous file | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698