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

Side by Side Diff: src/IceInst.h

Issue 1182603004: Subzero: Transform suitable Load/Arith/Store sequences into RMW ops. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 6 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 | « src/IceDefs.h ('k') | 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 // Store instruction. The address operand is captured, along with the 685 // Store instruction. The address operand is captured, along with the
686 // data operand to be stored into the address. 686 // data operand to be stored into the address.
687 class InstStore : public InstHighLevel { 687 class InstStore : public InstHighLevel {
688 InstStore() = delete; 688 InstStore() = delete;
689 InstStore(const InstStore &) = delete; 689 InstStore(const InstStore &) = delete;
690 InstStore &operator=(const InstStore &) = delete; 690 InstStore &operator=(const InstStore &) = delete;
691 691
692 public: 692 public:
693 static InstStore *create(Cfg *Func, Operand *Data, Operand *Addr, 693 static InstStore *create(Cfg *Func, Operand *Data, Operand *Addr,
694 uint32_t align = 1) { 694 uint32_t Align = 1) {
695 // TODO(kschimpf) Stop ignoring alignment specification. 695 // TODO(kschimpf) Stop ignoring alignment specification.
696 (void)align; 696 (void)Align;
697 return new (Func->allocate<InstStore>()) InstStore(Func, Data, Addr); 697 return new (Func->allocate<InstStore>()) InstStore(Func, Data, Addr);
698 } 698 }
699 Operand *getAddr() const { return getSrc(1); } 699 Operand *getAddr() const { return getSrc(1); }
700 Operand *getData() const { return getSrc(0); } 700 Operand *getData() const { return getSrc(0); }
701 Variable *getRmwBeacon() const { return llvm::dyn_cast<Variable>(getSrc(2)); }
702 void setRmwBeacon(Variable *Beacon);
701 void dump(const Cfg *Func) const override; 703 void dump(const Cfg *Func) const override;
702 static bool classof(const Inst *Inst) { return Inst->getKind() == Store; } 704 static bool classof(const Inst *Inst) { return Inst->getKind() == Store; }
703 705
704 private: 706 private:
705 InstStore(Cfg *Func, Operand *Data, Operand *Addr); 707 InstStore(Cfg *Func, Operand *Data, Operand *Addr);
706 ~InstStore() override {} 708 ~InstStore() override {}
707 }; 709 };
708 710
709 // Switch instruction. The single source operand is captured as 711 // Switch instruction. The single source operand is captured as
710 // getSrc(0). 712 // getSrc(0).
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 static void noteHead(Ice::Inst *, Ice::Inst *) {} 952 static void noteHead(Ice::Inst *, Ice::Inst *) {}
951 void deleteNode(Ice::Inst *) {} 953 void deleteNode(Ice::Inst *) {}
952 954
953 private: 955 private:
954 mutable ilist_half_node<Ice::Inst> Sentinel; 956 mutable ilist_half_node<Ice::Inst> Sentinel;
955 }; 957 };
956 958
957 } // end of namespace llvm 959 } // end of namespace llvm
958 960
959 #endif // SUBZERO_SRC_ICEINST_H 961 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « src/IceDefs.h ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698