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/IceInst.h

Issue 652633002: Subzero: Improve performance of liveness analysis and live range construction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove TODO Created 6 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
« no previous file with comments | « src/IceDefs.h ('k') | src/IceInst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.h
diff --git a/src/IceInst.h b/src/IceInst.h
index d1e26fb1b5824db1611e8b543dbf54191c5c07e7..c3aa7c30ad84ea33ff5a38b182b39bc50c86ae37 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -66,8 +66,7 @@ public:
InstNumberT getNumber() const { return Number; }
void renumber(Cfg *Func);
- static const InstNumberT NumberDeleted = -1;
- static const InstNumberT NumberSentinel = 0;
+ enum { NumberDeleted = -1, NumberSentinel = 0 };
bool isDeleted() const { return Deleted; }
void setDeleted() { Deleted = true; }
@@ -75,6 +74,9 @@ public:
bool hasSideEffects() const { return HasSideEffects; }
+ bool isDestNonKillable() const { return IsDestNonKillable; }
+ void setDestNonKillable() { IsDestNonKillable = true; }
+
Variable *getDest() const { return Dest; }
SizeT getSrcSize() const { return NumSrcs; }
@@ -98,9 +100,9 @@ public:
virtual bool isSimpleAssign() const { return false; }
- void livenessLightweight(Cfg *Func, llvm::BitVector &Live);
- void liveness(InstNumberT InstNumber, llvm::BitVector &Live,
- Liveness *Liveness, const CfgNode *Node);
+ void livenessLightweight(Cfg *Func, LivenessBV &Live);
+ void liveness(InstNumberT InstNumber, LivenessBV &Live, Liveness *Liveness,
+ LiveBeginEndMap *LiveBegin, LiveBeginEndMap *LiveEnd);
// Get the number of native instructions that this instruction
// ultimately emits. By default, high-level instructions don't
@@ -146,6 +148,10 @@ protected:
// call or a volatile load that can't be removed even if its Dest
// variable is not live.
bool HasSideEffects;
+ // IsDestNonKillable means that liveness analysis shouldn't consider
+ // this instruction to kill the Dest variable. This is used when
+ // lowering produces two assignments to the same variable.
+ bool IsDestNonKillable;
Variable *Dest;
const SizeT MaxSrcs; // only used for assert
@@ -534,7 +540,7 @@ public:
}
void addArgument(Operand *Source, CfgNode *Label);
Operand *getOperandForTarget(CfgNode *Target) const;
- void livenessPhiOperand(llvm::BitVector &Live, CfgNode *Target,
+ void livenessPhiOperand(LivenessBV &Live, CfgNode *Target,
Liveness *Liveness);
Inst *lower(Cfg *Func);
void dump(const Cfg *Func) const override;
« no previous file with comments | « src/IceDefs.h ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698