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

Unified Diff: src/IceCfgNode.cpp

Issue 1273823003: Subzero: Completely remove tracking of stack pointer live range. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix a condition to match previous logic. Created 5 years, 4 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 | « no previous file | src/IceLiveness.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index 44e9d3e289f527802fc7eddfbabde8302386a7cf..462cbcba1b4a7d6ab62235fd2e9b6b4b4b19d33e 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -667,15 +667,13 @@ void CfgNode::livenessAddIntervals(Liveness *Liveness, InstNumberT FirstInstNum,
std::sort(MapBegin.begin(), MapBegin.end());
std::sort(MapEnd.begin(), MapEnd.end());
// Verify there are no duplicates.
- struct ComparePair {
- bool operator()(const LiveBeginEndMapEntry &A,
- const LiveBeginEndMapEntry &B) {
- return A.first == B.first;
- }
- };
- assert(std::adjacent_find(MapBegin.begin(), MapBegin.end(), ComparePair()) ==
+ auto ComparePair =
+ [](const LiveBeginEndMapEntry &A, const LiveBeginEndMapEntry &B) {
+ return A.first == B.first;
+ };
+ assert(std::adjacent_find(MapBegin.begin(), MapBegin.end(), ComparePair) ==
MapBegin.end());
- assert(std::adjacent_find(MapEnd.begin(), MapEnd.end(), ComparePair()) ==
+ assert(std::adjacent_find(MapEnd.begin(), MapEnd.end(), ComparePair) ==
MapEnd.end());
LivenessBV LiveInAndOut = LiveIn;
@@ -700,21 +698,16 @@ void CfgNode::livenessAddIntervals(Liveness *Liveness, InstNumberT FirstInstNum,
InstNumberT LE = i == i2 ? IEB->second : LastInstNum + 1;
Variable *Var = Liveness->getVariable(i, this);
- // TODO(stichnot): Push getIgnoreLiveness() into the initialization of
- // Liveness::RangeMask so that LiveBegin and LiveEnd never even reference
- // such variables.
- if (!Var->getIgnoreLiveness()) {
- if (LB > LE) {
- Var->addLiveRange(FirstInstNum, LE, 1);
- Var->addLiveRange(LB, LastInstNum + 1, 1);
- // Assert that Var is a global variable by checking that its
- // liveness index is less than the number of globals. This
- // ensures that the LiveInAndOut[] access is valid.
- assert(i < Liveness->getNumGlobalVars());
- LiveInAndOut[i] = false;
- } else {
- Var->addLiveRange(LB, LE, 1);
- }
+ if (LB > LE) {
+ Var->addLiveRange(FirstInstNum, LE, 1);
+ Var->addLiveRange(LB, LastInstNum + 1, 1);
+ // Assert that Var is a global variable by checking that its
+ // liveness index is less than the number of globals. This
+ // ensures that the LiveInAndOut[] access is valid.
+ assert(i < Liveness->getNumGlobalVars());
+ LiveInAndOut[i] = false;
+ } else {
+ Var->addLiveRange(LB, LE, 1);
}
if (i == i1)
++IBB;
« no previous file with comments | « no previous file | src/IceLiveness.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698