aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-09-07 23:54:24 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-09-07 23:54:24 +0000
commit52a31bf268126442540e7c0846f51061e98f4867 (patch)
tree5f79a974c6c16160816b6503afd7cb9b0a49bd89 /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
parentd63ac339483a4af48a2a3f445e442a4be1302c3d (diff)
downloadllvm-52a31bf268126442540e7c0846f51061e98f4867.zip
llvm-52a31bf268126442540e7c0846f51061e98f4867.tar.gz
llvm-52a31bf268126442540e7c0846f51061e98f4867.tar.bz2
[x86] Extend the manual ISel of `add` and `sub` with both RMW memory
operands and used flags to support matching immediate operands. This is a bit trickier than register operands, and we still want to fall back on a register operands even for things that appear to be "immediates" when they won't actually select into the operation's immediate operand. This also requires us to handle things like selecting `sub` vs. `add` to minimize the number of bits needed to represent the immediate, and picking the shortest immediate encoding. In order to that, we in turn need to scan to make sure that CF isn't used as it will get inverted. The end result seems very nice though, and we're now generating optimal instruction sequences for these patterns IMO. A follow-up patch will further expand this to other operations with RMW memory operands. But handing `add` and `sub` are useful starting points to flesh out the machinery and make sure interesting and complex cases can be handled. Thanks to Craig Topper who provided a few fixes and improvements to this patch in addition to the review! Differential Revision: https://reviews.llvm.org/D37139 llvm-svn: 312764
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
0 files changed, 0 insertions, 0 deletions