[llvm-commits] [llvm] r63328 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Chris Lattner clattner at apple.com
Thu Jan 29 15:31:35 PST 2009


On Jan 29, 2009, at 1:38 PM, Bill Wendling wrote:

> On Thu, Jan 29, 2009 at 11:49 AM, Dan Gohman <gohman at apple.com> wrote:
>> Author: djg
>> Date: Thu Jan 29 13:49:27 2009
>> New Revision: 63328
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=63328&view=rev
>> Log:
>> Make a few things const, fix some comments, and simplify
>> some assertions.
>>
>> -
>> -  if (SU->isSucc(OldSU)) {
>> -    assert(false && "Something is wrong!");
>> -    abort();
>> -  }
>> +  assert(!SU->isSucc(OldSU) && "Something is wrong!");
>>
> Are you sure you want to get rid of the "abort()" calls? If assertions
> are turned off, then the aborts would cause an ICE in this case, which
> might have been the original purpose...

I strongly prefer the new code.  assertions "can never fire", so it is  
the right thing to do.

-Chris



More information about the llvm-commits mailing list