aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/NaCl/StripAttributes.cpp
AgeCommit message (Collapse)Author
2013-11-21keep alignment infoAlon Zakai
2013-07-18More safeguarding of Attr->getKindAsEnum by checking for isEnumAttributeEli Bendersky
first
2013-06-24PNaCl ABI: Strip alignment info from memcpy/memmove/memset intrinsic callsMark Seaborn
Do the same for memcpy/memmove/memset intrinsic calls that we have already done for integer loads and stores: Remove assumptions about pointer alignment by setting the alignment argument to 1. Make the ABI checker require this. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3445 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/17563008
2013-06-20PNaCl ABI: Reduce the set of allowed "align" attributes on loads/storesMark Seaborn
Change the ABI verifier to require "align 1" on non-atomic integer accesses to prevent non-portable behaviour. Allow larger alignments on floating point accesses as a concession to performance, because ARM might not be able to do unaligned FP loads/stores efficiently. Change StripAttributes to make pexes pass the ABI verifier. Also update comments in StripAttributes to match some recent changes. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3445 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/17094009
2013-06-16PNaCl ABI: Disallow non-default symbol visibility ("hidden" and "protected")Mark Seaborn
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3495 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/16903003
2013-06-14PNaCl ABI: Convert "private" linkage to "internal"Mark Seaborn
This simplifies the ABI by reducing the number of linkage types we have to check for and represent in the wire format. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3495 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/17084003
2013-06-13PNaCl: Strip more unwanted attributes: "align" on functions and "unnamed_addr"Mark Seaborn
Do this stripping in the StripAttributes pass. Change the pass to be a ModulePass so that it can modify global variables. Change the ABI verifier to check this. Also update a comment about "nuw" and "nsw". BUG=https://code.google.com/p/nativeclient/issues/detail?id=3415 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/16991002
2013-06-12PNaCl ABI: Strip out arithmetic attributes "nsw", "nuw" and "exact"Mark Seaborn
"nsw" and "nuw" -- "no signed wrap" and "no unsigned wrap" -- are not used by the backend, which is not surprising because it makes no difference to the hardware if arithmetic overflows. Although "exact" is used by the backend to convert "sdiv exact" to an "ashr" shift, it appears that "sdiv exact" does not get used in practice, and arguably such a transformation belongs in the user toolchain, not the PNaCl translator. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3483 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/16746005
2013-06-06PNaCl ABI: Strip out calling conventions from functions and callsMark Seaborn
Always use the standard C calling conventions. Disallow "fastcc" etc. BUG=https://code.google.com/p/nativeclient/issues/detail?id=2346 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/16529004
2013-06-05PNaCl ABI: Strip out attributes on functions and function callsMark Seaborn
Add a pass, StripAttributes, for doing this, and enable it. Add an ABI check to reject these attributes. BUG=https://code.google.com/p/nativeclient/issues/detail?id=2346 BUG=https://code.google.com/p/nativeclient/issues/detail?id=3415 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/16325025