summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-05-05 22:00:44 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-05-05 22:00:44 +0000
commit897574311fa0d91709f437e950cb0c512c3f9c9c (patch)
tree4c223202055b20f0fdbb82e817bae36034860b72 /llvm/lib/Target/Hexagon
parent6bd426830289afa7eb41949413b13803c6058e17 (diff)
downloadbcm5719-llvm-897574311fa0d91709f437e950cb0c512c3f9c9c.tar.gz
bcm5719-llvm-897574311fa0d91709f437e950cb0c512c3f9c9c.zip
[scan-build] fix warnings emitted on LLVM Hexagon code base
Patch by Apelete Seketeli. Differential Revision: http://reviews.llvm.org/D19968 llvm-svn: 268691
Diffstat (limited to 'llvm/lib/Target/Hexagon')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp1
-rw-r--r--llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp2
-rw-r--r--llvm/lib/Target/Hexagon/RDFGraph.cpp1
3 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp b/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
index eb56ae7ffb0..78d64151b0b 100644
--- a/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
@@ -180,6 +180,7 @@ bool HexagonCFGOptimizer::runOnMachineFunction(MachineFunction &Fn) {
// 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.
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
index 0ae999239a4..7285f698e30 100644
--- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
@@ -1301,7 +1301,7 @@ bool HexagonInstrInfo::isPredicable(MachineInstr &MI) const {
// 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;
diff --git a/llvm/lib/Target/Hexagon/RDFGraph.cpp b/llvm/lib/Target/Hexagon/RDFGraph.cpp
index 029d1e9c24e..ce3cf7b7611 100644
--- a/llvm/lib/Target/Hexagon/RDFGraph.cpp
+++ b/llvm/lib/Target/Hexagon/RDFGraph.cpp
@@ -1564,6 +1564,7 @@ void DataFlowGraph::linkBlockRefs(DefStackMap &DefM, NodeAddr<BlockNode*> BA) {
// 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.
OpenPOWER on IntegriCloud