[llvm] r182585 - Setting the default value (fixes CRT assertions about uninitialized variable use when doing debug MSVC builds), and fixing coding style.

Tom Stellard tom at stellard.net
Thu May 23 14:02:08 PDT 2013


Hi Bill,

In the worst case the use of this variable uninitialized will cause a
very slight performance decrease in programs, so I don't really
consider it a critical fix from that perspective.  However, in general
using uninitialized values is bad, so I'm OK with merging this to 3.3, but
I'll leave the final decision up to you.

In any case, I would still like to maintain a stable 3.3 branch after
the release and do a dot release at some point in the future, so if this
patch doesn't go into 3.3, I'll pull it in for 3.3.1.

-Tom

On Thu, May 23, 2013 at 04:45:50PM -0400, Aaron Ballman wrote:
> This wouldn't be a regression since the R600 was experimental before,
> but it does fix a pretty serious bug with using an uninitialized
> variable.
> 
> ~Aaron
> 
> On Thu, May 23, 2013 at 4:38 PM, Bill Wendling <isanbard at gmail.com> wrote:
> > We’re not accepting any more patches unless they fix serious regressions.
> >
> > -bw
> >
> > On May 23, 2013, at 11:33 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> >
> >> Should this be a candidate for 3.3?
> >>
> >> ~Aaron
> >>
> >> On Thu, May 23, 2013 at 10:55 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> >>> Author: aaronballman
> >>> Date: Thu May 23 09:55:00 2013
> >>> New Revision: 182585
> >>>
> >>> URL: http://llvm.org/viewvc/llvm-project?rev=182585&view=rev
> >>> Log:
> >>> Setting the default value (fixes CRT assertions about uninitialized variable use when doing debug MSVC builds), and fixing coding style.
> >>>
> >>> Modified:
> >>>    llvm/trunk/lib/Target/R600/R600ControlFlowFinalizer.cpp
> >>>
> >>> Modified: llvm/trunk/lib/Target/R600/R600ControlFlowFinalizer.cpp
> >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600ControlFlowFinalizer.cpp?rev=182585&r1=182584&r2=182585&view=diff
> >>> ==============================================================================
> >>> --- llvm/trunk/lib/Target/R600/R600ControlFlowFinalizer.cpp (original)
> >>> +++ llvm/trunk/lib/Target/R600/R600ControlFlowFinalizer.cpp Thu May 23 09:55:00 2013
> >>> @@ -320,7 +320,7 @@ public:
> >>>   virtual bool runOnMachineFunction(MachineFunction &MF) {
> >>>     unsigned MaxStack = 0;
> >>>     unsigned CurrentStack = 0;
> >>> -    bool hasPush;
> >>> +    bool HasPush = false;
> >>>     for (MachineFunction::iterator MB = MF.begin(), ME = MF.end(); MB != ME;
> >>>         ++MB) {
> >>>       MachineBasicBlock &MBB = *MB;
> >>> @@ -349,7 +349,7 @@ public:
> >>>         case AMDGPU::CF_ALU_PUSH_BEFORE:
> >>>           CurrentStack++;
> >>>           MaxStack = std::max(MaxStack, CurrentStack);
> >>> -          hasPush = true;
> >>> +          HasPush = true;
> >>>         case AMDGPU::CF_ALU:
> >>>           I = MI;
> >>>           AluClauses.push_back(MakeALUClause(MBB, I));
> >>> @@ -470,7 +470,7 @@ public:
> >>>           break;
> >>>         }
> >>>       }
> >>> -      MFI->StackSize = getHWStackSize(MaxStack, hasPush);
> >>> +      MFI->StackSize = getHWStackSize(MaxStack, HasPush);
> >>>     }
> >>>
> >>>     return false;
> >>>
> >>>
> >>> _______________________________________________
> >>> llvm-commits mailing list
> >>> llvm-commits at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> 
> _______________________________________________
> 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