aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection/InstrForest.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
committerChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
commitb00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace (patch)
tree44b5f879c16e7ecb2e9334ad120e3454270e1bb3 /lib/CodeGen/InstrSelection/InstrForest.cpp
parent1d87bcf4909b06dcd86320722653341f08b8b396 (diff)
Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrForest.cpp')
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index f5a524707b..199ed6569b 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -26,6 +26,7 @@
#include "llvm/Method.h"
#include "llvm/iTerminators.h"
#include "llvm/iMemory.h"
+#include "llvm/iOther.h"
#include "llvm/ConstPoolVals.h"
#include "llvm/BasicBlock.h"
#include "llvm/CodeGen/MachineInstr.h"
@@ -57,11 +58,11 @@ InstructionNode::InstructionNode(Instruction* I)
// Distinguish special cases of some instructions such as Ret and Br
//
- if (opLabel == Instruction::Ret && ((ReturnInst*)I)->getReturnValue())
+ if (opLabel == Instruction::Ret && cast<ReturnInst>(I)->getReturnValue())
{
opLabel = RetValueOp; // ret(value) operation
}
- else if (opLabel == Instruction::Br && ! ((BranchInst*)I)->isUnconditional())
+ else if (opLabel ==Instruction::Br && !cast<BranchInst>(I)->isUnconditional())
{
opLabel = BrCondOp; // br(cond) operation
}
@@ -302,7 +303,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
InstrTreeNode* opTreeNode;
if (isa<Instruction>(operand) && operand->use_size() == 1 &&
cast<Instruction>(operand)->getParent() == instr->getParent() &&
- ! instr->isPHINode() &&
+ !isa<PHINode>(instr) &&
instr->getOpcode() != Instruction::Call)
{
// Recursively create a treeNode for it.