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

Unified Diff: src/IceCfg.cpp

Issue 656023002: Subzero: Register allocator performance improvements and simplifications. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 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/IceCfgNode.cpp » ('j') | src/IceOperand.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index c30e02a28ccdef113dc0f99122f6beeaf77584c7..b9deb01fb30fcb50759fda3958944cbd07c3d08a 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -219,32 +219,21 @@ void Cfg::liveness(LivenessMode Mode) {
// "r=arg1+arg2", both args may be assigned the same register.
for (SizeT I = 0; I < Args.size(); ++I) {
Variable *Arg = Args[I];
- if (!Live->getLiveRange(Arg).isEmpty()) {
+ if (!Arg->getLiveRange().isEmpty()) {
// Add live range [-1,0) with weight 0. TODO: Here and below,
// use better symbolic constants along the lines of
// Inst::NumberDeleted and Inst::NumberSentinel instead of -1
// and 0.
- Live->addLiveRange(Arg, -1, 0, 0);
+ Arg->addLiveRange(-1, 0, 0);
}
// Do the same for i64 args that may have been lowered into i32
// Lo and Hi components.
Variable *Lo = Arg->getLo();
- if (Lo && !Live->getLiveRange(Lo).isEmpty())
- Live->addLiveRange(Lo, -1, 0, 0);
+ if (Lo && !Lo->getLiveRange().isEmpty())
+ Lo->addLiveRange(-1, 0, 0);
Variable *Hi = Arg->getHi();
- if (Hi && !Live->getLiveRange(Hi).isEmpty())
- Live->addLiveRange(Hi, -1, 0, 0);
- }
- // Copy Liveness::LiveRanges into individual variables. TODO:
- // Remove Variable::LiveRange and redirect to
- // Liveness::LiveRanges. TODO: make sure Variable weights
- // are applied properly.
- SizeT NumVars = Variables.size();
- for (SizeT i = 0; i < NumVars; ++i) {
- Variable *Var = Variables[i];
- Var->setLiveRange(Live->getLiveRange(Var));
- if (Var->getWeight().isInf())
- Var->setLiveRangeInfiniteWeight();
+ if (Hi && !Hi->getLiveRange().isEmpty())
+ Hi->addLiveRange(-1, 0, 0);
}
}
}
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | src/IceOperand.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698