[llvm-commits] atomics memoperands patch
Chris Lattner
clattner at apple.com
Fri Jun 20 13:16:19 PDT 2008
>>> ID.AddInteger(LD->getAddressingMode());
>>> ID.AddInteger(LD->getExtensionType());
>>> ID.AddInteger(LD->getMemoryVT().getRawBits());
>>> ID.AddInteger(LD->getAlignment());
>>> ID.AddInteger(LD->isVolatile());
>>> } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
>>> ID.AddInteger(ST->getAddressingMode());
>>> ID.AddInteger(ST->isTruncatingStore());
>>> ID.AddInteger(ST->getMemoryVT().getRawBits());
>>> ID.AddInteger(ST->getAlignment());
>>> ID.AddInteger(ST->isVolatile());
>>> }
>>>
>>> Do we need the if () else if? AddNodeIDNode has already added those
>>> fields to the FoldingSetNodeId.
>>>
>>
>> Looking at the code, it does seem wrong to add the fields twice.
>
> I think so too. Chris?
Yeah you're right, that is bogus. Please make sure that all the
places that are dealing with loads/stores are putting the same number
of values into the folding set though: if this is changed other places
may need changes as well.
Great catch,
-Chris
More information about the llvm-commits
mailing list