[LLVMdev] Use two ComplexPatterns (possible bug of TableGen?)
Dan Gohman
gohman at apple.com
Fri Jan 16 13:33:40 PST 2009
On Jan 15, 2009, at 11:34 PM, Brandner wrote:
> 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.
Ah, thanks. I applied this portion of the patch now.
Dan
More information about the llvm-dev
mailing list