[llvm-commits] atomics memoperands patch
Evan Cheng
evan.cheng at apple.com
Tue Jun 24 18:37:22 PDT 2008
On Jun 20, 2008, at 1:16 PM, Chris Lattner wrote:
>>>> 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.
Actually these are needed. AddNodeIDNode(ID, N->getOpcode(), N-
>getVTList(), Ops, NumOps); only add opcode, vtlist and operands to
CSE id.
Evan
>
>
> Great catch,
>
> -Chris
>
More information about the llvm-commits
mailing list