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

Side by Side Diff: src/assembler.h

Issue 802183004: Subzero: Use CFG-local arena allocation for relevant containers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Typo fix Created 6 years 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/PNaClTranslator.cpp ('k') | no next file » | 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/assembler.h - Integrated assembler -----------*- C++ -*-===// 1 //===- subzero/src/assembler.h - Integrated assembler -----------*- C++ -*-===//
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 // 5 //
6 // Modified by the Subzero authors. 6 // Modified by the Subzero authors.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // The Subzero Code Generator 10 // The Subzero Code Generator
11 // 11 //
12 // This file is distributed under the University of Illinois Open Source 12 // This file is distributed under the University of Illinois Open Source
13 // License. See LICENSE.TXT for details. 13 // License. See LICENSE.TXT for details.
14 // 14 //
15 //===----------------------------------------------------------------------===// 15 //===----------------------------------------------------------------------===//
16 // 16 //
17 // This file declares the Assembler base class. Instructions are assembled 17 // This file declares the Assembler base class. Instructions are assembled
18 // by architecture-specific assemblers that derive from this base class. 18 // by architecture-specific assemblers that derive from this base class.
19 // This base class manages buffers and fixups for emitting code, etc. 19 // This base class manages buffers and fixups for emitting code, etc.
20 // 20 //
21 //===----------------------------------------------------------------------===// 21 //===----------------------------------------------------------------------===//
22 22
23 #ifndef SUBZERO_SRC_ASSEMBLER_H 23 #ifndef SUBZERO_SRC_ASSEMBLER_H
24 #define SUBZERO_SRC_ASSEMBLER_H 24 #define SUBZERO_SRC_ASSEMBLER_H
25 25
26 #include "IceDefs.h" 26 #include "IceDefs.h"
27
28 #include "IceFixups.h" 27 #include "IceFixups.h"
29 #include "llvm/Support/Allocator.h"
30 28
31 namespace Ice { 29 namespace Ice {
32 30
33 // Forward declarations. 31 // Forward declarations.
34 class Assembler; 32 class Assembler;
35 class AssemblerFixup; 33 class AssemblerFixup;
36 class AssemblerBuffer; 34 class AssemblerBuffer;
37 class ConstantRelocatable; 35 class ConstantRelocatable;
38 36
39 // Assembler fixups are positions in generated code that hold relocation 37 // Assembler fixups are positions in generated code that hold relocation
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Mark the current text location as the start of a CFG node 223 // Mark the current text location as the start of a CFG node
226 // (represented by NodeNumber). 224 // (represented by NodeNumber).
227 virtual void BindCfgNodeLabel(SizeT NodeNumber) = 0; 225 virtual void BindCfgNodeLabel(SizeT NodeNumber) = 0;
228 226
229 // Return a view of all the bytes of code for the current function. 227 // Return a view of all the bytes of code for the current function.
230 llvm::StringRef getBufferView() const; 228 llvm::StringRef getBufferView() const;
231 229
232 void emitIASBytes(GlobalContext *Ctx) const; 230 void emitIASBytes(GlobalContext *Ctx) const;
233 231
234 private: 232 private:
235 llvm::BumpPtrAllocator Allocator; 233 ArenaAllocator Allocator;
236 234
237 protected: 235 protected:
238 AssemblerBuffer buffer_; 236 AssemblerBuffer buffer_;
239 }; 237 };
240 238
241 } // end of namespace Ice 239 } // end of namespace Ice
242 240
243 #endif // SUBZERO_SRC_ASSEMBLER_H_ 241 #endif // SUBZERO_SRC_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698