mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
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:
parent
d22c167594
commit
52f0f65dcd
@ -87,7 +87,7 @@ struct CodeMetrics {
|
|||||||
|
|
||||||
/// \brief Add information about a block to the current state.
|
/// \brief Add information about a block to the current state.
|
||||||
void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI,
|
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
|
/// \brief Collect a loop's ephemeral values (those used only by an assume
|
||||||
/// or similar intrinsics in the loop).
|
/// or similar intrinsics in the loop).
|
||||||
|
@ -104,7 +104,7 @@ void CodeMetrics::collectEphemeralValues(
|
|||||||
/// block.
|
/// block.
|
||||||
void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB,
|
void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB,
|
||||||
const TargetTransformInfo &TTI,
|
const TargetTransformInfo &TTI,
|
||||||
SmallPtrSetImpl<const Value*> &EphValues) {
|
const SmallPtrSetImpl<const Value*> &EphValues) {
|
||||||
++NumBlocks;
|
++NumBlocks;
|
||||||
unsigned NumInstsBeforeThisBB = NumInsts;
|
unsigned NumInstsBeforeThisBB = NumInsts;
|
||||||
for (const Instruction &I : *BB) {
|
for (const Instruction &I : *BB) {
|
||||||
|
Loading…
Reference in New Issue
Block a user