[llvm] r333754 - [NFC] Zero initialize local variables

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 09:07:37 PDT 2018


Test case?

On Fri, Jun 1, 2018 at 7:27 AM Hiroshi Inoue via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: inouehrs
> Date: Fri Jun  1 07:23:15 2018
> New Revision: 333754
>
> URL: http://llvm.org/viewvc/llvm-project?rev=333754&view=rev
> Log:
> [NFC] Zero initialize local variables
>
> This patch makes local variables zero initialized to avoid broken values
> in debug output.
>
>
> Modified:
>     llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=333754&r1=333753&r2=333754&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Fri Jun  1 07:23:15
> 2018
> @@ -2253,7 +2253,7 @@ public:
>      // set of bit groups, and then mask in the zeros at the end. With
> early
>      // masking, we only insert the non-zero parts of the result at every
> step.
>
> -    unsigned InstCnt, InstCntLateMask;
> +    unsigned InstCnt = 0, InstCntLateMask = 0;
>      LLVM_DEBUG(dbgs() << "\tEarly masking:\n");
>      SDNode *RN = Select(N, false, &InstCnt);
>      LLVM_DEBUG(dbgs() << "\t\tisel would use " << InstCnt << "
> instructions\n");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180604/88f7db12/attachment.html>


More information about the llvm-commits mailing list