15void ARMFunctionInfo::anchor() {}
31 if (!Subtarget->
isMClass() || !Subtarget->hasV7Ops())
34 if (!
F.hasFnAttribute(
"branch-target-enforcement")) {
35 if (
const auto *BTE = mdconst::extract_or_null<ConstantInt>(
36 F.getParent()->getModuleFlag(
"branch-target-enforcement")))
37 return BTE->getZExtValue();
42 F.getFnAttribute(
"branch-target-enforcement").getValueAsString();
43 assert(BTIEnable ==
"true" || BTIEnable ==
"false");
44 return BTIEnable ==
"true";
50 if (!
F.hasFnAttribute(
"sign-return-address")) {
51 const Module &M = *
F.getParent();
52 if (
const auto *Sign = mdconst::extract_or_null<ConstantInt>(
53 M.getModuleFlag(
"sign-return-address"))) {
54 if (Sign->getZExtValue()) {
55 if (
const auto *
All = mdconst::extract_or_null<ConstantInt>(
56 M.getModuleFlag(
"sign-return-address-all")))
57 return {
true,
All->getZExtValue()};
61 return {
false,
false};
64 StringRef Scope =
F.getFnAttribute(
"sign-return-address").getValueAsString();
66 return {
false,
false};
71 assert(Scope ==
"non-leaf");
77 :
isThumb(Subtarget->
isThumb()), hasThumb2(Subtarget->hasThumb2()),
78 IsCmseNSEntry(
F.hasFnAttribute(
"cmse_nonsecure_entry")),
79 IsCmseNSCall(
F.hasFnAttribute(
"cmse_nonsecure_call")),
81 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)
Module.h This file contains the declarations for the Module class.
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