[llvm] f286141 - [TargetMachine] Remove DefaultOptions (#66673)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 12:36:55 PDT 2023


Author: Arthur Eubanks
Date: 2023-09-18T12:36:50-07:00
New Revision: f286141149f8912e145d64f04e77aed86fd22d36

URL: https://github.com/llvm/llvm-project/commit/f286141149f8912e145d64f04e77aed86fd22d36
DIFF: https://github.com/llvm/llvm-project/commit/f286141149f8912e145d64f04e77aed86fd22d36.diff

LOG: [TargetMachine] Remove DefaultOptions (#66673)

7d81813d 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 c378e52c explicitly set
those attributes if they were missing and removed the use of
DefaultOptions.

Added: 
    

Modified: 
    llvm/include/llvm/Target/TargetMachine.h
    llvm/lib/Target/TargetMachine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index f3fcb22ddefb1d8..c1d05b25ea21f8a 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -116,7 +116,6 @@ class TargetMachine {
   std::optional<PGOOptions> PGOOption;
 
 public:
-  const TargetOptions DefaultOptions;
   mutable TargetOptions Options;
 
   TargetMachine(const TargetMachine &) = delete;

diff  --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 2119167deaed484..a20c6847c6c590b 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -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;
 


        


More information about the llvm-commits mailing list