remove redundant isa<GlobalValue>
ensure isa<GlobalValue> case is processed before is<Constant>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-07-17 23:36:58 +00:00
parent 1488b34be5
commit 31c0da4483

View File

@ -242,10 +242,12 @@ InstTreeNode<Payload>::InstTreeNode(InstForest<Payload> &IF, Value *V,
this->getTreeData().first.first = V; // Save tree node this->getTreeData().first.first = V; // Save tree node
if (!isa<Instruction>(V)) { if (!isa<Instruction>(V)) {
assert((isa<Constant>(V) || isa<BasicBlock>(V) || assert(isa<Constant>(V) || isa<BasicBlock>(V) || isa<Argument>(V) &&
isa<Argument>(V) || isa<GlobalValue>(V)) &&
"Unrecognized value type for InstForest Partition!"); "Unrecognized value type for InstForest Partition!");
if (isa<Constant>(V)) if (isa<Constant>(V))
if (isa<GlobalValue>(V))
this->getTreeData().first.second = TemporaryNode;
else
this->getTreeData().first.second = ConstNode; this->getTreeData().first.second = ConstNode;
else if (isa<BasicBlock>(V)) else if (isa<BasicBlock>(V))
this->getTreeData().first.second = BasicBlockNode; this->getTreeData().first.second = BasicBlockNode;