Restore hasPostISelHook tblgen flag.

No functionality change. The hook makes it explicit which patterns
require "special" handling. i.e. it self-documents tblgen
deficiencies. I plan to add verification in ExpandISelPseudos and
Thumb2SizeReduce to catch any missing hasPostISelHooks. Otherwise it's
too fragile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2011-09-20 18:22:31 +00:00
parent f83f0f8246
commit 83a8031336
8 changed files with 28 additions and 9 deletions

View File

@@ -763,7 +763,8 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
}
// Run post-isel target hook to adjust this instruction if needed.
TLI->AdjustInstrPostInstrSelection(MI, Node);
if (II.hasPostISelHook())
TLI->AdjustInstrPostInstrSelection(MI, Node);
}
/// EmitSpecialNode - Generate machine code for a target-independent node and

View File

@@ -179,7 +179,12 @@ TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
void TargetLowering::AdjustInstrPostInstrSelection(MachineInstr *MI,
SDNode *Node) const {
// Do nothing unless the target overrides it.
#ifndef NDEBUG
dbgs() << "If a target marks an instruction with "
"'hasPostISelHook', it must implement "
"TargetLowering::AdjustInstrPostInstrSelection!";
#endif
llvm_unreachable(0);
}
//===----------------------------------------------------------------------===//