[PATCH] D22967: Pass EphValues by const-ref as it is not modified in the callee

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 12:21:41 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL277634: Pass EphValues by const-ref as it is not modified in the callee (authored by spop).

Changed prior to commit:
  https://reviews.llvm.org/D22967?vs=66154&id=66691#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D22967

Files:
  llvm/trunk/include/llvm/Analysis/CodeMetrics.h
  llvm/trunk/lib/Analysis/CodeMetrics.cpp

Index: llvm/trunk/lib/Analysis/CodeMetrics.cpp
===================================================================
--- llvm/trunk/lib/Analysis/CodeMetrics.cpp
+++ llvm/trunk/lib/Analysis/CodeMetrics.cpp
@@ -104,7 +104,7 @@
 /// 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) {
Index: llvm/trunk/include/llvm/Analysis/CodeMetrics.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/CodeMetrics.h
+++ llvm/trunk/include/llvm/Analysis/CodeMetrics.h
@@ -87,7 +87,7 @@
 
   /// \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).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22967.66691.patch
Type: text/x-patch
Size: 1287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160803/ca7db493/attachment.bin>


More information about the llvm-commits mailing list