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

Side by Side Diff: src/IceTargetLowering.h

Issue 1241763002: ARM: Add a postRA pass to legalize stack offsets. Greedy approach (reserve IP). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review Created 5 years, 4 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/IceOperand.cpp ('k') | src/IceTargetLowering.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/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- 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 /// \file 10 /// \file
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 InstList::iterator Next; 84 InstList::iterator Next;
85 /// Begin is a copy of Insts.begin(), used if iterators are moved backward. 85 /// Begin is a copy of Insts.begin(), used if iterators are moved backward.
86 InstList::iterator Begin; 86 InstList::iterator Begin;
87 /// End is a copy of Insts.end(), used if Next needs to be advanced. 87 /// End is a copy of Insts.end(), used if Next needs to be advanced.
88 InstList::iterator End; 88 InstList::iterator End;
89 89
90 void skipDeleted(InstList::iterator &I) const; 90 void skipDeleted(InstList::iterator &I) const;
91 void advanceForward(InstList::iterator &I) const; 91 void advanceForward(InstList::iterator &I) const;
92 }; 92 };
93 93
94 /// A helper class to advance the LoweringContext at each loop iteration.
95 class PostIncrLoweringContext {
96 PostIncrLoweringContext() = delete;
97 PostIncrLoweringContext(const PostIncrLoweringContext &) = delete;
98 PostIncrLoweringContext &operator=(const PostIncrLoweringContext &) = delete;
99
100 public:
101 explicit PostIncrLoweringContext(LoweringContext &Context)
102 : Context(Context) {}
103 ~PostIncrLoweringContext() {
104 Context.advanceCur();
105 Context.advanceNext();
106 }
107
108 private:
109 LoweringContext &Context;
110 };
111
94 class TargetLowering { 112 class TargetLowering {
95 TargetLowering() = delete; 113 TargetLowering() = delete;
96 TargetLowering(const TargetLowering &) = delete; 114 TargetLowering(const TargetLowering &) = delete;
97 TargetLowering &operator=(const TargetLowering &) = delete; 115 TargetLowering &operator=(const TargetLowering &) = delete;
98 116
99 public: 117 public:
100 // TODO(jvoung): return a unique_ptr like the other factory functions. 118 // TODO(jvoung): return a unique_ptr like the other factory functions.
101 static TargetLowering *createLowering(TargetArch Target, Cfg *Func); 119 static TargetLowering *createLowering(TargetArch Target, Cfg *Func);
102 static std::unique_ptr<Assembler> createAssembler(TargetArch Target, 120 static std::unique_ptr<Assembler> createAssembler(TargetArch Target,
103 Cfg *Func); 121 Cfg *Func);
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 virtual void lower() {} 444 virtual void lower() {}
427 445
428 protected: 446 protected:
429 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 447 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
430 GlobalContext *Ctx; 448 GlobalContext *Ctx;
431 }; 449 };
432 450
433 } // end of namespace Ice 451 } // end of namespace Ice
434 452
435 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 453 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceOperand.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698