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

Unified Diff: src/hydrogen-escape-analysis.cc

Issue 148573005: A64: Synchronize with r16249. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: 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
« no previous file with comments | « src/hydrogen-dce.cc ('k') | src/hydrogen-gvn.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-escape-analysis.cc
diff --git a/src/hydrogen-escape-analysis.cc b/src/hydrogen-escape-analysis.cc
index 5eaa88b2767e5974aa485100ad1aab08e5351b05..0359678ef958bd2621ea4f207be4ca872673308e 100644
--- a/src/hydrogen-escape-analysis.cc
+++ b/src/hydrogen-escape-analysis.cc
@@ -110,14 +110,11 @@ HCapturedObject* HEscapeAnalysisPhase::NewStateCopy(
// Insert a newly created phi into the given block and fill all incoming
-// edges with the given value. The merge index is chosen so that it is
-// unique for this particular scalar replacement index.
+// edges with the given value.
HPhi* HEscapeAnalysisPhase::NewPhiAndInsert(
HBasicBlock* block, HValue* incoming_value, int index) {
Zone* zone = graph()->zone();
- HBasicBlock* pred = block->predecessors()->first();
- int phi_index = pred->last_environment()->length() + cumulative_values_;
- HPhi* phi = new(zone) HPhi(phi_index + index, zone);
+ HPhi* phi = new(zone) HPhi(HPhi::kInvalidMergedIndex, zone);
for (int i = 0; i < block->predecessors()->length(); i++) {
phi->AddInput(incoming_value);
}
@@ -215,7 +212,14 @@ void HEscapeAnalysisPhase::AnalyzeDataFlow(HInstruction* allocate) {
if (mapcheck->value() != allocate) continue;
// TODO(mstarzinger): This approach breaks if the tracked map value
// is not a HConstant. Find a repro test case and fix this.
+ for (HUseIterator it(mapcheck->uses()); !it.Done(); it.Advance()) {
+ if (!it.value()->IsLoadNamedField()) continue;
+ HLoadNamedField* load = HLoadNamedField::cast(it.value());
+ ASSERT(load->typecheck() == mapcheck);
+ load->ClearTypeCheck();
+ }
ASSERT(mapcheck->HasNoUses());
+
mapcheck->DeleteAndReplaceWith(NULL);
break;
}
« no previous file with comments | « src/hydrogen-dce.cc ('k') | src/hydrogen-gvn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698