14void ARMFunctionInfo::anchor() {}
30 if (!Subtarget->
isMClass() || !Subtarget->hasV7Ops())
33 if (!
F.hasFnAttribute(
"branch-target-enforcement")) {
34 if (
const auto *BTE = mdconst::extract_or_null<ConstantInt>(
35 F.getParent()->getModuleFlag(
"branch-target-enforcement")))
36 return BTE->getZExtValue();
41 F.getFnAttribute(
"branch-target-enforcement").getValueAsString();
42 assert(BTIEnable ==
"true" || BTIEnable ==
"false");
43 return BTIEnable ==
"true";
49 if (!
F.hasFnAttribute(
"sign-return-address")) {
50 const Module &M = *
F.getParent();
51 if (
const auto *Sign = mdconst::extract_or_null<ConstantInt>(
52 M.getModuleFlag(
"sign-return-address"))) {
53 if (Sign->getZExtValue()) {
54 if (
const auto *
All = mdconst::extract_or_null<ConstantInt>(
55 M.getModuleFlag(
"sign-return-address-all")))
56 return {
true,
All->getZExtValue()};
60 return {
false,
false};
63 StringRef Scope =
F.getFnAttribute(
"sign-return-address").getValueAsString();
64 if (Scope.equals(
"none"))
65 return {
false,
false};
67 if (Scope.equals(
"all"))
70 assert(Scope.equals(
"non-leaf"));
76 :
isThumb(Subtarget->
isThumb()), hasThumb2(Subtarget->hasThumb2()),
77 IsCmseNSEntry(
F.hasFnAttribute(
"cmse_nonsecure_entry")),
78 IsCmseNSCall(
F.hasFnAttribute(
"cmse_nonsecure_call")),
80 if (Subtarget->
isMClass() && Subtarget->hasV7Ops())
static std::pair< bool, bool > GetSignReturnAddress(const Function &F)
static bool isLRSpilled(const MachineFunction &MF)
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...
void initializeBaseYamlFields(const yaml::ARMFunctionInfo &YamlMFI)
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.
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...
void mappingImpl(yaml::IO &YamlIO) override
ARMFunctionInfo()=default