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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1278173009: Inline memove for small constant sizes and refactor memcpy and memset. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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 | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632Traits.h » ('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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 InstCall *TargetLowering::makeHelperCall(const IceString &Name, Variable *Dest, 434 InstCall *TargetLowering::makeHelperCall(const IceString &Name, Variable *Dest,
435 SizeT MaxSrcs) { 435 SizeT MaxSrcs) {
436 const bool HasTailCall = false; 436 const bool HasTailCall = false;
437 Constant *CallTarget = Ctx->getConstantExternSym(Name); 437 Constant *CallTarget = Ctx->getConstantExternSym(Name);
438 InstCall *Call = 438 InstCall *Call =
439 InstCall::create(Func, MaxSrcs, Dest, CallTarget, HasTailCall); 439 InstCall::create(Func, MaxSrcs, Dest, CallTarget, HasTailCall);
440 return Call; 440 return Call;
441 } 441 }
442 442
443 bool TargetLowering::shouldOptimizeMemIntrins() {
444 return Ctx->getFlags().getOptLevel() >= Opt_1 ||
445 Ctx->getFlags().getForceMemIntrinOpt();
446 }
447
443 void TargetLowering::emitWithoutPrefix(const ConstantRelocatable *C) const { 448 void TargetLowering::emitWithoutPrefix(const ConstantRelocatable *C) const {
444 if (!BuildDefs::dump()) 449 if (!BuildDefs::dump())
445 return; 450 return;
446 Ostream &Str = Ctx->getStrEmit(); 451 Ostream &Str = Ctx->getStrEmit();
447 if (C->getSuppressMangling()) 452 if (C->getSuppressMangling())
448 Str << C->getName(); 453 Str << C->getName();
449 else 454 else
450 Str << Ctx->mangleName(C->getName()); 455 Str << Ctx->mangleName(C->getName());
451 RelocOffsetT Offset = C->getOffset(); 456 RelocOffsetT Offset = C->getOffset();
452 if (Offset) { 457 if (Offset) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 if (Target == Target_##X) \ 598 if (Target == Target_##X) \
594 return TargetHeader##X::create(Ctx); 599 return TargetHeader##X::create(Ctx);
595 #include "llvm/Config/SZTargets.def" 600 #include "llvm/Config/SZTargets.def"
596 601
597 llvm::report_fatal_error("Unsupported target header lowering"); 602 llvm::report_fatal_error("Unsupported target header lowering");
598 } 603 }
599 604
600 TargetHeaderLowering::~TargetHeaderLowering() = default; 605 TargetHeaderLowering::~TargetHeaderLowering() = default;
601 606
602 } // end of namespace Ice 607 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632Traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698