Skip to content

Commit b69aa2e

Browse files
aeubankszahiraam
authored andcommitted
[TargetMachine] Remove DefaultOptions (llvm#66673)
7d81813 says that this was used because functions missing certain attributes (e.g. fast math) would inherit behavior from previous functions with those attributes. However, later c378e52 explicitly set those attributes if they were missing and removed the use of DefaultOptions.
1 parent fb716bf commit b69aa2e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

llvm/include/llvm/Target/TargetMachine.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ class TargetMachine {
116116
std::optional<PGOOptions> PGOOption;
117117

118118
public:
119-
const TargetOptions DefaultOptions;
120119
mutable TargetOptions Options;
121120

122121
TargetMachine(const TargetMachine &) = delete;

llvm/lib/Target/TargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ TargetMachine::TargetMachine(const Target &T, StringRef DataLayoutString,
3535
: TheTarget(T), DL(DataLayoutString), TargetTriple(TT),
3636
TargetCPU(std::string(CPU)), TargetFS(std::string(FS)), AsmInfo(nullptr),
3737
MRI(nullptr), MII(nullptr), STI(nullptr), RequireStructuredCFG(false),
38-
O0WantsFastISel(false), DefaultOptions(Options), Options(Options) {}
38+
O0WantsFastISel(false), Options(Options) {}
3939

4040
TargetMachine::~TargetMachine() = default;
4141

0 commit comments

Comments
 (0)