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/IceOperand.cpp b/src/IceOperand.cpp
index 98e8f6f..a2ee8f4 100644
--- a/src/IceOperand.cpp
+++ b/src/IceOperand.cpp
@@ -171,9 +171,7 @@
IceString Variable::getName() const {
if (!Name.empty())
return Name;
- char buf[30];
- snprintf(buf, llvm::array_lengthof(buf), "__%u", getIndex());
- return buf;
+ return "__" + std::to_string(getIndex());
}
Variable Variable::asType(Type Ty) {