summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Davis <Matthew.Davis@sony.com>2018-03-14 23:30:31 +0000
committerMatt Davis <Matthew.Davis@sony.com>2018-03-14 23:30:31 +0000
commit9407bb5f548ebd5900a0fc8226c7f49ee247126f (patch)
tree4025897dd446b7d347fb56193fb6fba5ea25cf06
parent48fbf0c69a256024c19cf3dfb1f17ab570661973 (diff)
downloadbcm5719-llvm-9407bb5f548ebd5900a0fc8226c7f49ee247126f.tar.gz
bcm5719-llvm-9407bb5f548ebd5900a0fc8226c7f49ee247126f.zip
[CleanUp] Remove NumInstructions field from LoopVectorizer's RegisterUsage struct.
Summary: This variable is largely going unused; aside from reporting number of instructions for in DEBUG builds. The only use of NumInstructions is in debug output to represent the LoopSize. That value can be can be misleading as it also includes metadata instructions (e.g., DBG_VALUE) which have no real impact. If we do choose to keep this around, we probably should guard it by a DEBUG macro, as it's not used in production builds. Reviewers: majnemer, congh, rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D44495 llvm-svn: 327589
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 0a5938e1005..7504978e7b6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1832,9 +1832,6 @@ public:
/// Holds the maximum number of concurrent live intervals in the loop.
unsigned MaxLocalUsers;
-
- /// Holds the number of instructions in the loop.
- unsigned NumInstructions;
};
/// \return Returns information about the register usages of the loop for the
@@ -6296,7 +6293,6 @@ unsigned LoopVectorizationCostModel::selectInterleaveCount(bool OptForSize,
// We divide by these constants so assume that we have at least one
// instruction that uses at least one register.
R.MaxLocalUsers = std::max(R.MaxLocalUsers, 1U);
- R.NumInstructions = std::max(R.NumInstructions, 1U);
// We calculate the interleave count using the following formula.
// Subtract the number of loop invariants from the number of available
@@ -6423,7 +6419,6 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef<unsigned> VFs) {
DFS.perform(LI);
RegisterUsage RU;
- RU.NumInstructions = 0;
// Each 'key' in the map opens a new interval. The values
// of the map are the index of the 'last seen' usage of the
@@ -6442,7 +6437,6 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef<unsigned> VFs) {
unsigned Index = 0;
for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO())) {
- RU.NumInstructions += BB->size();
for (Instruction &I : *BB) {
IdxToInstr[Index++] = &I;
@@ -6552,7 +6546,6 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef<unsigned> VFs) {
DEBUG(dbgs() << "LV(REG): VF = " << VFs[i] << '\n');
DEBUG(dbgs() << "LV(REG): Found max usage: " << MaxUsages[i] << '\n');
DEBUG(dbgs() << "LV(REG): Found invariant usage: " << Invariant << '\n');
- DEBUG(dbgs() << "LV(REG): LoopSize: " << RU.NumInstructions << '\n');
RU.LoopInvariantRegs = Invariant;
RU.MaxLocalUsers = MaxUsages[i];
OpenPOWER on IntegriCloud