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
This commit is contained in:
parent
488ba18a13
commit
1610803b79
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user