[PATCH] D19968: [scan-build] fix warnings emitted on LLVM Hexagon code base

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 15:06:48 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL268691: [scan-build] fix warnings emitted on LLVM Hexagon code base (authored by kparzysz).

Changed prior to commit:
  http://reviews.llvm.org/D19968?vs=56276&id=56355#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19968

Files:
  llvm/trunk/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
  llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
  llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp

Index: llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
+++ llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
@@ -1301,7 +1301,7 @@
 
   // Keep a flag for upto 4 operands in the instructions, to indicate if
   // that operand has been constant extended.
-  bool OpCExtended[4];
+  bool OpCExtended[4] = {false};
   if (NumOperands > 4)
     NumOperands = 4;
 
Index: llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
===================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
+++ llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
@@ -1564,6 +1564,7 @@
   // Push block delimiters.
   markBlock(BA.Id, DefM);
 
+  assert(BA.Addr && "block node address is needed to create a data-flow link");
   // For each non-phi instruction in the block, link all the defs and uses
   // to their reaching defs. For any member of the block (including phis),
   // push the defs on the corresponding stacks.
Index: llvm/trunk/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
===================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
+++ llvm/trunk/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
@@ -180,6 +180,7 @@
           // Ensure that BB2 has one instruction -- an unconditional jump.
           if ((LayoutSucc->size() == 1) &&
               IsUnconditionalJump(LayoutSucc->front().getOpcode())) {
+            assert(JumpAroundTarget && "jump target is needed to process second basic block");
             MachineBasicBlock* UncondTarget =
               LayoutSucc->front().getOperand(0).getMBB();
             // Check if the layout successor of BB2 is BB3.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19968.56355.patch
Type: text/x-patch
Size: 1780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160505/900cccd4/attachment.bin>


More information about the llvm-commits mailing list