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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1605103002: Subzero. X86. Refactors Address Mode formation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make format Created 4 years, 11 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/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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return; \ 238 return; \
239 } \ 239 } \
240 InitGuard##X = true; \ 240 InitGuard##X = true; \
241 ::X::staticInit(Ctx); \ 241 ::X::staticInit(Ctx); \
242 } break; 242 } break;
243 #include "llvm/Config/SZTargets.def" 243 #include "llvm/Config/SZTargets.def"
244 #undef SUBZERO_TARGET 244 #undef SUBZERO_TARGET
245 } 245 }
246 } 246 }
247 247
248 TargetLowering::SandboxType
249 TargetLowering::determineSandboxTypeFromFlags(const ClFlags &Flags) {
250 assert(!Flags.getUseSandboxing() || !Flags.getUseNonsfi());
251 if (Flags.getUseNonsfi()) {
252 return TargetLowering::ST_Nonsfi;
253 }
254 if (Flags.getUseSandboxing()) {
255 return TargetLowering::ST_NaCl;
256 }
257 return TargetLowering::ST_None;
258 }
259
248 TargetLowering::TargetLowering(Cfg *Func) 260 TargetLowering::TargetLowering(Cfg *Func)
249 : Func(Func), Ctx(Func->getContext()), Context() {} 261 : Func(Func), Ctx(Func->getContext()),
262 SandboxingType(determineSandboxTypeFromFlags(Ctx->getFlags())) {}
250 263
251 TargetLowering::AutoBundle::AutoBundle(TargetLowering *Target, 264 TargetLowering::AutoBundle::AutoBundle(TargetLowering *Target,
252 InstBundleLock::Option Option) 265 InstBundleLock::Option Option)
253 : Target(Target), 266 : Target(Target),
254 NeedSandboxing(Target->Ctx->getFlags().getUseSandboxing()) { 267 NeedSandboxing(Target->Ctx->getFlags().getUseSandboxing()) {
255 assert(!Target->AutoBundling); 268 assert(!Target->AutoBundling);
256 Target->AutoBundling = true; 269 Target->AutoBundling = true;
257 if (NeedSandboxing) { 270 if (NeedSandboxing) {
258 Target->_bundle_lock(Option); 271 Target->_bundle_lock(Option);
259 } 272 }
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 case Target_##X: \ 830 case Target_##X: \
818 return ::X::createTargetHeaderLowering(Ctx); 831 return ::X::createTargetHeaderLowering(Ctx);
819 #include "llvm/Config/SZTargets.def" 832 #include "llvm/Config/SZTargets.def"
820 #undef SUBZERO_TARGET 833 #undef SUBZERO_TARGET
821 } 834 }
822 } 835 }
823 836
824 TargetHeaderLowering::~TargetHeaderLowering() = default; 837 TargetHeaderLowering::~TargetHeaderLowering() = default;
825 838
826 } // end of namespace Ice 839 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698