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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 11299328: Implement basic array prefetching hints in Hydrogen. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.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 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 2014
2015 stream->Add("["); 2015 stream->Add("[");
2016 key()->PrintNameTo(stream); 2016 key()->PrintNameTo(stream);
2017 if (IsDehoisted()) { 2017 if (IsDehoisted()) {
2018 stream->Add(" + %d] ", index_offset()); 2018 stream->Add(" + %d] ", index_offset());
2019 } else { 2019 } else {
2020 stream->Add("] "); 2020 stream->Add("] ");
2021 } 2021 }
2022 2022
2023 dependency()->PrintNameTo(stream); 2023 dependency()->PrintNameTo(stream);
2024 stream->Add(" ");
2025 prefetch_distance()->PrintNameTo(stream);
2024 if (RequiresHoleCheck()) { 2026 if (RequiresHoleCheck()) {
2025 stream->Add(" check_hole"); 2027 stream->Add(" check_hole");
2026 } 2028 }
2027 } 2029 }
2028 2030
2029 2031
2030 bool HLoadKeyed::RequiresHoleCheck() const { 2032 bool HLoadKeyed::RequiresHoleCheck() const {
2031 if (IsFastPackedElementsKind(elements_kind())) { 2033 if (IsFastPackedElementsKind(elements_kind())) {
2032 return false; 2034 return false;
2033 } 2035 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 2069
2068 if (names_cache->enumerable() == object()) { 2070 if (names_cache->enumerable() == object()) {
2069 HForInCacheArray* index_cache = 2071 HForInCacheArray* index_cache =
2070 names_cache->index_cache(); 2072 names_cache->index_cache();
2071 HCheckMapValue* map_check = 2073 HCheckMapValue* map_check =
2072 new(block()->zone()) HCheckMapValue(object(), names_cache->map()); 2074 new(block()->zone()) HCheckMapValue(object(), names_cache->map());
2073 HInstruction* index = new(block()->zone()) HLoadKeyed( 2075 HInstruction* index = new(block()->zone()) HLoadKeyed(
2074 index_cache, 2076 index_cache,
2075 key_load->key(), 2077 key_load->key(),
2076 key_load->key(), 2078 key_load->key(),
2079 key_load->prefetch_distance(),
2077 key_load->elements_kind()); 2080 key_load->elements_kind());
2078 map_check->InsertBefore(this); 2081 map_check->InsertBefore(this);
2079 index->InsertBefore(this); 2082 index->InsertBefore(this);
2080 HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex( 2083 HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex(
2081 object(), index); 2084 object(), index);
2082 load->InsertBefore(this); 2085 load->InsertBefore(this);
2083 return load; 2086 return load;
2084 } 2087 }
2085 } 2088 }
2086 } 2089 }
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
2765 2768
2766 2769
2767 void HCheckFunction::Verify() { 2770 void HCheckFunction::Verify() {
2768 HInstruction::Verify(); 2771 HInstruction::Verify();
2769 ASSERT(HasNoUses()); 2772 ASSERT(HasNoUses());
2770 } 2773 }
2771 2774
2772 #endif 2775 #endif
2773 2776
2774 } } // namespace v8::internal 2777 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698