[llvm-commits] [llvm] r84327 - /llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
Daniel Dunbar
daniel at zuster.org
Mon Oct 19 05:22:37 PDT 2009
On Sun, Oct 18, 2009 at 8:36 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>
> On Oct 17, 2009, at 10:44 AM, Chris Lattner wrote:
>
>>
>> On Oct 17, 2009, at 2:33 AM, Daniel Dunbar wrote:
>>
>>> Author: ddunbar
>>> Date: Sat Oct 17 04:33:00 2009
>>> New Revision: 84327
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=84327&view=rev
>>> Log:
>>> Suppress -Asserts warning.
>>
>> Despite the name, I think that AnalyzeBranch does mutate the code in
>> some cases on some targets. Is this true?
>>
>
> Not in this case since AllowModify is false.
>
> virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
> MachineBasicBlock *&FBB,
> SmallVectorImpl<MachineOperand> &Cond,
> bool AllowModify = false) const {
Ok. Please put it back inside the assert if it doesn't do anything
else and you don't want it called in a -Asserts build, I just wanted
the build warning to go away.
- Daniel
> Evan
>
>> -Chris
>>
>>>
>>> Modified:
>>> llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
>>>
>>> Modified: llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp?rev=84327&r1=84326&r2=84327&view=diff
>>>
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> ======================================================================
>>> --- llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/CodePlacementOpt.cpp Sat Oct 17 04:33:00
>>> 2009
>>> @@ -153,8 +153,8 @@
>>>
>>> MachineBasicBlock *TBB = 0, *FBB = 0;
>>> SmallVector<MachineOperand, 4> Cond;
>>> - bool B = TII->AnalyzeBranch(*MBB, TBB, FBB, Cond);
>>> - assert(!B && "UpdateTerminators requires analyzable
>>> predecessors!");
>>> + assert(!TII->AnalyzeBranch(*MBB, TBB, FBB, Cond) &&
>>> + "UpdateTerminators requires analyzable predecessors!");
>>> if (Cond.empty()) {
>>> if (TBB) {
>>> // The block has an unconditional branch. If its successor is
>>> now
>>>
>>>
>>> _______________________________________________
>>> 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