Commit 1610803b authored by titzer@chromium.org's avatar titzer@chromium.org

Improve alias analysis for HConstants (and fix small snafu in MustAlias).

BUG=
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/24107003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 488ba18a
......@@ -65,7 +65,11 @@ class HAliasAnalyzer : public ZoneObject {
if (a->IsConstant()) return kNoAlias;
}
// TODO(titzer): return MustAlias for two equivalent constants.
// Constant objects can be distinguished statically.
if (a->IsConstant()) {
// TODO(titzer): DataEquals() is more efficient, but that's protected.
return a->Equals(b) ? kMustAlias : kNoAlias;
}
return kMayAlias;
}
......@@ -78,7 +82,7 @@ class HAliasAnalyzer : public ZoneObject {
}
inline bool MustAlias(HValue* a, HValue* b) {
return Query(a, b) == kMayAlias;
return Query(a, b) == kMustAlias;
}
inline bool NoAlias(HValue* a, HValue* b) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment