This improves the variable use weight by taking into account use in loops. It further improves spec2k performance and fixes the regression in ammp. Loops are identified using an extension to Tarjan's algorithm. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1318553003.
diff --git a/src/IceCfg.h b/src/IceCfg.h index e6c5a4a..3c8972d 100644 --- a/src/IceCfg.h +++ b/src/IceCfg.h
@@ -86,7 +86,9 @@ /// @{ void setEntryNode(CfgNode *EntryNode) { Entry = EntryNode; } CfgNode *getEntryNode() const { return Entry; } - /// Create a node and append it to the end of the linearized list. + /// Create a node and append it to the end of the linearized list. The loop + /// nest depth of the new node may not be valid if it is created after + /// computeLoopNestDepth. CfgNode *makeNode(); SizeT getNumNodes() const { return Nodes.size(); } const NodeList &getNodes() const { return Nodes; } @@ -189,6 +191,7 @@ void doNopInsertion(); void genCode(); void genFrame(); + void computeLoopNestDepth(); void livenessLightweight(); void liveness(LivenessMode Mode); bool validateLiveness() const;