[PATCH] Atomic-IR pass: move out into generic area

Tim Northover t.p.northover at gmail.com
Fri Apr 11 08:53:50 PDT 2014


Hi echristo,

Hi,

I think the atomic expansion pass is now doing nicely in the ARM backend, so I'd like to move towards making it more generally available by putting it somewhere in lib/CodeGen. After this I'll switch ARM64 over in short order, but I can cope with that part on my own as long as the overall design is sound.

This move probably means the code should have stricter requirements on documentation, naming & cleanliness (in particular any layering violations; I wasn't very sure about putting hooks involving IRBuilder into TargetLowering.h), so I'm asking if people can take another look at it.

As part of the move I've added the necessary hooks for it to be executed directly from opt, and some direct IR-level tests.

Does it look good? Does anyone else have any suggestions on where things should go?

Cheers.

Tim.

http://reviews.llvm.org/D3356

Files:
  include/llvm/CodeGen/Passes.h
  include/llvm/InitializePasses.h
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/AtomicExpandLoadLinkedPass.cpp
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/CodeGen.cpp
  lib/Target/ARM/ARM.h
  lib/Target/ARM/ARMAtomicExpandPass.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  lib/Target/ARM/ARMTargetMachine.cpp
  lib/Target/ARM/CMakeLists.txt
  test/Transforms/AtomicExpandLoadLinked/ARM/atomic-expansion-v7.ll
  test/Transforms/AtomicExpandLoadLinked/ARM/atomic-expansion-v8.ll
  test/Transforms/AtomicExpandLoadLinked/ARM/lit.local.cfg
  tools/opt/opt.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3356.1.patch
Type: text/x-patch
Size: 62158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140411/5eddeae2/attachment.bin>


More information about the llvm-commits mailing list