diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
commit | 145449b1e420787bb99721a429341fa6be3adfb6 (patch) | |
tree | 1d56ae694a6de602e348dd80165cf881a36600ed /llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | |
parent | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff) | |
download | src-145449b1e420787bb99721a429341fa6be3adfb6.tar.gz src-145449b1e420787bb99721a429341fa6be3adfb6.zip |
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index 989a98571434..0b4a95bc9ce5 100644 --- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -152,33 +152,38 @@ using namespace llvm; static cl::opt<bool> DisableDeallocRet("disable-hexagon-dealloc-ret", cl::Hidden, cl::desc("Disable Dealloc Return for Hexagon target")); -static cl::opt<unsigned> NumberScavengerSlots("number-scavenger-slots", - cl::Hidden, cl::desc("Set the number of scavenger slots"), cl::init(2), - cl::ZeroOrMore); - -static cl::opt<int> SpillFuncThreshold("spill-func-threshold", - cl::Hidden, cl::desc("Specify O2(not Os) spill func threshold"), - cl::init(6), cl::ZeroOrMore); - -static cl::opt<int> SpillFuncThresholdOs("spill-func-threshold-Os", - cl::Hidden, cl::desc("Specify Os spill func threshold"), - cl::init(1), cl::ZeroOrMore); - -static cl::opt<bool> EnableStackOVFSanitizer("enable-stackovf-sanitizer", - cl::Hidden, cl::desc("Enable runtime checks for stack overflow."), - cl::init(false), cl::ZeroOrMore); - -static cl::opt<bool> EnableShrinkWrapping("hexagon-shrink-frame", - cl::init(true), cl::Hidden, cl::ZeroOrMore, - cl::desc("Enable stack frame shrink wrapping")); - -static cl::opt<unsigned> ShrinkLimit("shrink-frame-limit", - cl::init(std::numeric_limits<unsigned>::max()), cl::Hidden, cl::ZeroOrMore, - cl::desc("Max count of stack frame shrink-wraps")); - -static cl::opt<bool> EnableSaveRestoreLong("enable-save-restore-long", - cl::Hidden, cl::desc("Enable long calls for save-restore stubs."), - cl::init(false), cl::ZeroOrMore); +static cl::opt<unsigned> + NumberScavengerSlots("number-scavenger-slots", cl::Hidden, + cl::desc("Set the number of scavenger slots"), + cl::init(2)); + +static cl::opt<int> + SpillFuncThreshold("spill-func-threshold", cl::Hidden, + cl::desc("Specify O2(not Os) spill func threshold"), + cl::init(6)); + +static cl::opt<int> + SpillFuncThresholdOs("spill-func-threshold-Os", cl::Hidden, + cl::desc("Specify Os spill func threshold"), + cl::init(1)); + +static cl::opt<bool> EnableStackOVFSanitizer( + "enable-stackovf-sanitizer", cl::Hidden, + cl::desc("Enable runtime checks for stack overflow."), cl::init(false)); + +static cl::opt<bool> + EnableShrinkWrapping("hexagon-shrink-frame", cl::init(true), cl::Hidden, + cl::desc("Enable stack frame shrink wrapping")); + +static cl::opt<unsigned> + ShrinkLimit("shrink-frame-limit", + cl::init(std::numeric_limits<unsigned>::max()), cl::Hidden, + cl::desc("Max count of stack frame shrink-wraps")); + +static cl::opt<bool> + EnableSaveRestoreLong("enable-save-restore-long", cl::Hidden, + cl::desc("Enable long calls for save-restore stubs."), + cl::init(false)); static cl::opt<bool> EliminateFramePointer("hexagon-fp-elim", cl::init(true), cl::Hidden, cl::desc("Refrain from using FP whenever possible")); @@ -1018,7 +1023,7 @@ findCFILocation(MachineBasicBlock &B) { void HexagonFrameLowering::insertCFIInstructions(MachineFunction &MF) const { for (auto &B : MF) { auto At = findCFILocation(B); - if (At.hasValue()) + if (At) insertCFIInstructionsAt(B, At.getValue()); } } |