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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 2210773002: Subzero: Use Cfg::getOptLevel() instead of ClFlags version. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | src/IceTargetLoweringARM32.cpp » ('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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698