This patch is part of the work to make LTO and function multi-versioning work correctly.
Currently, -mrestrict-it and -mno-restrict-it have no effect when doing an LTO build because cc1 passes them as backend options.
This patch fixes this bug by defining a new string function attribute "arm-restrict-it" and attaching it to the functions in the IR. This attribute is a tri-state, whose value corresponds to the cl:opt option "IT" n ARMSubtarget:
attribute not attached => DefaultIT ("arm-default-it")
arm-restrict-it=true => RestrictedIT ("arm-restrict-it")
arm-restrict-it=false => NoRestrictedIT ("arm-no-restrict-it")
I plan to send a corresponding llvm patch shortly.