Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
that it is cheap and efficient to get.
Move a variety of predicates from TargetInstrInfo into
TargetInstrDescriptor, which makes it much easier to query a predicate
when you don't have TII around. Now you can use MI->getDesc()->isBranch()
instead of going through TII, and this is much more efficient anyway. Not
all of the predicates have been moved over yet.
Update old code that used MI->getInstrDescriptor()->Flags to use the
new predicates in many places.
llvm-svn: 45674
diff --git a/llvm/lib/CodeGen/Collector.cpp b/llvm/lib/CodeGen/Collector.cpp
index 550b52b..36e3fed 100644
--- a/llvm/lib/CodeGen/Collector.cpp
+++ b/llvm/lib/CodeGen/Collector.cpp
@@ -359,7 +359,7 @@
BBE = MF.end(); BBI != BBE; ++BBI)
for (MachineBasicBlock::iterator MI = BBI->begin(),
ME = BBI->end(); MI != ME; ++MI)
- if (TII->isCall(MI->getOpcode()))
+ if (MI->getDesc()->isCall())
VisitCallPoint(*MI);
}