LLVM 23.0.0git
TargetOptionsImpl.cpp
Go to the documentation of this file.
1//===-- TargetOptionsImpl.cpp - Options that apply to all targets ----------==//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file implements the methods in the TargetOptions.
10//
11//===----------------------------------------------------------------------===//
12
17#include "llvm/IR/Function.h"
19using namespace llvm;
20
21/// DisableFramePointerElim - This returns true if frame pointer elimination
22/// optimization should be disabled for the given machine function.
25 switch (FP) {
27 return true;
30 return MF.getFrameInfo().hasCalls();
33 return false;
34 }
35 llvm_unreachable("unknown frame pointer flag");
36}
37
40 switch (FP) {
44 return true;
46 return MF.getFrameInfo().hasCalls();
48 return false;
49 }
50 llvm_unreachable("unknown frame pointer flag");
51}
52
53/// HonorSignDependentRoundingFPMath - Return true if the codegen must assume
54/// that the rounding mode of the FPU can change from its default.
58
59/// NOTE: There are targets that still do not support the debug entry values
60/// production and that is being controlled with the SupportsDebugEntryValues.
61/// In addition, SCE debugger does not have the feature implemented, so prefer
62/// not to emit the debug entry values in that case.
63/// The EnableDebugEntryValues can be used for the testing purposes.
bool hasCalls() const
Return true if the current function has any function calls.
FramePointerKind getFramePointerPolicy() const
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
LLVM_ABI bool HonorSignDependentRoundingFPMath() const
HonorSignDependentRoundingFPMath - Return true if the codegen must assume that the rounding mode of t...
unsigned SupportsDebugEntryValues
Set if the target supports the debug entry values by default.
unsigned HonorSignDependentRoundingFPMathOption
HonorSignDependentRoundingFPMath - This returns true when the -enable-sign-dependent-rounding-fp-math...
DebuggerKind DebuggerTuning
Which debugger to tune for.
LLVM_ABI bool FramePointerIsReserved(const MachineFunction &MF) const
FramePointerIsReserved - This returns true if the frame pointer must always either point to a new fra...
LLVM_ABI bool DisableFramePointerElim(const MachineFunction &MF) const
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...
unsigned EnableDebugEntryValues
When set to true, the EnableDebugEntryValues option forces production of debug entry values even if t...
LLVM_ABI bool ShouldEmitDebugEntryValues() const
NOTE: There are targets that still do not support the debug entry values production.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
FramePointerKind
Definition CodeGen.h:118
@ SCE
Tune debug info for SCE targets (e.g. PS4).