Go to the documentation of this file.
28 : HasRedZone(MFI.hasRedZone()) {}
44 if (!
F.hasFnAttribute(
"sign-return-address")) {
46 if (
const auto *Sign = mdconst::extract_or_null<ConstantInt>(
47 M.getModuleFlag(
"sign-return-address"))) {
48 if (Sign->getZExtValue()) {
49 if (
const auto *All = mdconst::extract_or_null<ConstantInt>(
50 M.getModuleFlag(
"sign-return-address-all")))
51 return {
true, All->getZExtValue()};
55 return {
false,
false};
58 StringRef Scope =
F.getFnAttribute(
"sign-return-address").getValueAsString();
59 if (
Scope.equals(
"none"))
60 return {
false,
false};
62 if (
Scope.equals(
"all"))
70 if (!
F.hasFnAttribute(
"sign-return-address-key")) {
71 if (
const auto *BKey = mdconst::extract_or_null<ConstantInt>(
72 F.getParent()->getModuleFlag(
"sign-return-address-with-bkey")))
73 return BKey->getZExtValue();
78 F.getFnAttribute(
"sign-return-address-key").getValueAsString();
79 assert(
Key.equals_insensitive(
"a_key") ||
Key.equals_insensitive(
"b_key"));
80 return Key.equals_insensitive(
"b_key");
93 if (!
F.hasFnAttribute(
"branch-target-enforcement")) {
94 if (
const auto *BTE = mdconst::extract_or_null<ConstantInt>(
95 F.getParent()->getModuleFlag(
"branch-target-enforcement")))
96 BranchTargetEnforcement = BTE->getZExtValue();
101 F.getFnAttribute(
"branch-target-enforcement").getValueAsString();
108 if (!SignReturnAddress)
110 if (SignReturnAddressAll)
118 [](
const auto &
Info) { return Info.getReg() == AArch64::LR; }));
122 if (!NeedsDwarfUnwindInfo)
126 return *NeedsDwarfUnwindInfo;
130 if (!NeedsAsyncDwarfUnwindInfo) {
139 return *NeedsAsyncDwarfUnwindInfo;
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
void mappingImpl(yaml::IO &YamlIO) override
constexpr bool hasValue() const
bool shouldSignReturnAddress() const
bool needsAsyncDwarfUnwindInfo() const
Analysis containing CSE Info
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
LLVM_NODISCARD bool equals_insensitive(StringRef RHS) const
Check for string equality, ignoring case.
AArch64FunctionInfo()=default
bool needsDwarfUnwindInfo() const
AArch64FunctionInfo - This class is derived from MachineFunctionInfo and contains private AArch64-spe...
static bool ShouldSignWithBKey(const Function &F)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
A Module instance is used to store all the information related to an LLVM module.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
const MCAsmInfo * getMCAsmInfo() const
Return target specific asm information.
Scope
Defines the scope in which this symbol should be visible: Default – Visible in the public interface o...
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
StringRef - Represent a constant reference to a string, i.e.
Function & getFunction()
Return the LLVM function that this machine code represents.
bool needsFrameMoves() const
True if this function needs frame moves for debug or exceptions.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
void initializeBaseYamlFields(const yaml::AArch64FunctionInfo &YamlMFI)
Optional< bool > HasRedZone
static std::pair< bool, bool > GetSignReturnAddress(const Function &F)
bool usesWindowsCFI() const
@ Async
"Asynchronous" unwind tables (instr precise)