| OLD | NEW |
| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 void sortVarsByAlignment(VarList &Dest, const VarList &Source) const; | 448 void sortVarsByAlignment(VarList &Dest, const VarList &Source) const; |
| 449 | 449 |
| 450 /// Make a call to an external helper function. | 450 /// Make a call to an external helper function. |
| 451 InstCall *makeHelperCall(const IceString &Name, Variable *Dest, | 451 InstCall *makeHelperCall(const IceString &Name, Variable *Dest, |
| 452 SizeT MaxSrcs); | 452 SizeT MaxSrcs); |
| 453 | 453 |
| 454 void _set_dest_redefined() { Context.getLastInserted()->setDestRedefined(); } | 454 void _set_dest_redefined() { Context.getLastInserted()->setDestRedefined(); } |
| 455 | 455 |
| 456 bool shouldOptimizeMemIntrins(); | 456 bool shouldOptimizeMemIntrins(); |
| 457 | 457 |
| 458 /// SandboxType enumerates all possible sandboxing strategies that |
| 459 enum SandboxType { |
| 460 ST_None, |
| 461 ST_NaCl, |
| 462 ST_Nonsfi, |
| 463 }; |
| 464 |
| 465 static SandboxType determineSandboxTypeFromFlags(const ClFlags &Flags); |
| 466 |
| 458 Cfg *Func; | 467 Cfg *Func; |
| 459 GlobalContext *Ctx; | 468 GlobalContext *Ctx; |
| 460 bool HasComputedFrame = false; | 469 bool HasComputedFrame = false; |
| 461 bool CallsReturnsTwice = false; | 470 bool CallsReturnsTwice = false; |
| 462 SizeT NextLabelNumber = 0; | 471 SizeT NextLabelNumber = 0; |
| 463 SizeT NextJumpTableNumber = 0; | 472 SizeT NextJumpTableNumber = 0; |
| 464 LoweringContext Context; | 473 LoweringContext Context; |
| 474 const SandboxType SandboxingType = ST_None; |
| 465 | 475 |
| 466 // Runtime helper function names | 476 // Runtime helper function names |
| 467 const static constexpr char *H_bitcast_16xi1_i16 = "__Sz_bitcast_16xi1_i16"; | 477 const static constexpr char *H_bitcast_16xi1_i16 = "__Sz_bitcast_16xi1_i16"; |
| 468 const static constexpr char *H_bitcast_8xi1_i8 = "__Sz_bitcast_8xi1_i8"; | 478 const static constexpr char *H_bitcast_8xi1_i8 = "__Sz_bitcast_8xi1_i8"; |
| 469 const static constexpr char *H_bitcast_i16_16xi1 = "__Sz_bitcast_i16_16xi1"; | 479 const static constexpr char *H_bitcast_i16_16xi1 = "__Sz_bitcast_i16_16xi1"; |
| 470 const static constexpr char *H_bitcast_i8_8xi1 = "__Sz_bitcast_i8_8xi1"; | 480 const static constexpr char *H_bitcast_i8_8xi1 = "__Sz_bitcast_i8_8xi1"; |
| 471 const static constexpr char *H_call_ctpop_i32 = "__popcountsi2"; | 481 const static constexpr char *H_call_ctpop_i32 = "__popcountsi2"; |
| 472 const static constexpr char *H_call_ctpop_i64 = "__popcountdi2"; | 482 const static constexpr char *H_call_ctpop_i64 = "__popcountdi2"; |
| 473 const static constexpr char *H_call_longjmp = "longjmp"; | 483 const static constexpr char *H_call_longjmp = "longjmp"; |
| 474 const static constexpr char *H_call_memcpy = "memcpy"; | 484 const static constexpr char *H_call_memcpy = "memcpy"; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 virtual void lower() {} | 559 virtual void lower() {} |
| 550 | 560 |
| 551 protected: | 561 protected: |
| 552 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 562 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
| 553 GlobalContext *Ctx; | 563 GlobalContext *Ctx; |
| 554 }; | 564 }; |
| 555 | 565 |
| 556 } // end of namespace Ice | 566 } // end of namespace Ice |
| 557 | 567 |
| 558 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 568 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
| OLD | NEW |