[llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h TargetOptions.h

Evan Cheng evan.cheng at apple.com
Wed Feb 22 12:19:56 PST 2006



Changes in directory llvm/include/llvm/Target:

TargetMachine.h updated: 1.59 -> 1.60
TargetOptions.h updated: 1.7 -> 1.8
---
Log message:

- Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.


---
Diffs of the changes:  (+17 -6)

 TargetMachine.h |   17 +++++++++++++++++
 TargetOptions.h |    6 ------
 2 files changed, 17 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.59 llvm/include/llvm/Target/TargetMachine.h:1.60
--- llvm/include/llvm/Target/TargetMachine.h:1.59	Mon Nov  7 20:10:16 2005
+++ llvm/include/llvm/Target/TargetMachine.h	Wed Feb 22 14:19:42 2006
@@ -34,6 +34,16 @@
 class Pass;
 class IntrinsicLowering;
 
+// Relocation model types.
+namespace Reloc {
+  enum Model {
+    Default,
+    Static,
+    PIC,
+    DynamicNoPIC
+  };
+}
+
 //===----------------------------------------------------------------------===//
 ///
 /// TargetMachine - Primary interface to the complete machine description for
@@ -135,6 +145,13 @@
   virtual const TargetSchedInfo        *getSchedInfo() const { return 0; }
   virtual const SparcV9RegInfo         *getRegInfo()   const { return 0; }
 
+  /// getRelocationModel - Returns the code generation relocation model. The
+  /// choices are static, PIC, and dynamic-no-pic, and target default.
+  static Reloc::Model getRelocationModel();
+
+  /// setRelocationModel - Sets the code generation relocation model.
+  static void setRelocationModel(Reloc::Model Model);
+
   /// CodeGenFileType - These enums are meant to be passed into
   /// addPassesToEmitFile to indicate what type of file to emit.
   enum CodeGenFileType {


Index: llvm/include/llvm/Target/TargetOptions.h
diff -u llvm/include/llvm/Target/TargetOptions.h:1.7 llvm/include/llvm/Target/TargetOptions.h:1.8
--- llvm/include/llvm/Target/TargetOptions.h:1.7	Fri Feb 17 18:06:03 2006
+++ llvm/include/llvm/Target/TargetOptions.h	Wed Feb 22 14:19:42 2006
@@ -40,12 +40,6 @@
   /// produce results that are "less precise" than IEEE allows.  This includes
   /// use of X86 instructions like FSIN and FCOS instead of libcalls.
   extern bool UnsafeFPMath;
-
-  /// PICEnabled - This flag is enabled when the -enable-pic flag is specified
-  /// on the command line. When this flag is on, the code generator produces
-  /// position independant code.
-  extern bool PICEnabled;
-
 } // End llvm namespace
 
 #endif






More information about the llvm-commits mailing list