Add stub support for reading BBTraces.
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 4 May 2004 17:11:14 +0000 (17:11 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 4 May 2004 17:11:14 +0000 (17:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13352 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ProfileInfoLoader.cpp

index 96c3e2c5d685403973a1b9ee5f374a2c756fd267..46a888365d4117195ba1f22890d5d116b26f4b2d 100644 (file)
@@ -123,6 +123,10 @@ ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
       ReadProfilingBlock(ToolName, F, ShouldByteSwap, EdgeCounts);
       break;
 
+    case BBTraceInfo:
+      ReadProfilingBlock(ToolName, F, ShouldByteSwap, BBTrace);
+      break;
+
     default:
       std::cerr << ToolName << ": Unknown packet type #" << PacketType << "!\n";
       exit(1);
@@ -257,3 +261,15 @@ void ProfileInfoLoader::getEdgeCounts(std::vector<std::pair<Edge,
           return;
       }
 }
+
+// getBBTrace - This method is used by consumers of basic-block trace
+// information.
+//
+void ProfileInfoLoader::getBBTrace(std::vector<BasicBlock *> &Trace) {
+  if (BBTrace.empty ()) {
+    std::cerr << "Basic block trace is not available!\n";
+    return;
+  }
+  std::cerr << "Basic block trace loading is not implemented yet!\n";
+}
+