14void ARMFunctionInfo::anchor() {}
18 if (!Subtarget->
isMClass() || !Subtarget->hasV7Ops())
21 if (!
F.hasFnAttribute(
"branch-target-enforcement")) {
22 if (
const auto *BTE = mdconst::extract_or_null<ConstantInt>(
23 F.getParent()->getModuleFlag(
"branch-target-enforcement")))
24 return BTE->getZExtValue();
29 F.getFnAttribute(
"branch-target-enforcement").getValueAsString();
38 if (!
F.hasFnAttribute(
"sign-return-address")) {
39 const Module &M = *
F.getParent();
40 if (
const auto *Sign = mdconst::extract_or_null<ConstantInt>(
41 M.getModuleFlag(
"sign-return-address"))) {
42 if (Sign->getZExtValue()) {
43 if (
const auto *
All = mdconst::extract_or_null<ConstantInt>(
44 M.getModuleFlag(
"sign-return-address-all")))
45 return {
true,
All->getZExtValue()};
49 return {
false,
false};
52 StringRef Scope =
F.getFnAttribute(
"sign-return-address").getValueAsString();
53 if (Scope.equals(
"none"))
54 return {
false,
false};
56 if (Scope.equals(
"all"))
59 assert(Scope.equals(
"non-leaf"));
65 :
isThumb(Subtarget->
isThumb()), hasThumb2(Subtarget->hasThumb2()),
66 IsCmseNSEntry(
F.hasFnAttribute(
"cmse_nonsecure_entry")),
67 IsCmseNSCall(
F.hasFnAttribute(
"cmse_nonsecure_call")),
69 if (Subtarget->
isMClass() && Subtarget->hasV7Ops())
static std::pair< bool, bool > GetSignReturnAddress(const Function &F)
static bool isThumb(const MCSubtargetInfo &STI)
static bool GetBranchTargetEnforcement(const Function &F, const ARMSubtarget *Subtarget)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
ARMFunctionInfo()=default
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
Allocate memory in an ever growing pool, as if by bump-pointer.
Ty * cloneInfo(const Ty &Old)
A Module instance is used to store all the information related to an LLVM module.
StringRef - Represent a constant reference to a string, i.e.
bool equals_insensitive(StringRef RHS) const
Check for string equality, ignoring case.
This is an optimization pass for GlobalISel generic memory operations.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...