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

Side by Side Diff: src/IceInstX8632.cpp

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix vector const undef lowering for phis. Created 6 years, 1 month 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
« no previous file with comments | « src/IceInstX8632.h ('k') | src/IceLiveness.h » ('j') | 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/IceInstX8632.cpp - X86-32 instruction implementation ---===// 1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction 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 // This file implements the InstX8632 and OperandX8632 classes, 10 // This file implements the InstX8632 and OperandX8632 classes,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 if (getTargetTrue() == NextNode) { 177 if (getTargetTrue() == NextNode) {
178 assert(Condition != CondX86::Br_None); 178 assert(Condition != CondX86::Br_None);
179 Condition = InstX8632BrAttributes[Condition].Opposite; 179 Condition = InstX8632BrAttributes[Condition].Opposite;
180 TargetTrue = getTargetFalse(); 180 TargetTrue = getTargetFalse();
181 TargetFalse = NULL; 181 TargetFalse = NULL;
182 return true; 182 return true;
183 } 183 }
184 return false; 184 return false;
185 } 185 }
186 186
187 bool InstX8632Br::repointEdge(CfgNode *OldNode, CfgNode *NewNode) {
188 if (TargetFalse == OldNode) {
189 TargetFalse = NewNode;
190 return true;
191 } else if (TargetTrue == OldNode) {
192 TargetTrue = NewNode;
193 return true;
194 }
195 return false;
196 }
197
187 InstX8632Call::InstX8632Call(Cfg *Func, Variable *Dest, Operand *CallTarget) 198 InstX8632Call::InstX8632Call(Cfg *Func, Variable *Dest, Operand *CallTarget)
188 : InstX8632(Func, InstX8632::Call, 1, Dest) { 199 : InstX8632(Func, InstX8632::Call, 1, Dest) {
189 HasSideEffects = true; 200 HasSideEffects = true;
190 addSource(CallTarget); 201 addSource(CallTarget);
191 } 202 }
192 203
193 InstX8632Cmov::InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, 204 InstX8632Cmov::InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source,
194 CondX86::BrCond Condition) 205 CondX86::BrCond Condition)
195 : InstX8632(Func, InstX8632::Cmov, 2, Dest), Condition(Condition) { 206 : InstX8632(Func, InstX8632::Cmov, 2, Dest), Condition(Condition) {
196 // The final result is either the original Dest, or Source, so mark 207 // The final result is either the original Dest, or Source, so mark
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 } 2929 }
2919 Str << "("; 2930 Str << "(";
2920 if (Func) 2931 if (Func)
2921 Var->dump(Func); 2932 Var->dump(Func);
2922 else 2933 else
2923 Var->dump(Str); 2934 Var->dump(Str);
2924 Str << ")"; 2935 Str << ")";
2925 } 2936 }
2926 2937
2927 } // end of namespace Ice 2938 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstX8632.h ('k') | src/IceLiveness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698