Use predicate for Value type test
authorChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:09:28 +0000 (20:09 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:09:28 +0000 (20:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@540 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InstrSched/SchedGraph.cpp
lib/Target/SparcV9/InstrSched/SchedGraph.cpp

index dc0916a224f17a157da22ca878e10cdffd594f97..05109cb8526f79d20159b3a56568da6e134a2e1b 100644 (file)
@@ -482,8 +482,7 @@ SchedGraph::addSSAEdge(SchedGraphNode* node,
                       Value* val,
                       const TargetMachine& target)
 {
-  if (val->getValueType() != Value::InstructionVal)
-    return;
+  if (!val->isInstruction()) return;
 
   const Instruction* thisVMInstr = node->getInstr();
   const Instruction* defVMInstr  = (const Instruction*) val;
index dc0916a224f17a157da22ca878e10cdffd594f97..05109cb8526f79d20159b3a56568da6e134a2e1b 100644 (file)
@@ -482,8 +482,7 @@ SchedGraph::addSSAEdge(SchedGraphNode* node,
                       Value* val,
                       const TargetMachine& target)
 {
-  if (val->getValueType() != Value::InstructionVal)
-    return;
+  if (!val->isInstruction()) return;
 
   const Instruction* thisVMInstr = node->getInstr();
   const Instruction* defVMInstr  = (const Instruction*) val;