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

Side by Side Diff: src/IceInst.h

Issue 1361803002: Subzero: Improve handling of alloca instructions of constant size. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a couple of basic tests Created 5 years, 2 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/IceCfg.cpp ('k') | src/IceTargetLowering.h » ('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 /// \file 10 /// \file
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 InstAlloca &operator=(const InstAlloca &) = delete; 239 InstAlloca &operator=(const InstAlloca &) = delete;
240 240
241 public: 241 public:
242 static InstAlloca *create(Cfg *Func, Operand *ByteCount, 242 static InstAlloca *create(Cfg *Func, Operand *ByteCount,
243 uint32_t AlignInBytes, Variable *Dest) { 243 uint32_t AlignInBytes, Variable *Dest) {
244 return new (Func->allocate<InstAlloca>()) 244 return new (Func->allocate<InstAlloca>())
245 InstAlloca(Func, ByteCount, AlignInBytes, Dest); 245 InstAlloca(Func, ByteCount, AlignInBytes, Dest);
246 } 246 }
247 uint32_t getAlignInBytes() const { return AlignInBytes; } 247 uint32_t getAlignInBytes() const { return AlignInBytes; }
248 Operand *getSizeInBytes() const { return getSrc(0); } 248 Operand *getSizeInBytes() const { return getSrc(0); }
249 bool getKnownFrameOffset() const { return KnownFrameOffset; }
250 void setKnownFrameOffset() { KnownFrameOffset = true; }
249 void dump(const Cfg *Func) const override; 251 void dump(const Cfg *Func) const override;
250 static bool classof(const Inst *Inst) { return Inst->getKind() == Alloca; } 252 static bool classof(const Inst *Inst) { return Inst->getKind() == Alloca; }
251 253
252 private: 254 private:
253 InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes, 255 InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes,
254 Variable *Dest); 256 Variable *Dest);
255 257
256 const uint32_t AlignInBytes; 258 const uint32_t AlignInBytes;
259 bool KnownFrameOffset = false;
257 }; 260 };
258 261
259 /// Binary arithmetic instruction. The source operands are captured in getSrc(0) 262 /// Binary arithmetic instruction. The source operands are captured in getSrc(0)
260 /// and getSrc(1). 263 /// and getSrc(1).
261 class InstArithmetic : public InstHighLevel { 264 class InstArithmetic : public InstHighLevel {
262 InstArithmetic() = delete; 265 InstArithmetic() = delete;
263 InstArithmetic(const InstArithmetic &) = delete; 266 InstArithmetic(const InstArithmetic &) = delete;
264 InstArithmetic &operator=(const InstArithmetic &) = delete; 267 InstArithmetic &operator=(const InstArithmetic &) = delete;
265 268
266 public: 269 public:
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 static void noteHead(Ice::Inst *, Ice::Inst *) {} 972 static void noteHead(Ice::Inst *, Ice::Inst *) {}
970 void deleteNode(Ice::Inst *) {} 973 void deleteNode(Ice::Inst *) {}
971 974
972 private: 975 private:
973 mutable ilist_half_node<Ice::Inst> Sentinel; 976 mutable ilist_half_node<Ice::Inst> Sentinel;
974 }; 977 };
975 978
976 } // end of namespace llvm 979 } // end of namespace llvm
977 980
978 #endif // SUBZERO_SRC_ICEINST_H 981 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698