Skip to content

Commit

Permalink
[TargetMachine] Remove DefaultOptions (#66673)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aeubanks authored Sep 18, 2023
1 parent 94b4a98 commit f286141
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion llvm/include/llvm/Target/TargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class TargetMachine {
std::optional<PGOOptions> PGOOption;

public:
const TargetOptions DefaultOptions;
mutable TargetOptions Options;

TargetMachine(const TargetMachine &) = delete;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/TargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TargetMachine::TargetMachine(const Target &T, StringRef DataLayoutString,
: TheTarget(T), DL(DataLayoutString), TargetTriple(TT),
TargetCPU(std::string(CPU)), TargetFS(std::string(FS)), AsmInfo(nullptr),
MRI(nullptr), MII(nullptr), STI(nullptr), RequireStructuredCFG(false),
O0WantsFastISel(false), DefaultOptions(Options), Options(Options) {}
O0WantsFastISel(false), Options(Options) {}

TargetMachine::~TargetMachine() = default;

Expand Down

0 comments on commit f286141

Please sign in to comment.