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

Unified Diff: src/IceLiveness.h

Issue 1746613002: Subzero: Reduce copying of Liveness bitvectors. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix memory over-allocation Created 4 years, 10 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/IceInstX86BaseImpl.h ('k') | src/IceLiveness.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceLiveness.h
diff --git a/src/IceLiveness.h b/src/IceLiveness.h
index 66e4976d6a37773eba5fc9eb66b1637686b5a1f5..70578d42b518dcbd9bc2698049331f683865dfa3 100644
--- a/src/IceLiveness.h
+++ b/src/IceLiveness.h
@@ -85,6 +85,7 @@ public:
resize(Index);
return Nodes[Index].LiveOut;
}
+ LivenessBV &getScratchBV() { return ScratchBV; }
LiveBeginEndMap *getLiveBegin(const CfgNode *Node) {
SizeT Index = Node->getIndex();
resize(Index);
@@ -119,6 +120,9 @@ private:
/// RangeMask[Variable::Number] indicates whether we want to track that
/// Variable's live range.
LivenessBV RangeMask;
+ /// ScratchBV is a bitvector that can be reused across CfgNode passes, to
+ /// avoid having to allocate/deallocate memory so frequently.
+ LivenessBV ScratchBV;
};
} // end of namespace Ice
« no previous file with comments | « src/IceInstX86BaseImpl.h ('k') | src/IceLiveness.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698