[llvm] edc2dca - [ARM] Add extra debug messages for gather/scatter lowering. NFC

David Green via llvm-commits llvm-commits at lists.llvm.org
Sun May 23 00:56:09 PDT 2021


Author: David Green
Date: 2021-05-23T08:52:13+01:00
New Revision: edc2dca405ef837ccf058d5fe655ef94b8cddbfa

URL: https://github.com/llvm/llvm-project/commit/edc2dca405ef837ccf058d5fe655ef94b8cddbfa
DIFF: https://github.com/llvm/llvm-project/commit/edc2dca405ef837ccf058d5fe655ef94b8cddbfa.diff

LOG: [ARM] Add extra debug messages for gather/scatter lowering. NFC

Added: 
    

Modified: 
    llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index 81f113b8302fd..bef7fbf1470e2 100644
--- a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@ -349,7 +349,8 @@ MVEGatherScatterLowering::getVarAndConst(Value *Inst, int TypeScale) {
 
 Value *MVEGatherScatterLowering::lowerGather(IntrinsicInst *I) {
   using namespace PatternMatch;
-  LLVM_DEBUG(dbgs() << "masked gathers: checking transform preconditions\n");
+  LLVM_DEBUG(dbgs() << "masked gathers: checking transform preconditions\n"
+                    << *I << "\n");
 
   // @llvm.masked.gather.*(Ptrs, alignment, Mask, Src0)
   // Attempt to turn the masked gather in I into a MVE intrinsic
@@ -390,7 +391,8 @@ Value *MVEGatherScatterLowering::lowerGather(IntrinsicInst *I) {
     // sext/zext as well as of the gather itself
     I->eraseFromParent();
 
-  LLVM_DEBUG(dbgs() << "masked gathers: successfully built masked gather\n");
+  LLVM_DEBUG(dbgs() << "masked gathers: successfully built masked gather\n"
+                    << *Load << "\n");
   return Load;
 }
 
@@ -510,7 +512,8 @@ Value *MVEGatherScatterLowering::tryCreateMaskedGatherOffset(
 
 Value *MVEGatherScatterLowering::lowerScatter(IntrinsicInst *I) {
   using namespace PatternMatch;
-  LLVM_DEBUG(dbgs() << "masked scatters: checking transform preconditions\n");
+  LLVM_DEBUG(dbgs() << "masked scatters: checking transform preconditions\n"
+                    << *I << "\n");
 
   // @llvm.masked.scatter.*(data, ptrs, alignment, mask)
   // Attempt to turn the masked scatter in I into a MVE intrinsic
@@ -537,7 +540,8 @@ Value *MVEGatherScatterLowering::lowerScatter(IntrinsicInst *I) {
   if (!Store)
     return nullptr;
 
-  LLVM_DEBUG(dbgs() << "masked scatters: successfully built masked scatter\n");
+  LLVM_DEBUG(dbgs() << "masked scatters: successfully built masked scatter\n"
+                    << *Store << "\n");
   I->eraseFromParent();
   return Store;
 }
@@ -609,9 +613,8 @@ Value *MVEGatherScatterLowering::tryCreateMaskedScatterOffset(
     }
   }
   if (InputTy->getPrimitiveSizeInBits() != 128) {
-    LLVM_DEBUG(
-        dbgs() << "masked scatters: cannot create scatters for non-standard"
-               << " input types. Expanding.\n");
+    LLVM_DEBUG(dbgs() << "masked scatters: cannot create scatters for "
+                         "non-standard input types. Expanding.\n");
     return nullptr;
   }
 
@@ -882,7 +885,8 @@ static bool hasAllGatScatUsers(Instruction *I) {
 
 bool MVEGatherScatterLowering::optimiseOffsets(Value *Offsets, BasicBlock *BB,
                                                LoopInfo *LI) {
-  LLVM_DEBUG(dbgs() << "masked gathers/scatters: trying to optimize\n");
+  LLVM_DEBUG(dbgs() << "masked gathers/scatters: trying to optimize\n"
+                    << *Offsets << "\n");
   // Optimise the addresses of gathers/scatters by moving invariant
   // calculations out of the loop
   if (!isa<Instruction>(Offsets))


        


More information about the llvm-commits mailing list