Subzero: Improve debugging controls, plus minor refactoring.
1. Decorate the list of live-in and live-out variables with register assignments in the dump() output. This helps one to assess register pressure.
2. Fix a bug where the DisableInternal flag wasn't being honored for function definitions.
3. Add a -translate-only=<symbol> to limit translation to a single function or global variable. This makes it easier to focus on debugging a single function.
4. Change the -no-phi-edge-split option to -phi-edge-split and invert the meaning, to better not avoid the non double negatives.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/673783002
diff --git a/src/IceLiveness.cpp b/src/IceLiveness.cpp
index 79578a5..f16eb84 100644
--- a/src/IceLiveness.cpp
+++ b/src/IceLiveness.cpp
@@ -77,10 +77,8 @@
assert(NumGlobals == TmpNumGlobals);
// Process each node.
- const NodeList &LNodes = Func->getNodes();
- SizeT NumLNodes = LNodes.size();
- for (SizeT i = 0; i < NumLNodes; ++i) {
- LivenessNode &Node = Nodes[LNodes[i]->getIndex()];
+ for (const CfgNode *LNode : Func->getNodes()) {
+ LivenessNode &Node = Nodes[LNode->getIndex()];
// NumLocals, LiveToVarMap already initialized
Node.LiveIn.resize(NumGlobals);
Node.LiveOut.resize(NumGlobals);