LLVM 24.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
18using namespace llvm;
19
20/// DisableFramePointerElim - This returns true if frame pointer elimination
21/// optimization should be disabled for the given machine function.
24 switch (FP) {
26 return true;
29 return MF.getFrameInfo().hasCalls();
32 return false;
33 }
34 llvm_unreachable("unknown frame pointer flag");
35}
36
39 switch (FP) {
43 return true;
45 return MF.getFrameInfo().hasCalls();
47 return false;
48 }
49 llvm_unreachable("unknown frame pointer flag");
50}
51
52/// HonorSignDependentRoundingFPMath - Return true if the codegen must assume
53/// that the rounding mode of the FPU can change from its default.
57
58/// NOTE: There are targets that still do not support the debug entry values
59/// production and that is being controlled with the SupportsDebugEntryValues.
60/// In addition, SCE debugger does not have the feature implemented, so prefer
61/// not to emit the debug entry values in that case.
62/// 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:185
@ SCE
Tune debug info for SCE targets (e.g. PS4).