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

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1441793002: Subzero: Find rematerializable variables transitively. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Suppress stack offset defs for rematerialize variables in asm-verbose mode Created 5 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 side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index 8f372196779cc6b3c068655afb1ccd4ff3948165..09dfd769a717e2272c7dc93f745f76dcd6148ae0 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -1317,6 +1317,10 @@ void TargetX86Base<Machine>::lowerShift64(InstArithmetic::OpKind Op,
template <class Machine>
void TargetX86Base<Machine>::lowerArithmetic(const InstArithmetic *Inst) {
Variable *Dest = Inst->getDest();
+ if (Dest->isRematerializable()) {
+ Context.insert(InstFakeDef::create(Func, Dest));
+ return;
+ }
Type Ty = Dest->getType();
Operand *Src0 = legalize(Inst->getSrc(0));
Operand *Src1 = legalize(Inst->getSrc(1));
@@ -1897,6 +1901,10 @@ void TargetX86Base<Machine>::lowerArithmetic(const InstArithmetic *Inst) {
template <class Machine>
void TargetX86Base<Machine>::lowerAssign(const InstAssign *Inst) {
Variable *Dest = Inst->getDest();
+ if (Dest->isRematerializable()) {
+ Context.insert(InstFakeDef::create(Func, Dest));
+ return;
+ }
Operand *Src0 = Inst->getSrc(0);
assert(Dest->getType() == Src0->getType());
if (!Traits::Is64Bit && Dest->getType() == IceType_i64) {
« src/IceCfg.cpp ('K') | « src/IceCfg.cpp ('k') | tests_lit/llvm2ice_tests/fused-alloca.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698