Add a new option to indicate we want the code generator to emit code quickly,not...
authorChris Lattner <sabre@nondot.org>
Tue, 8 Nov 2005 02:11:51 +0000 (02:11 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 8 Nov 2005 02:11:51 +0000 (02:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24233 91177308-0d34-0410-b5e6-96231b3b80d8

17 files changed:
lib/Target/Alpha/AlphaTargetMachine.cpp
lib/Target/Alpha/AlphaTargetMachine.h
lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/CTargetMachine.h
lib/Target/CBackend/Writer.cpp
lib/Target/IA64/IA64TargetMachine.cpp
lib/Target/IA64/IA64TargetMachine.h
lib/Target/Skeleton/SkeletonTargetMachine.cpp
lib/Target/Skeleton/SkeletonTargetMachine.h
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/Sparc/SparcTargetMachine.h
lib/Target/SparcV8/SparcV8TargetMachine.cpp
lib/Target/SparcV8/SparcV8TargetMachine.h
lib/Target/SparcV9/SparcV9TargetMachine.cpp
lib/Target/SparcV9/SparcV9TargetMachine.h
lib/Target/X86/X86TargetMachine.cpp
lib/Target/X86/X86TargetMachine.h

index da113e90758628f87ebae7cc0825d2f567e7050f..f5bd484b0cfb869949d558bfd91a168174b56b19 100644 (file)
@@ -77,7 +77,8 @@ AlphaTargetMachine::AlphaTargetMachine(const Module &M, IntrinsicLowering *IL,
 ///
 bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
                                              std::ostream &Out,
-                                             CodeGenFileType FileType) {
+                                             CodeGenFileType FileType,
+                                             bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   if (EnableAlphaLSR) {
index cc30bba6e3358bdcad12356f0620a99c6a5c31cb..20ae44c7e156258bddfd35f09f7020a93d0c0983 100644 (file)
@@ -48,17 +48,11 @@ public:
 
   static unsigned getJITMatchQuality();
 
-  /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
-  /// get machine code emitted.  This uses a MachineCodeEmitter object to handle
-  /// actually outputting the machine code and resolving things like the address
-  /// of functions.  This method should returns true if machine code emission is
-  /// not supported.
-  ///
   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE);
 
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
 
   static unsigned getModuleMatchQuality(const Module &M);
 };
index 7d0c21ab0c3e4e2a63f037fbd78f6c10d363e86b..0bcb9231b20477806a8c4785357776bfebcec276 100644 (file)
@@ -1725,7 +1725,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
 //===----------------------------------------------------------------------===//
 
 bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o,
-                                         CodeGenFileType FileType) {
+                                         CodeGenFileType FileType, bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   PM.add(createLowerGCPass());
index 580e02e72686e77be4674cbb044816ad4a713f9d..f5894aab83c6715cf1114511ba5acea23eab1eab 100644 (file)
@@ -26,7 +26,7 @@ struct CTargetMachine : public TargetMachine {
 
   // This is the only thing that actually does anything here.
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
 
   // This class always works, but shouldn't be the default in most cases.
   static unsigned getModuleMatchQuality(const Module &M) { return 1; }
index 7d0c21ab0c3e4e2a63f037fbd78f6c10d363e86b..0bcb9231b20477806a8c4785357776bfebcec276 100644 (file)
@@ -1725,7 +1725,7 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
 //===----------------------------------------------------------------------===//
 
 bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o,
-                                         CodeGenFileType FileType) {
+                                         CodeGenFileType FileType, bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   PM.add(createLowerGCPass());
index f62253db7b5dc8ba1f6bc451af65373e426892ee..f0c429adea1863518e63e9dacd827eadf48a15d3 100644 (file)
@@ -85,7 +85,8 @@ IA64TargetMachine::IA64TargetMachine(const Module &M, IntrinsicLowering *IL,
 // does to emit statically compiled machine code.
 bool IA64TargetMachine::addPassesToEmitFile(PassManager &PM,
                                             std::ostream &Out,
-                                                CodeGenFileType FileType) {
+                                            CodeGenFileType FileType,
+                                            bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
index df6e4dfbaa1e8bc834a58438f6b5be7275bc021f..127bdf1468ecc9e35d1ce24d209362c9955c6ebb 100644 (file)
@@ -37,7 +37,7 @@ public:
   }
 
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
 
   static unsigned getModuleMatchQuality(const Module &M);
   static unsigned compileTimeMatchQuality(void);
index df27b77010fff7cdf9f31a1c74d9140bf4ee3d0a..f4b67290e7bce1fb2d97c0deff598af67fac9138 100644 (file)
@@ -40,7 +40,8 @@ SkeletonTargetMachine::SkeletonTargetMachine(const Module &M,
 ///
 bool SkeletonTargetMachine::addPassesToEmitFile(PassManager &PM,
                                                 std::ostream &Out,
-                                                CodeGenFileType FileType) {
+                                                CodeGenFileType FileType,
+                                                bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
   // <insert instruction selector passes here>
   PM.add(createRegisterAllocator());
index 0607b6f943c94c9e56f311eb0c75bd5c1e825e04..567dc958d91ca58048626fcd2367713e7056bb5a 100644 (file)
@@ -44,7 +44,7 @@ namespace llvm {
                                             MachineCodeEmitter &MCE);
 
     virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                     CodeGenFileType FileType);
+                                     CodeGenFileType FileType, bool Fast);
   };
 
 } // end namespace llvm
index d2587be48fbc288717239d36aa0f1b205fa43c1f..d2c72650ff0af7e6c4bf066739add61bd44c5cc0 100644 (file)
@@ -65,7 +65,8 @@ unsigned SparcV8TargetMachine::getModuleMatchQuality(const Module &M) {
 ///
 bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
                                                std::ostream &Out,
-                                               CodeGenFileType FileType) {
+                                               CodeGenFileType FileType,
+                                               bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
index 3ec07a3ffbcc0ea38ceb34e3e2cd218db91dbbf6..d0dfa4e94316795a4010bcaf310e943c66d66b31 100644 (file)
@@ -45,17 +45,11 @@ public:
   static unsigned getModuleMatchQuality(const Module &M);
   static unsigned getJITMatchQuality();
 
-  /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
-  /// get machine code emitted.  This uses a MachineCodeEmitter object to handle
-  /// actually outputting the machine code and resolving things like the address
-  /// of functions.  This method should returns true if machine code emission is
-  /// not supported.
-  ///
   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE);
 
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
 };
 
 } // end namespace llvm
index d2587be48fbc288717239d36aa0f1b205fa43c1f..d2c72650ff0af7e6c4bf066739add61bd44c5cc0 100644 (file)
@@ -65,7 +65,8 @@ unsigned SparcV8TargetMachine::getModuleMatchQuality(const Module &M) {
 ///
 bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
                                                std::ostream &Out,
-                                               CodeGenFileType FileType) {
+                                               CodeGenFileType FileType,
+                                               bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
index 3ec07a3ffbcc0ea38ceb34e3e2cd218db91dbbf6..d0dfa4e94316795a4010bcaf310e943c66d66b31 100644 (file)
@@ -45,17 +45,11 @@ public:
   static unsigned getModuleMatchQuality(const Module &M);
   static unsigned getJITMatchQuality();
 
-  /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
-  /// get machine code emitted.  This uses a MachineCodeEmitter object to handle
-  /// actually outputting the machine code and resolving things like the address
-  /// of functions.  This method should returns true if machine code emission is
-  /// not supported.
-  ///
   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE);
 
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
 };
 
 } // end namespace llvm
index 5cf46e0cea9511b2d09cd3356ec0084fdcc4e634..0748018682d345aa572385362ab5d699ba40a49b 100644 (file)
@@ -162,7 +162,8 @@ SparcV9TargetMachine::SparcV9TargetMachine(const Module &M,
 ///
 bool
 SparcV9TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                                CodeGenFileType FileType) {
+                                          CodeGenFileType FileType,
+                                          bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
index 9f40339256a820f0a17ab67ae57d258f397f1a37..1f832825b2a45a799a9652f38a321fe9af3b3cad 100644 (file)
@@ -45,7 +45,7 @@ public:
   }
 
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE);
 
index 29ff15f767b32756ba9aa411462b5eca20fd1271..3d33cc28701bf06e800f9f68d19e1161d28b33e8 100644 (file)
@@ -106,7 +106,8 @@ X86TargetMachine::X86TargetMachine(const Module &M,
 // addPassesToEmitFile - We currently use all of the same passes as the JIT
 // does to emit statically compiled machine code.
 bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                           CodeGenFileType FileType) {
+                                           CodeGenFileType FileType,
+                                           bool Fast) {
   if (FileType != TargetMachine::AssemblyFile &&
       FileType != TargetMachine::ObjectFile) return true;
 
index 333d6554cbe268bed4bc279c65d79baf51d2f3ed..10f012a999187e951270c496787d2793a1aa670a 100644 (file)
@@ -41,17 +41,11 @@ public:
     return &InstrInfo.getRegisterInfo();
   }
 
-  /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
-  /// get machine code emitted.  This uses a MachineCodeEmitter object to handle
-  /// actually outputting the machine code and resolving things like the address
-  /// of functions.  This method should returns true if machine code emission is
-  /// not supported.
-  ///
   virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                           MachineCodeEmitter &MCE);
 
   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
-                                   CodeGenFileType FileType);
+                                   CodeGenFileType FileType, bool Fast);
 
   static unsigned getModuleMatchQuality(const Module &M);
   static unsigned getJITMatchQuality();