summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ErlangGC.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-07-29 18:24:18 +0000
committerSanjay Patel <spatel@rotateright.com>2015-07-29 18:24:18 +0000
commit0f9dcf8b90aaeb0a98dd79eda43e623f4a55231a (patch)
tree602a6e24d840ec7732ba0c6090102127ec9d2a55 /llvm/lib/CodeGen/ErlangGC.cpp
parent4d81f86d976466a38a3bd75365587b7c84f72d41 (diff)
downloadbcm5719-llvm-0f9dcf8b90aaeb0a98dd79eda43e623f4a55231a.tar.gz
bcm5719-llvm-0f9dcf8b90aaeb0a98dd79eda43e623f4a55231a.zip
move DAGCombiner's allowableAlignment() helper function into the TLI
Making allowableAlignment() more accessible was suggested as a predecessor patch for D10662, so I've pulled it into TargetLowering. This let's us remove 4 instances of duplicate logic in LegalizeDAG. There's a subtle functional change in the implementation: the existing allowableAlignment() code was using getPrefTypeAlignment() when checking alignment with the DataLayout and assumed that was fast. In this implementation, we use getABITypeAlignment() and assume that is fast. See the TODO comment or the discussion in the Phab review for future improvements in this implementation (don't use the data layout at all). There are no regression test changes from this difference, and I'm not sure how to expose it via a test. I think we actually do want to provide the 'Fast' param when checking this from DAGCombiner::MergeConsecutiveStores(). Ie, we shouldn't merge stores if the new stores are not going to be fast. But that change will require fixing allowsMisalignedMemoryAccess() overrides as noted in D10662. Differential Revision: http://reviews.llvm.org/D10905 llvm-svn: 243549
Diffstat (limited to 'llvm/lib/CodeGen/ErlangGC.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud