[llvm] r218458 - SelectionDAG: Remove #if NDEBUG from check for a post-isel hook
Tom Stellard
thomas.stellard at amd.com
Thu Sep 25 11:59:22 PDT 2014
Author: tstellar
Date: Thu Sep 25 13:59:22 2014
New Revision: 218458
URL: http://llvm.org/viewvc/llvm-project?rev=218458&view=rev
Log:
SelectionDAG: Remove #if NDEBUG from check for a post-isel hook
The InstrEmitter will skip the check of MI.hasPostISelHook()
before calling AdjustInstrPostInstrSelection() when NDEBUG
is not defined.
This was added in r140228, and I'm not sure if it is intentional or not,
but it is a likely source for bugs, because it means with
Release+Asserts builds you can forget to set the hasPostISelHook
flag on TableGen definitions and AdjustInstrPostInstrSelection() will
still be called.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp?rev=218458&r1=218457&r2=218458&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Thu Sep 25 13:59:22 2014
@@ -865,9 +865,7 @@ EmitMachineNode(SDNode *Node, bool IsClo
MIB->setPhysRegsDeadExcept(UsedRegs, *TRI);
// Run post-isel target hook to adjust this instruction if needed.
-#ifdef NDEBUG
if (II.hasPostISelHook())
-#endif
TLI->AdjustInstrPostInstrSelection(MIB, Node);
}
More information about the llvm-commits
mailing list