Ping 3: Add a LOAD_SEQUENCE_POINT ISDOpcode

Richard Sandiford rsandifo at linux.vnet.ibm.com
Thu Dec 5 03:07:01 PST 2013


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).

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: serialise-loads.diff
Type: text/x-patch
Size: 25871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131205/b6435c43/attachment.bin>


More information about the llvm-commits mailing list