[llvm] r264445 - [ThinLTO] Rename edges() to calls() for clarity (NFC)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 11:59:13 PDT 2016


Author: tejohnson
Date: Fri Mar 25 13:59:13 2016
New Revision: 264445

URL: http://llvm.org/viewvc/llvm-project?rev=264445&view=rev
Log:
[ThinLTO] Rename edges() to calls() for clarity (NFC)

Helps distinguish from refs() which iterates over non-call references.

Modified:
    llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
    llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp

Modified: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h?rev=264445&r1=264444&r2=264445&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h (original)
+++ llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h Fri Mar 25 13:59:13 2016
@@ -162,8 +162,8 @@ public:
   }
 
   /// Return the list of <CalleeGUID, ProfileCount> pairs.
-  std::vector<EdgeTy> &edges() { return CallGraphEdgeList; }
-  const std::vector<EdgeTy> &edges() const { return CallGraphEdgeList; }
+  std::vector<EdgeTy> &calls() { return CallGraphEdgeList; }
+  const std::vector<EdgeTy> &calls() const { return CallGraphEdgeList; }
 };
 
 /// \brief Global variable summary information to aid decisions and

Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=264445&r1=264444&r2=264445&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Fri Mar 25 13:59:13 2016
@@ -2863,7 +2863,7 @@ static void WritePerModuleFunctionSummar
     NameVals.push_back(RI);
 
   bool HasProfileData = F.getEntryCount().hasValue();
-  for (auto &ECI : FS->edges()) {
+  for (auto &ECI : FS->calls()) {
     NameVals.push_back(ECI.first);
     assert(ECI.second.CallsiteCount > 0 && "Expected at least one callsite");
     NameVals.push_back(ECI.second.CallsiteCount);
@@ -3089,13 +3089,13 @@ static void WriteCombinedGlobalValueSumm
       }
 
       bool HasProfileData = false;
-      for (auto &EI : FS->edges()) {
+      for (auto &EI : FS->calls()) {
         HasProfileData |= EI.second.ProfileCount != 0;
         if (HasProfileData)
           break;
       }
 
-      for (auto &EI : FS->edges()) {
+      for (auto &EI : FS->calls()) {
         const auto &VMI = GUIDToValueIdMap.find(EI.first);
         // If this GUID doesn't have an entry, it doesn't have a function
         // summary and we don't need to record any calls to it.




More information about the llvm-commits mailing list