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

Unified Diff: src/hydrogen-store-elimination.h

Issue 100253004: First implementation of store elimination. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-store-elimination.h
diff --git a/src/hydrogen-infer-representation.h b/src/hydrogen-store-elimination.h
similarity index 76%
copy from src/hydrogen-infer-representation.h
copy to src/hydrogen-store-elimination.h
index 7c605696c4b956152bdd9dfc74c83e80569e3714..7dc871c9ba4f6f82cb70a568d3bbf358678b02d4 100644
--- a/src/hydrogen-infer-representation.h
+++ b/src/hydrogen-store-elimination.h
@@ -25,33 +25,33 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_HYDROGEN_INFER_REPRESENTATION_H_
-#define V8_HYDROGEN_INFER_REPRESENTATION_H_
+#ifndef V8_HYDROGEN_STORE_ELIMINATION_H_
+#define V8_HYDROGEN_STORE_ELIMINATION_H_
#include "hydrogen.h"
+#include "hydrogen-alias-analysis.h"
namespace v8 {
namespace internal {
-
-class HInferRepresentationPhase : public HPhase {
+class HStoreEliminationPhase : public HPhase {
public:
- explicit HInferRepresentationPhase(HGraph* graph)
- : HPhase("H_Infer representations", graph),
- worklist_(8, zone()),
- in_worklist_(graph->GetMaximumValueID(), zone()) { }
+ explicit HStoreEliminationPhase(HGraph* graph)
+ : HPhase("H_Store elimination", graph),
+ unobserved_(10, zone()),
+ aliasing_() { }
void Run();
- void AddToWorklist(HValue* current);
-
private:
- ZoneList<HValue*> worklist_;
- BitVector in_worklist_;
+ ZoneList<HStoreNamedField*> unobserved_;
+ HAliasAnalyzer* aliasing_;
- DISALLOW_COPY_AND_ASSIGN(HInferRepresentationPhase);
+ void ProcessStore(HStoreNamedField* store);
+ void ProcessLoad(HLoadNamedField* load);
+ void ProcessInstr(HInstruction* instr, GVNFlagSet flags);
};
} } // namespace v8::internal
-#endif // V8_HYDROGEN_INFER_REPRESENTATION_H_
+#endif

Powered by Google App Engine
This is Rietveld 408576698