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

Unified Diff: src/IceOperand.h

Issue 557953007: Subzero: Fix incorrect address mode inference involving Phi temporaries. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add check against Var2->getIsMultidef() Created 6 years, 3 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 | « src/IceInst.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 36aafe23249f3a198b52b3e903fb4f3f36b151da..7e7c4f02add3b73cec81a159063ec28b48b01961 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -349,6 +349,14 @@ public:
bool isMultiblockLife() const { return (DefNode == NULL); }
void setUse(const Inst *Inst, const CfgNode *Node);
+ // Multidef means a variable is non-SSA and has multiple defining
+ // instructions. Currently this classification is limited to SSA
+ // lowering temporaries where the definitions are in different basic
+ // blocks, and it is not maintained during target lowering when the
+ // same temporary may be updated in consecutive instructions.
+ bool getIsMultidef() const { return IsMultidef; }
+ void setIsMultidef() { IsMultidef = true; }
+
bool getIsArg() const { return IsArgument; }
void setIsArg(Cfg *Func, bool IsArg = true);
@@ -419,9 +427,10 @@ public:
private:
Variable(Type Ty, const CfgNode *Node, SizeT Index, const IceString &Name)
: Operand(kVariable, Ty), Number(Index), Name(Name), DefInst(NULL),
- DefNode(Node), IsArgument(false), StackOffset(0), RegNum(NoRegister),
- RegNumTmp(NoRegister), Weight(1), RegisterPreference(NULL),
- AllowRegisterOverlap(false), LoVar(NULL), HiVar(NULL) {
+ DefNode(Node), IsMultidef(false), IsArgument(false), StackOffset(0),
+ RegNum(NoRegister), RegNumTmp(NoRegister), Weight(1),
+ RegisterPreference(NULL), AllowRegisterOverlap(false), LoVar(NULL),
+ HiVar(NULL) {
Vars = VarsReal;
Vars[0] = this;
NumVars = 1;
@@ -443,6 +452,7 @@ private:
// Cfg. This saves space in the Variable, and removes the fragility
// of incrementally computing and maintaining the information.
const CfgNode *DefNode;
+ bool IsMultidef;
bool IsArgument;
// StackOffset is the canonical location on stack (only if
// RegNum<0 || IsArgument).
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698