[LLVMdev] Use two ComplexPatterns (possible bug of TableGen?)
Brandner
brandner at complang.tuwien.ac.at
Thu Jan 15 23:34:09 PST 2009
Hi Dan,
thank you for applying the patch.
> However, I didn't apply this part:
>
> - if (InstPatNode && InstPatNode->getOperator()->getName() ==
> "set") {
> + if (InstPatNode && !InstPatNode->isLeaf() &&
> + InstPatNode->getOperator()->getName() == "set") {
>
> because I'm unsure what it's for. When is a "set" node a leaf?
exactly it never is, however InstPatNode may well be a leaf. in that case
calling getOperator is not valid, because it asserts on !isLeaf:
Record *getOperator() const { assert(!isLeaf()); return Operator; }
so this check definitely should be there. but it is true, i should have split
the patch into two pieces as it is not related to the ComplexPattern issue.
sorry for that.
florian
More information about the llvm-dev
mailing list