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

Side by Side Diff: src/IceRegAlloc.cpp

Issue 1271923002: Subzero: Slight improvement to phi lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 unified diff | Download patch
« src/IceCfgNode.cpp ('K') | « src/IceLiveness.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceRegAlloc.cpp - Linear-scan implementation -----------===// 1 //===- subzero/src/IceRegAlloc.cpp - Linear-scan implementation -----------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Unhandled set. 100 // Unhandled set.
101 for (Variable *Var : Vars) { 101 for (Variable *Var : Vars) {
102 // Explicitly don't consider zero-weight variables, which are 102 // Explicitly don't consider zero-weight variables, which are
103 // meant to be spill slots. 103 // meant to be spill slots.
104 if (Var->getWeight().isZero()) 104 if (Var->getWeight().isZero())
105 continue; 105 continue;
106 // Don't bother if the variable has a null live range, which means 106 // Don't bother if the variable has a null live range, which means
107 // it was never referenced. 107 // it was never referenced.
108 if (Var->getLiveRange().isEmpty()) 108 if (Var->getLiveRange().isEmpty())
109 continue; 109 continue;
110 // Post phi lowering register allocation is only concerned with variables
111 // that are infinite-weight or pre-colored.
112 if (Kind == RAK_Phi && !Var->getWeight().isInf() && !Var->hasReg())
113 continue;
114 Var->untrimLiveRange(); 110 Var->untrimLiveRange();
115 Unhandled.push_back(Var); 111 Unhandled.push_back(Var);
116 if (Var->hasReg()) { 112 if (Var->hasReg()) {
117 Var->setRegNumTmp(Var->getRegNum()); 113 Var->setRegNumTmp(Var->getRegNum());
118 Var->setLiveRangeInfiniteWeight(); 114 Var->setLiveRangeInfiniteWeight();
119 UnhandledPrecolored.push_back(Var); 115 UnhandledPrecolored.push_back(Var);
120 } 116 }
121 } 117 }
122 118
123 // Build the (ordered) list of FakeKill instruction numbers. 119 // Build the (ordered) list of FakeKill instruction numbers.
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 Str << "\n"; 847 Str << "\n";
852 } 848 }
853 Str << "++++++ Inactive:\n"; 849 Str << "++++++ Inactive:\n";
854 for (const Variable *Item : Inactive) { 850 for (const Variable *Item : Inactive) {
855 dumpLiveRange(Item, Func); 851 dumpLiveRange(Item, Func);
856 Str << "\n"; 852 Str << "\n";
857 } 853 }
858 } 854 }
859 855
860 } // end of namespace Ice 856 } // end of namespace Ice
OLDNEW
« src/IceCfgNode.cpp ('K') | « src/IceLiveness.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698