Ping 3: Add a LOAD_SEQUENCE_POINT ISDOpcode

Evan Cheng evan.cheng at apple.com
Thu Dec 5 13:31:25 PST 2013


On Dec 5, 2013, at 3:07 AM, Richard Sandiford <rsandifo at linux.vnet.ibm.com> wrote:

> Hi Evan,
> 
> Thanks for the review.
> 
> Evan Cheng <evan.cheng at apple.com> writes:
>> I'm not very comfortable with adding a generic opcode. Can't you use a
>> target specific intrinsic?
> 
> If the opcode's out, is it still OK to have a TargetLowering hook that
> gets called before atomic and volatile loads, as in the patch below?
> This replaces the getInsertLoadSequencePoints() function from the first
> patch but should be a bit more general (and hopefully a bit more intuitive,
> since it's named after the situations in which it's used).

Ideally I'd like to see the code for dealing with these loads in the target specific isel lowering code. Until we have other targets needing similar features, it's a bit difficult to understand whether a opcode and / or target hooks are needed. Do you think that's possible?

If not, then target hook might be acceptable. But I haven't had the time to think this through or review your patch fully.

Thanks,

Evan

> 
> Or do you mean that I shouldn't touch SelectionDAGBuilder and do this
> at the IR level instead?  I.e. by walking the IR looking for volatile
> and atomic loads and inserting a special call before them?  I can do that
> if you like, but I just thought doing it in SelectionDAGBuilder was
> consistent with the similar ATOMIC_FENCE case.
> 
> Thanks,
> Richard
> 
> <serialise-loads.diff>




More information about the llvm-commits mailing list