[FunctionAttrs] Provide a mechanism for adding function attributes from the command...
authorJames Molloy <james.molloy@arm.com>
Thu, 19 Nov 2015 08:49:57 +0000 (08:49 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 19 Nov 2015 08:49:57 +0000 (08:49 +0000)
commite30d17a4d7fdf844cb3fbf95e61b0eef8ff5dc7e
treed6fb95862968d72ff2c358de7076c46c053eddec
parente20dfebf8715a249c330b289740d4882d1396ae9
[FunctionAttrs] Provide a mechanism for adding function attributes from the command line

This provides a way to force a function to have certain attributes from the command line. This can be useful when debugging or doing workload exploration, where manually editing IR is tedious or not possible (due to build systems etc).

The syntax is -force-attribute=function_name:attribute_name

All function attributes are parsed except alignstack as it requires an argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253550 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/FunctionAttrs.cpp
test/Transforms/FunctionAttrs/forced.ll [new file with mode: 0644]