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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1651163002: Subzero. Enables moar complex relocation offsets. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 10 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.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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 bool TargetLowering::shouldOptimizeMemIntrins() { 697 bool TargetLowering::shouldOptimizeMemIntrins() {
698 return Ctx->getFlags().getOptLevel() >= Opt_1 || 698 return Ctx->getFlags().getOptLevel() >= Opt_1 ||
699 Ctx->getFlags().getForceMemIntrinOpt(); 699 Ctx->getFlags().getForceMemIntrinOpt();
700 } 700 }
701 701
702 void TargetLowering::emitWithoutPrefix(const ConstantRelocatable *C, 702 void TargetLowering::emitWithoutPrefix(const ConstantRelocatable *C,
703 const char *Suffix) const { 703 const char *Suffix) const {
704 if (!BuildDefs::dump()) 704 if (!BuildDefs::dump())
705 return; 705 return;
706 Ostream &Str = Ctx->getStrEmit(); 706 Ostream &Str = Ctx->getStrEmit();
707 const IceString &EmitStr = C->getEmitString();
708 if (!EmitStr.empty()) {
709 // C has a custom emit string, so we use it instead of the canonical
710 // Name + Offset form.
711 Str << EmitStr;
712 return;
713 }
707 if (C->getSuppressMangling()) 714 if (C->getSuppressMangling())
708 Str << C->getName(); 715 Str << C->getName();
709 else 716 else
710 Str << Ctx->mangleName(C->getName()); 717 Str << Ctx->mangleName(C->getName());
711 Str << Suffix; 718 Str << Suffix;
712 RelocOffsetT Offset = C->getOffset(); 719 RelocOffsetT Offset = C->getOffset();
713 if (Offset) { 720 if (Offset) {
714 if (Offset > 0) 721 if (Offset > 0)
715 Str << "+"; 722 Str << "+";
716 Str << Offset; 723 Str << Offset;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 case Target_##X: \ 862 case Target_##X: \
856 return ::X::createTargetHeaderLowering(Ctx); 863 return ::X::createTargetHeaderLowering(Ctx);
857 #include "llvm/Config/SZTargets.def" 864 #include "llvm/Config/SZTargets.def"
858 #undef SUBZERO_TARGET 865 #undef SUBZERO_TARGET
859 } 866 }
860 } 867 }
861 868
862 TargetHeaderLowering::~TargetHeaderLowering() = default; 869 TargetHeaderLowering::~TargetHeaderLowering() = default;
863 870
864 } // end of namespace Ice 871 } // end of namespace Ice
OLDNEW
« src/IceOperand.h ('K') | « src/IceOperand.cpp ('k') | src/IceTargetLoweringX8664.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698