[FunctionAttrs][ArgumentPromotion][GlobalOpt] Disable some optimisations passes for...
authorLuke Cheeseman <luke.cheeseman@arm.com>
Thu, 22 Feb 2018 14:42:08 +0000 (14:42 +0000)
committerLuke Cheeseman <luke.cheeseman@arm.com>
Thu, 22 Feb 2018 14:42:08 +0000 (14:42 +0000)
commit6c1e6bbe0c609489ef49f9d64f1370a43e05c19c
tree42f8f4b2437344e153ec13ac4fcf82182d1f75ed
parent92b73711138b3d37855fb527a538c85b293f37a7
[FunctionAttrs][ArgumentPromotion][GlobalOpt] Disable some optimisations passes for naked functions

- Fix for bug 36078.
- Prevent the functionattrs, function-attrs, globalopt and argpromotion passes
  from changing naked functions.
- These passes can perform some alterations to the functions that should not be
  applied. An example is removing parameters that are seemingly not used because
  they are only referenced in the inline assembly. Another example is marking
  the function as fastcc.

llvm-svn: 325788
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/ArgumentPromotion/naked_functions.ll [new file with mode: 0644]
llvm/test/Transforms/FunctionAttrs/naked_functions.ll [new file with mode: 0644]
llvm/test/Transforms/GlobalOpt/naked_functions.ll [new file with mode: 0644]