[llvm-bugs] [Bug 40634] New: [Debuginfo] @llvm.dbg.value changes behavior of transformations that check for BB size

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 6 13:28:26 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40634

            Bug ID: 40634
           Summary: [Debuginfo] @llvm.dbg.value changes behavior of
                    transformations that check for BB size
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: florian_hahn at apple.com
                CC: jdevlieghere at apple.com, keith.walker at arm.com,
                    llvm-bugs at lists.llvm.org,
                    paul_robinson at playstation.sony.com

After skimming D57629, I had a quick look around to search for similar
problematic checks in other LLVM transformations. Below is an incomplete list
of instances I found.


diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 1f40c8f5a4a..dd8fe342aa7 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2383,6 +2383,7 @@ static Instruction *tryToMoveFreeBeforeNullTest(CallInst
&FI,
   // this is the call to free and unconditional.
   // If there are more than 2 instructions, check that they are noops
   // i.e., they won't hurt the performance of the generated code.
+  // TODO
   if (FreeInstrBB->size() != 2) {
     for (const Instruction &Inst : *FreeInstrBB) {
       if (&Inst == &FI || &Inst == FreeInstrBBTerminator)
diff --git a/llvm/lib/Transforms/Scalar/GVNSink.cpp
b/llvm/lib/Transforms/Scalar/GVNSink.cpp
index 94cc219a4a7..3aa74714414 100644
--- a/llvm/lib/Transforms/Scalar/GVNSink.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNSink.cpp
@@ -133,6 +133,7 @@ public:
       ActiveBlocks.insert(BB);
     Insts.clear();
     for (BasicBlock *BB : Blocks) {
+      // TODO
       if (BB->size() <= 1) {
         // Block wasn't big enough - only contained a terminator.
         ActiveBlocks.remove(BB);
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index 799f40d8724..4e6c35593e8 100644
--- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -1488,6 +1488,7 @@ bool LoopIdiomRecognize::recognizePopcount() {
   if (CurLoop->getNumBackEdges() != 1 || CurLoop->getNumBlocks() != 1)
     return false;

+  // TODO
   BasicBlock *LoopBody = *(CurLoop->block_begin());
   if (LoopBody->size() >= 20) {
     // The loop is too big, bail out.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190206/ece98e67/attachment.html>


More information about the llvm-bugs mailing list