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

Side by Side Diff: src/IceTargetLowering.h

Issue 961413002: Subzero: Clean up the runtime implementation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Move the helper function names into a central place Created 5 years, 9 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
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 // This file declares the TargetLowering, LoweringContext, and 10 // This file declares the TargetLowering, LoweringContext, and
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 Cfg *Func; 245 Cfg *Func;
246 GlobalContext *Ctx; 246 GlobalContext *Ctx;
247 const bool RandomizeRegisterAllocation; 247 const bool RandomizeRegisterAllocation;
248 bool HasComputedFrame; 248 bool HasComputedFrame;
249 bool CallsReturnsTwice; 249 bool CallsReturnsTwice;
250 // StackAdjustment keeps track of the current stack offset from its 250 // StackAdjustment keeps track of the current stack offset from its
251 // natural location, as arguments are pushed for a function call. 251 // natural location, as arguments are pushed for a function call.
252 int32_t StackAdjustment; 252 int32_t StackAdjustment;
253 LoweringContext Context; 253 LoweringContext Context;
254 254
255 // Runtime helper function names
256 const static IceString H_bitcast_16xi1_i16;
257 const static IceString H_bitcast_8xi1_i8;
258 const static IceString H_bitcast_i16_16xi1;
259 const static IceString H_bitcast_i8_8xi1;
260 const static IceString H_call_ctpop_i32;
261 const static IceString H_call_ctpop_i64;
262 const static IceString H_call_longjmp;
263 const static IceString H_call_memcpy;
264 const static IceString H_call_memmove;
265 const static IceString H_call_memset;
266 const static IceString H_call_read_tp;
267 const static IceString H_call_setjmp;
268 const static IceString H_fptosi_f32_i64;
269 const static IceString H_fptosi_f64_i64;
270 const static IceString H_fptoui_4xi32_f32;
271 const static IceString H_fptoui_f32_i32;
272 const static IceString H_fptoui_f32_i64;
273 const static IceString H_fptoui_f64_i32;
274 const static IceString H_fptoui_f64_i64;
275 const static IceString H_frem_f32;
276 const static IceString H_frem_f64;
277 const static IceString H_sdiv_i64;
278 const static IceString H_sitofp_i64_f32;
279 const static IceString H_sitofp_i64_f64;
280 const static IceString H_srem_i64;
281 const static IceString H_udiv_i64;
282 const static IceString H_uitofp_4xi32_4xf32;
283 const static IceString H_uitofp_i32_f32;
284 const static IceString H_uitofp_i32_f64;
285 const static IceString H_uitofp_i64_f32;
286 const static IceString H_uitofp_i64_f64;
287 const static IceString H_urem_i64;
288
255 private: 289 private:
256 int32_t SnapshotStackAdjustment; 290 int32_t SnapshotStackAdjustment;
257 }; 291 };
258 292
259 // TargetDataLowering is used for "lowering" data including initializers 293 // TargetDataLowering is used for "lowering" data including initializers
260 // for global variables, and the internal constant pools. It is separated 294 // for global variables, and the internal constant pools. It is separated
261 // out from TargetLowering because it does not require a Cfg. 295 // out from TargetLowering because it does not require a Cfg.
262 class TargetDataLowering { 296 class TargetDataLowering {
263 TargetDataLowering() = delete; 297 TargetDataLowering() = delete;
264 TargetDataLowering(const TargetDataLowering &) = delete; 298 TargetDataLowering(const TargetDataLowering &) = delete;
265 TargetDataLowering &operator=(const TargetDataLowering &) = delete; 299 TargetDataLowering &operator=(const TargetDataLowering &) = delete;
266 300
267 public: 301 public:
268 static std::unique_ptr<TargetDataLowering> createLowering(GlobalContext *Ctx); 302 static std::unique_ptr<TargetDataLowering> createLowering(GlobalContext *Ctx);
269 virtual ~TargetDataLowering(); 303 virtual ~TargetDataLowering();
270 304
271 virtual void 305 virtual void
272 lowerGlobals(std::unique_ptr<VariableDeclarationList> Vars) const = 0; 306 lowerGlobals(std::unique_ptr<VariableDeclarationList> Vars) const = 0;
273 virtual void lowerConstants() const = 0; 307 virtual void lowerConstants() const = 0;
274 308
275 protected: 309 protected:
276 explicit TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 310 explicit TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
277 GlobalContext *Ctx; 311 GlobalContext *Ctx;
278 }; 312 };
279 313
280 } // end of namespace Ice 314 } // end of namespace Ice
281 315
282 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 316 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « runtime/szrt_ll.ll ('k') | src/IceTargetLowering.cpp » ('j') | src/IceTargetLowering.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698