Make sure to check splats of every constant we can, handle splat(31) by
[oota-llvm.git] / runtime / libprofile / BlockProfiling.c
index 01b80a88e01a7eb3bc07b174b18d355d0c928920..2b1b0116172528da94fc4d7770c28ff6ac9a862c 100644 (file)
@@ -23,21 +23,23 @@ static unsigned NumElements;
  * data.
  */
 static void BlockProfAtExitHandler() {
-  /* Note that if this were doing something more intellegent with the
-     instrumentation, that we could do some computation here to expand what we
-     collected into simple block profiles.  Since we directly count each block,
-  */
-  write_profiling_data(Block, ArrayStart, NumElements);
+  /* Note that if this were doing something more intelligent with the
+   * instrumentation, we could do some computation here to expand what we
+   * collected into simple block profiles. (Or we could do it in llvm-prof.)
+   * Regardless, we directly count each block, so no expansion is necessary.
+   */
+  write_profiling_data(BlockInfo, ArrayStart, NumElements);
 }
 
 
 /* llvm_start_block_profiling - This is the main entry point of the block
  * profiling library.  It is responsible for setting up the atexit handler.
  */
-void llvm_start_block_profiling(int argc, const char **argv,
-                                unsigned *arrayStart, unsigned numElements) {
-  save_arguments(argc, argv);
+int llvm_start_block_profiling(int argc, const char **argv,
+                               unsigned *arrayStart, unsigned numElements) {
+  int Ret = save_arguments(argc, argv);
   ArrayStart = arrayStart;
   NumElements = numElements;
   atexit(BlockProfAtExitHandler);
+  return Ret;
 }