[LLVMdev] Proposed SelectionDAGBuilder patch - load serialisation

Steve Montgomery stephen.montgomery3 at btinternet.com
Tue Oct 30 01:33:46 PDT 2012


I posted to llvmdev a few months ago to ask for advice on the best way to avoid the SelectionDAGBuilder from imposing a constraint whereby a volatile load would be serialised relative to all pending loads. The LLVM LRM says that a volatile load only needs to be serialised relative to other volatile loads and, while it may not matter to most targets, the current behaviour of the SelectionDAGBuilder
makes a big difference to the HCS12 target that I've been working on because it prevents selection of efficient instruction sequences in some cases (see postings on llvmdev starting 13 August 2012 for details).

I've never produced a patch before and I'm not yet that familiar with LLVM so please forgive me if that attached patch isn't up to the required standard. If anyone could suggest a neater way of achieving the same effect I'd be happy to rewrite it.

I've also produced a regression test for the MSP430 target, as it's the closest to the HCS12 microcontroller which I'm targetting.

I've run the regression tests with the patch applied and also run the nightly test. Both of them pass.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: loadvolseq_patch
Type: application/octet-stream
Size: 3681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121030/6798ad74/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LoadVolSeq.ll
Type: application/octet-stream
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121030/6798ad74/attachment-0001.obj>


More information about the llvm-dev mailing list