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

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1421603003: Match index adds as well as base (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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 4506 matching lines...) Expand 10 before | Expand all | Expand 10 after
4517 // swap(Index,Base) 4517 // swap(Index,Base)
4518 // Similar for Base=Const*Var and Base=Var<<Const 4518 // Similar for Base=Const*Var and Base=Var<<Const
4519 if ((Shift == 0) && matchShiftedIndex(VMetadata, Base, Shift, Reason)) { 4519 if ((Shift == 0) && matchShiftedIndex(VMetadata, Base, Shift, Reason)) {
4520 std::swap(Base, Index); 4520 std::swap(Base, Index);
4521 continue; 4521 continue;
4522 } 4522 }
4523 } 4523 }
4524 // Update Offset to reflect additions/subtractions with constants and 4524 // Update Offset to reflect additions/subtractions with constants and
4525 // relocatables. 4525 // relocatables.
4526 // TODO: consider overflow issues with respect to Offset. 4526 // TODO: consider overflow issues with respect to Offset.
4527 // TODO: handle symbolic constants.
4528 if (matchOffsetBase(VMetadata, Base, Relocatable, Offset, Reason)) 4527 if (matchOffsetBase(VMetadata, Base, Relocatable, Offset, Reason))
4529 continue; 4528 continue;
4529 if (Shift == 0 &&
Jim Stichnoth 2015/11/04 21:25:11 This "Shift == 0" is inconsistent with "(Shift ==
sehr 2015/11/04 22:44:43 Removed, as suggested.
4530 matchOffsetBase(VMetadata, Index, Relocatable, Offset, Reason))
4531 continue;
4530 // TODO(sehr, stichnot): Handle updates of Index with Shift != 0. 4532 // TODO(sehr, stichnot): Handle updates of Index with Shift != 0.
4531 // Index is Index=Var+Const ==> 4533 // Index is Index=Var+Const ==>
4532 // set Index=Var, Offset+=(Const<<Shift) 4534 // set Index=Var, Offset+=(Const<<Shift)
4533 // Index is Index=Const+Var ==> 4535 // Index is Index=Const+Var ==>
4534 // set Index=Var, Offset+=(Const<<Shift) 4536 // set Index=Var, Offset+=(Const<<Shift)
4535 // Index is Index=Var-Const ==> 4537 // Index is Index=Var-Const ==>
4536 // set Index=Var, Offset-=(Const<<Shift) 4538 // set Index=Var, Offset-=(Const<<Shift)
4537 break; 4539 break;
4538 } while (Reason); 4540 } while (Reason);
4539 return AddressWasOptimized; 4541 return AddressWasOptimized;
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
5858 } 5860 }
5859 // the offset is not eligible for blinding or pooling, return the original 5861 // the offset is not eligible for blinding or pooling, return the original
5860 // mem operand 5862 // mem operand
5861 return MemOperand; 5863 return MemOperand;
5862 } 5864 }
5863 5865
5864 } // end of namespace X86Internal 5866 } // end of namespace X86Internal
5865 } // end of namespace Ice 5867 } // end of namespace Ice
5866 5868
5867 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H 5869 #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