Pass EphValues by const-ref as it is not modified in the callee

Patch by Aditya Kumar.

Differential Revision: https://reviews.llvm.org/D22967

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sebastian Pop 2016-08-03 19:13:50 +00:00
parent d22c167594
commit 52f0f65dcd
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ struct CodeMetrics {
/// \brief Add information about a block to the current state.
void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI,
SmallPtrSetImpl<const Value*> &EphValues);
const SmallPtrSetImpl<const Value*> &EphValues);
/// \brief Collect a loop's ephemeral values (those used only by an assume
/// or similar intrinsics in the loop).

View File

@ -104,7 +104,7 @@ void CodeMetrics::collectEphemeralValues(
/// block.
void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB,
const TargetTransformInfo &TTI,
SmallPtrSetImpl<const Value*> &EphValues) {
const SmallPtrSetImpl<const Value*> &EphValues) {
++NumBlocks;
unsigned NumInstsBeforeThisBB = NumInsts;
for (const Instruction &I : *BB) {