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

Side by Side Diff: src/hydrogen.cc

Issue 12226112: Infrastructure classes for evaluating numeric relations between values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Sample code for bounds check elimination. Created 7 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 | Annotate | Revision Log
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 3852 matching lines...) Expand 10 before | Expand all | Expand 10 after
3863 RestoreActualValues(); 3863 RestoreActualValues();
3864 3864
3865 return true; 3865 return true;
3866 } 3866 }
3867 3867
3868 3868
3869 void HGraph::SetupInformativeDefinitionsInBlock(HBasicBlock* block) { 3869 void HGraph::SetupInformativeDefinitionsInBlock(HBasicBlock* block) {
3870 for (int phi_index = 0; phi_index < block->phis()->length(); phi_index++) { 3870 for (int phi_index = 0; phi_index < block->phis()->length(); phi_index++) {
3871 HPhi* phi = block->phis()->at(phi_index); 3871 HPhi* phi = block->phis()->at(phi_index);
3872 phi->AddInformativeDefinitions(); 3872 phi->AddInformativeDefinitions();
3873 phi->SetFlag(HValue::kIDefsProcessingDone);
3873 // We do not support phis that "redefine just one operand". 3874 // We do not support phis that "redefine just one operand".
3874 ASSERT(!phi->IsInformativeDefinition()); 3875 ASSERT(!phi->IsInformativeDefinition());
3875 } 3876 }
3876 3877
3877 for (HInstruction* i = block->first(); i != NULL; i = i->next()) { 3878 for (HInstruction* i = block->first(); i != NULL; i = i->next()) {
3878 i->AddInformativeDefinitions(); 3879 i->AddInformativeDefinitions();
3880 i->SetFlag(HValue::kIDefsProcessingDone);
3879 i->UpdateRedefinedUsesWhileSettingUpInformativeDefinitions(); 3881 i->UpdateRedefinedUsesWhileSettingUpInformativeDefinitions();
3880 } 3882 }
3881 } 3883 }
3882 3884
3883 3885
3884 // This method is recursive, so if its stack frame is large it could 3886 // This method is recursive, so if its stack frame is large it could
3885 // cause a stack overflow. 3887 // cause a stack overflow.
3886 // To keep the individual stack frames small we do the actual work inside 3888 // To keep the individual stack frames small we do the actual work inside
3887 // SetupInformativeDefinitionsInBlock(); 3889 // SetupInformativeDefinitionsInBlock();
3888 void HGraph::SetupInformativeDefinitionsRecursively(HBasicBlock* block) { 3890 void HGraph::SetupInformativeDefinitionsRecursively(HBasicBlock* block) {
(...skipping 6741 matching lines...) Expand 10 before | Expand all | Expand 10 after
10630 } 10632 }
10631 } 10633 }
10632 10634
10633 #ifdef DEBUG 10635 #ifdef DEBUG
10634 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10636 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10635 if (allocator_ != NULL) allocator_->Verify(); 10637 if (allocator_ != NULL) allocator_->Verify();
10636 #endif 10638 #endif
10637 } 10639 }
10638 10640
10639 } } // namespace v8::internal 10641 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698