Subzero: Speed up VariablesMetadata initialization.
Currently, O2 calls VariablesMetadata::init() 4 times:
- Twice for liveness analysis, where only multi-block use information is needed for dealing with sparse bit vectors.
- Once for address mode inference, where single-definition information is needed.
- Once for register allocation, where all information is needed, including the set of all definitions which is needed for determining AllowOverlap.
So we limit the amount of data we gather based on the actual need.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/650613003
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index dfb1fda..232acdd 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -329,7 +329,7 @@
Func->dump("After Phi lowering");
// Address mode optimization.
- Func->getVMetadata()->init();
+ Func->getVMetadata()->init(VMK_SingleDefs);
Func->doAddressOpt();
// Argument lowering
@@ -372,7 +372,7 @@
// The post-codegen dump is done here, after liveness analysis and
// associated cleanup, to make the dump cleaner and more useful.
Func->dump("After initial x8632 codegen");
- Func->getVMetadata()->init();
+ Func->getVMetadata()->init(VMK_All);
regAlloc();
if (Func->hasError())
return;