Revision: 20444
Author: [email protected]
Date: Wed Apr 2 16:31:58 2014 UTC
Log: ARM64: Avoid iterating through unresolved branches information
when unnecessary.
[email protected]
Review URL: https://codereview.chromium.org/217343007
http://code.google.com/p/v8/source/detail?r=20444
Modified:
/branches/bleeding_edge/src/arm64/assembler-arm64.cc
=======================================
--- /branches/bleeding_edge/src/arm64/assembler-arm64.cc Fri Mar 21
09:28:26 2014 UTC
+++ /branches/bleeding_edge/src/arm64/assembler-arm64.cc Wed Apr 2
16:31:58 2014 UTC
@@ -456,6 +456,8 @@
ASSERT(!label->is_near_linked());
ASSERT(!label->is_bound());
+ DeleteUnresolvedBranchInfoForLabel(label);
+
// If the label is linked, the link chain looks something like this:
//
// |--I----I-------I-------L
@@ -497,8 +499,6 @@
ASSERT(label->is_bound());
ASSERT(!label->is_linked());
-
- DeleteUnresolvedBranchInfoForLabel(label);
}
@@ -551,14 +551,16 @@
return;
}
- // Branches to this label will be resolved when the label is bound below.
- std::multimap<int, FarBranchInfo>::iterator it_tmp, it;
- it = unresolved_branches_.begin();
- while (it != unresolved_branches_.end()) {
- it_tmp = it++;
- if (it_tmp->second.label_ == label) {
- CHECK(it_tmp->first >= pc_offset());
- unresolved_branches_.erase(it_tmp);
+ if (label->is_linked()) {
+ // Branches to this label will be resolved when the label is bound
below.
+ std::multimap<int, FarBranchInfo>::iterator it_tmp, it;
+ it = unresolved_branches_.begin();
+ while (it != unresolved_branches_.end()) {
+ it_tmp = it++;
+ if (it_tmp->second.label_ == label) {
+ CHECK(it_tmp->first >= pc_offset());
+ unresolved_branches_.erase(it_tmp);
+ }
}
}
if (unresolved_branches_.empty()) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.