[llvm-commits] [llvm] r163309 - in /llvm/trunk/lib: CodeGen/SelectionDAG/TargetLowering.cpp Target/ARM/ARMFastISel.cpp

David Blaikie dblaikie at gmail.com
Thu Sep 6 08:38:46 PDT 2012


On Thu, Sep 6, 2012 at 4:13 AM, Nadav Rotem <nrotem at apple.com> wrote:
> Author: nadav
> Date: Thu Sep  6 06:13:55 2012
> New Revision: 163309
>
> URL: http://llvm.org/viewvc/llvm-project?rev=163309&view=rev
> Log:
> Fix a few old-GCC warnings. No functional change.

Which warnings were these exactly? I know Chandler's fond of not
fixing GCC's rather pessimistic "may be used uninitialized" warning
because he doesn't want those 'fixes' to cloud more precise checkers
like valgrind, as well as arguments from performance, etc. (& to an
extent I agree with him)

If these variables aren't accidentally being used uninitialized in
some code path, it may be best to leave them as they were.

- David

>
> Modified:
>     llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
>     llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=163309&r1=163308&r2=163309&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu Sep  6 06:13:55 2012
> @@ -2440,7 +2440,7 @@
>    if (N0 == N1) {
>      // The sext(setcc()) => setcc() optimization relies on the appropriate
>      // constant being emitted.
> -    uint64_t EqVal;
> +    uint64_t EqVal = 0;
>      switch (getBooleanContents(N0.getValueType().isVector())) {
>      case UndefinedBooleanContent:
>      case ZeroOrOneBooleanContent:
>
> Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=163309&r1=163308&r2=163309&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Thu Sep  6 06:13:55 2012
> @@ -2642,7 +2642,7 @@
>    unsigned Reg1 = getRegForValue(Src1Value);
>    if (Reg1 == 0) return false;
>
> -  unsigned Reg2;
> +  unsigned Reg2 = 0;
>    if (Opc == ARM::MOVsr) {
>      Reg2 = getRegForValue(Src2Value);
>      if (Reg2 == 0) return false;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list