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

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 2080443002: Subzero: Improve lowering of rematerializable call args. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 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 | no next file » | 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/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==//
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 2600 matching lines...) Expand 10 before | Expand all | Expand 10 after
2611 InstStore::create(Func, legalize(StackArgs[i]), StackArgLocations[i])); 2611 InstStore::create(Func, legalize(StackArgs[i]), StackArgLocations[i]));
2612 } 2612 }
2613 // Copy arguments to be passed in registers to the appropriate registers. 2613 // Copy arguments to be passed in registers to the appropriate registers.
2614 for (SizeT i = 0, NumXmmArgs = XmmArgs.size(); i < NumXmmArgs; ++i) { 2614 for (SizeT i = 0, NumXmmArgs = XmmArgs.size(); i < NumXmmArgs; ++i) {
2615 XmmArgs[i] = 2615 XmmArgs[i] =
2616 legalizeToReg(legalize(XmmArgs[i]), Traits::getRegisterForXmmArgNum(i)); 2616 legalizeToReg(legalize(XmmArgs[i]), Traits::getRegisterForXmmArgNum(i));
2617 } 2617 }
2618 // Materialize moves for arguments passed in GPRs. 2618 // Materialize moves for arguments passed in GPRs.
2619 for (SizeT i = 0, NumGprArgs = GprArgs.size(); i < NumGprArgs; ++i) { 2619 for (SizeT i = 0, NumGprArgs = GprArgs.size(); i < NumGprArgs; ++i) {
2620 const Type SignatureTy = GprArgs[i].first; 2620 const Type SignatureTy = GprArgs[i].first;
2621 Operand *Arg = legalize(GprArgs[i].second); 2621 Operand *Arg =
2622 legalize(GprArgs[i].second, Legal_Default | Legal_Rematerializable);
2622 GprArgs[i].second = 2623 GprArgs[i].second =
2623 legalizeToReg(Arg, Traits::getRegisterForGprArgNum(Arg->getType(), i)); 2624 legalizeToReg(Arg, Traits::getRegisterForGprArgNum(Arg->getType(), i));
2624 assert(SignatureTy == IceType_i64 || SignatureTy == IceType_i32); 2625 assert(SignatureTy == IceType_i64 || SignatureTy == IceType_i32);
2625 assert(SignatureTy == Arg->getType()); 2626 assert(SignatureTy == Arg->getType());
2626 (void)SignatureTy; 2627 (void)SignatureTy;
2627 } 2628 }
2628 // Generate a FakeUse of register arguments so that they do not get dead code 2629 // Generate a FakeUse of register arguments so that they do not get dead code
2629 // eliminated as a result of the FakeKill of scratch registers after the call. 2630 // eliminated as a result of the FakeKill of scratch registers after the call.
2630 // These need to be right before the call instruction. 2631 // These need to be right before the call instruction.
2631 for (auto *Arg : XmmArgs) { 2632 for (auto *Arg : XmmArgs) {
(...skipping 5334 matching lines...) Expand 10 before | Expand all | Expand 10 after
7966 emitGlobal(*Var, SectionSuffix); 7967 emitGlobal(*Var, SectionSuffix);
7967 } 7968 }
7968 } 7969 }
7969 } break; 7970 } break;
7970 } 7971 }
7971 } 7972 }
7972 } // end of namespace X86NAMESPACE 7973 } // end of namespace X86NAMESPACE
7973 } // end of namespace Ice 7974 } // end of namespace Ice
7974 7975
7975 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H 7976 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698