[OpenMP][NFC] Improve debug message for shared memory
authorJoseph Huber <jhuber6@vols.utk.edu>
Wed, 18 Aug 2021 15:48:15 +0000 (11:48 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 18 Aug 2021 15:56:09 +0000 (11:56 -0400)
Summary:
Make the debug message for HeapToShared more helpful by showing the
actual call.

llvm/lib/Transforms/IPO/OpenMPOpt.cpp

index 358799a..c48ae6e 100644 (file)
@@ -2712,9 +2712,8 @@ struct AAHeapToSharedFunction : public AAHeapToShared {
 
       ConstantInt *AllocSize = dyn_cast<ConstantInt>(CB->getArgOperand(0));
 
-      LLVM_DEBUG(dbgs() << TAG << "Replace globalization call in "
-                        << CB->getCaller()->getName() << " with "
-                        << AllocSize->getZExtValue()
+      LLVM_DEBUG(dbgs() << TAG << "Replace globalization call " << *CB
+                        << " with " << AllocSize->getZExtValue()
                         << " bytes of shared memory\n");
 
       // Create a new shared memory buffer of the same size as the allocation