diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2018-08-26 09:51:22 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2018-08-26 09:51:22 +0000 |
commit | 9ae926b973e42633f7bc7db39b33241dbb9f2158 (patch) | |
tree | 032f0dabf8a90e9c14cd3f96b32ec6cc117609e0 /llvm/lib/Analysis/CFLGraph.h | |
parent | d38d9505d1bf380a67bccc6f5a29019394c1fd43 (diff) | |
download | bcm5719-llvm-9ae926b973e42633f7bc7db39b33241dbb9f2158.tar.gz bcm5719-llvm-9ae926b973e42633f7bc7db39b33241dbb9f2158.zip |
[IR] Replace `isa<TerminatorInst>` with `isTerminator()`.
This is a bit awkward in a handful of places where we didn't even have
an instruction and now we have to see if we can build one. But on the
whole, this seems like a win and at worst a reasonable cost for removing
`TerminatorInst`.
All of this is part of the removal of `TerminatorInst` from the
`Instruction` type hierarchy.
llvm-svn: 340701
Diffstat (limited to 'llvm/lib/Analysis/CFLGraph.h')
-rw-r--r-- | llvm/lib/Analysis/CFLGraph.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CFLGraph.h b/llvm/lib/Analysis/CFLGraph.h index 86812009da7..12121d71743 100644 --- a/llvm/lib/Analysis/CFLGraph.h +++ b/llvm/lib/Analysis/CFLGraph.h @@ -594,7 +594,7 @@ template <typename CFLAA> class CFLGraphBuilder { // Determines whether or not we an instruction is useless to us (e.g. // FenceInst) static bool hasUsefulEdges(Instruction *Inst) { - bool IsNonInvokeRetTerminator = isa<TerminatorInst>(Inst) && + bool IsNonInvokeRetTerminator = Inst->isTerminator() && !isa<InvokeInst>(Inst) && !isa<ReturnInst>(Inst); return !isa<CmpInst>(Inst) && !isa<FenceInst>(Inst) && |