diff options
author | JF Bastien <jfb@google.com> | 2015-08-03 15:29:47 +0000 |
---|---|---|
committer | JF Bastien <jfb@google.com> | 2015-08-03 15:29:47 +0000 |
commit | e8aad2998467f0a47ed39041056c62a936f93018 (patch) | |
tree | 7c9276ca471b17e9408861ef88716b8c6ab6656d /llvm/utils/wciia.py | |
parent | fe17cee960edc2f7446097f61a7e4e677444aeb1 (diff) | |
download | bcm5719-llvm-e8aad2998467f0a47ed39041056c62a936f93018.tar.gz bcm5719-llvm-e8aad2998467f0a47ed39041056c62a936f93018.zip |
Refactor AtomicExpand::expandAtomicRMWToCmpXchg into a standalone function.
Summary:
This is useful for PNaCl's `RewriteAtomics` pass. NaCl intrinsics don't exist for some of the more exotic RMW instructions, so by refactoring this function into its own, `RewriteAtomics` can share code rewriting those atomics with `AtomicExpand` while additionally saving a few cycles by generating the `cmpxchg` NaCl-specific intrinsic with the callback. Without this patch, `RewriteAtomics` would require two extra passes over functions, by first requiring use of the full `AtomicExpand` pass to just expand the leftover exotic RMWs and then running itself again to expand resulting `cmpxchg`s.
NFC
Reviewers: jfb
Subscribers: jfb, llvm-commits
Differential Revision: http://reviews.llvm.org/D11422
llvm-svn: 243880
Diffstat (limited to 'llvm/utils/wciia.py')
0 files changed, 0 insertions, 0 deletions