[llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.h lli.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 24 14:52:30 PDT 2003


Changes in directory llvm/tools/lli:

ExecutionEngine.h updated: 1.7 -> 1.8
lli.cpp updated: 1.20 -> 1.21

---
Log message:

Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags


---
Diffs of the changes:

Index: llvm/tools/lli/ExecutionEngine.h
diff -u llvm/tools/lli/ExecutionEngine.h:1.7 llvm/tools/lli/ExecutionEngine.h:1.8
--- llvm/tools/lli/ExecutionEngine.h:1.7	Thu Aug 21 16:12:26 2003
+++ llvm/tools/lli/ExecutionEngine.h	Sun Aug 24 14:50:50 2003
@@ -51,12 +51,12 @@
   /// createJIT - Create an return a new JIT compiler if there is one available
   /// for the current target.  Otherwise it returns null.
   ///
-  static ExecutionEngine *createJIT(Module *M, unsigned Config);
+  static ExecutionEngine *createJIT(Module *M);
 
   /// createInterpreter - Create a new interpreter object.  This can never fail.
   ///
-  static ExecutionEngine *createInterpreter(Module *M, unsigned Config,
-					    bool DebugMode, bool TraceMode);
+  static ExecutionEngine *createInterpreter(Module *M, bool DebugMode,
+                                            bool TraceMode);
 
   void addGlobalMapping(const Function *F, void *Addr) {
     void *&CurVal = GlobalAddress[(const GlobalValue*)F];


Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.20 llvm/tools/lli/lli.cpp:1.21
--- llvm/tools/lli/lli.cpp:1.20	Sun Aug 24 09:02:43 2003
+++ llvm/tools/lli/lli.cpp	Sun Aug 24 14:50:50 2003
@@ -75,19 +75,15 @@
   }
 #endif
 
-  // FIXME: in adddition to being gross, this is also wrong: This should use the
-  // pointersize/endianness of the host if the pointer size is not specified!!
-  unsigned Config = (M->getEndianness() != Module::BigEndian ? TM::LittleEndian : TM::BigEndian) |
-                    (M->getPointerSize() != Module::Pointer64 ? TM::PtrSize32    : TM::PtrSize64);
   ExecutionEngine *EE = 0;
 
   // If there is nothing that is forcing us to use the interpreter, make a JIT.
   if (!ForceInterpreter && !DebugMode && !TraceMode)
-    EE = ExecutionEngine::createJIT(M, Config);
+    EE = ExecutionEngine::createJIT(M);
 
   // If we can't make a JIT, make an interpreter instead.
   if (EE == 0)
-    EE = ExecutionEngine::createInterpreter(M, Config, DebugMode, TraceMode);
+    EE = ExecutionEngine::createInterpreter(M, DebugMode, TraceMode);
 
   // Add the module name to the start of the argv vector...
   // But delete .bc first, since programs (and users) might not expect to





More information about the llvm-commits mailing list