OLD | NEW |
1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// | 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// |
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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 InstCall *TargetLowering::makeHelperCall(RuntimeHelper FuncID, Variable *Dest, | 731 InstCall *TargetLowering::makeHelperCall(RuntimeHelper FuncID, Variable *Dest, |
732 SizeT MaxSrcs) { | 732 SizeT MaxSrcs) { |
733 constexpr bool HasTailCall = false; | 733 constexpr bool HasTailCall = false; |
734 Constant *CallTarget = Ctx->getRuntimeHelperFunc(FuncID); | 734 Constant *CallTarget = Ctx->getRuntimeHelperFunc(FuncID); |
735 InstCall *Call = | 735 InstCall *Call = |
736 InstCall::create(Func, MaxSrcs, Dest, CallTarget, HasTailCall); | 736 InstCall::create(Func, MaxSrcs, Dest, CallTarget, HasTailCall); |
737 return Call; | 737 return Call; |
738 } | 738 } |
739 | 739 |
740 bool TargetLowering::shouldOptimizeMemIntrins() { | 740 bool TargetLowering::shouldOptimizeMemIntrins() { |
741 return getFlags().getOptLevel() >= Opt_1 || getFlags().getForceMemIntrinOpt(); | 741 return Func->getOptLevel() >= Opt_1 || getFlags().getForceMemIntrinOpt(); |
742 } | 742 } |
743 | 743 |
744 void TargetLowering::scalarizeArithmetic(InstArithmetic::OpKind Kind, | 744 void TargetLowering::scalarizeArithmetic(InstArithmetic::OpKind Kind, |
745 Variable *Dest, Operand *Src0, | 745 Variable *Dest, Operand *Src0, |
746 Operand *Src1) { | 746 Operand *Src1) { |
747 scalarizeInstruction( | 747 scalarizeInstruction( |
748 Dest, [this, Kind](Variable *Dest, Operand *Src0, Operand *Src1) { | 748 Dest, [this, Kind](Variable *Dest, Operand *Src0, Operand *Src1) { |
749 return Context.insert<InstArithmetic>(Kind, Dest, Src0, Src1); | 749 return Context.insert<InstArithmetic>(Kind, Dest, Src0, Src1); |
750 }, Src0, Src1); | 750 }, Src0, Src1); |
751 } | 751 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 case TARGET_LOWERING_CLASS_FOR(X): \ | 911 case TARGET_LOWERING_CLASS_FOR(X): \ |
912 return ::X::createTargetHeaderLowering(Ctx); | 912 return ::X::createTargetHeaderLowering(Ctx); |
913 #include "SZTargets.def" | 913 #include "SZTargets.def" |
914 #undef SUBZERO_TARGET | 914 #undef SUBZERO_TARGET |
915 } | 915 } |
916 } | 916 } |
917 | 917 |
918 TargetHeaderLowering::~TargetHeaderLowering() = default; | 918 TargetHeaderLowering::~TargetHeaderLowering() = default; |
919 | 919 |
920 } // end of namespace Ice | 920 } // end of namespace Ice |
OLD | NEW |