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

Unified Diff: src/IceTargetLowering.cpp

Issue 1392383003: Subzero: Consider all instruction variables for register preference. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index aa1a80c46b30da7603175b7541bcee0ddf3736ce..585f3722fd3a508df2ba4958d0d19b8d8572718f 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -81,12 +81,11 @@ void LoweringContext::availabilityUpdate() {
Inst *Instr = LastInserted;
if (Instr == nullptr)
return;
- if (!Instr->isSimpleAssign())
+ if (!Instr->isVarAssign())
return;
- if (auto *SrcVar = llvm::dyn_cast<Variable>(Instr->getSrc(0))) {
- LastDest = Instr->getDest();
- LastSrc = SrcVar;
- }
+ // Since isVarAssign() is true, the source operand must be a Variable.
+ LastDest = Instr->getDest();
+ LastSrc = llvm::cast<Variable>(Instr->getSrc(0));
}
Variable *LoweringContext::availabilityGet(Operand *Src) const {

Powered by Google App Engine
This is Rietveld 408576698