forked from OSchip/llvm-project
[scan-build] fix warnings emitted on LLVM Hexagon code base
Patch by Apelete Seketeli. Differential Revision: http://reviews.llvm.org/D19968 llvm-svn: 268691
This commit is contained in:
parent
6bd4268302
commit
897574311f
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue