]> granicus.if.org Git - llvm/commit
[globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.
authorDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 6 Jan 2017 14:29:34 +0000 (14:29 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 6 Jan 2017 14:29:34 +0000 (14:29 +0000)
commit3390413c33b7822deda8db478c3943d4b58a5a73
tree016dbc2e3f2de6efadcc579e1677ab8a633f197e
parente5088f5e84beaeb7db50d55bc1481545b9abc957
[globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.

Summary:
I've noticed that these assertions don't trigger when the condition is false.
The problem is that the DEBUG(x) macro only executes x when the pass is
emitting debug output via the -debug and -debug-only=registerbankinfo command
line arguments.

Debug builds should always execute the assertions so use '#ifndef NDEBUG' instead.

Also removed an assertion that is only true the first time it's tested. <Target>RegisterBankInfo's constructor will re-use register banks causing them to be valid on subsequent tests. That
assertion will fail on the first test too in the near future.

Reviewers: t.p.northover, ab, rovka, qcolombet

Subscribers: dberris, llvm-commits, kristof.beyls

Differential Revision: https://reviews.llvm.org/D28358

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291235 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/RegisterBankInfo.cpp