From reid at x10sys.com Mon Nov 29 00:23:30 2004
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 29 Nov 2004 00:23:30 -0600
Subject: [llvm-commits] CVS: llvm/tools/Makefile.JIT
Message-ID: <200411290623.AAA02012@zion.cs.uiuc.edu>
Changes in directory llvm/tools:
Makefile.JIT updated: 1.6 -> 1.7
---
Log message:
Make sure the program's symbols can be dlsym'd as well.
---
Diffs of the changes: (+2 -0)
Index: llvm/tools/Makefile.JIT
diff -u llvm/tools/Makefile.JIT:1.6 llvm/tools/Makefile.JIT:1.7
--- llvm/tools/Makefile.JIT:1.6 Thu Nov 25 14:22:07 2004
+++ llvm/tools/Makefile.JIT Mon Nov 29 00:23:19 2004
@@ -64,3 +64,5 @@
USEDLIBS += LLVMInterpreter $(JITLIBS) $(ARCHLIBS) LLVMScalarOpts \
LLVMAnalysis.a LLVMTransformUtils.a LLVMBCReader LLVMCore \
LLVMSupport.a LLVMTarget.a LLVMbzip2 LLVMSystem.a
+
+LDFLAGS += -dlopen self
From reid at x10sys.com Mon Nov 29 01:17:18 2004
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 29 Nov 2004 01:17:18 -0600
Subject: [llvm-commits] CVS: llvm/Makefile.rules
Message-ID: <200411290717.BAA02359@zion.cs.uiuc.edu>
Changes in directory llvm:
Makefile.rules updated: 1.240 -> 1.241
---
Log message:
Incorporate tools/Makefile.JIT
---
Diffs of the changes: (+57 -0)
Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.240 llvm/Makefile.rules:1.241
--- llvm/Makefile.rules:1.240 Sun Nov 28 23:00:33 2004
+++ llvm/Makefile.rules Mon Nov 29 01:17:07 2004
@@ -619,6 +619,63 @@
ifdef TOOLNAME
#---------------------------------------------------------
+# Handle the special "JIT" value for LLVM_LIBS which is a
+# shorthand for a bunch of libraries that get the correct
+# JIT support for a tool that runs JIT.
+#---------------------------------------------------------
+ifeq ($(LLVMLIBS),JIT)
+
+# Make sure we can get our own symbols in the tool
+Link += -dlopen self
+
+# Generic JIT libraries
+JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine
+
+# You can enable the X86 JIT on a non-X86 host by setting the flag
+# ENABLE_X86_JIT on the make command line. If not, it will still be
+# enabled automagically on an X86 host.
+ifeq ($(ARCH), x86)
+ ENABLE_X86_JIT = 1
+endif
+
+# What the X86 JIT requires
+ifdef ENABLE_X86_JIT
+ JIT_LIBS += LLVMX86 LLVMSelectionDAG
+endif
+
+# You can enable the SparcV9 JIT on a non-SparcV9 host by setting the flag
+# ENABLE_SPARCV9_JIT on the make command line. If not, it will still be
+# enabled automagically on an SparcV9 host.
+ifeq ($(ARCH), Sparc)
+ ENABLE_SPARCV9_JIT = 1
+endif
+
+# What the Sparc JIT requires
+ifdef ENABLE_SPARCV9_JIT
+ JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \
+ LLVMSparcV9LiveVar LLVMInstrumentation.a LLVMProfilePaths \
+ LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
+ LLVMDataStructure.a LLVMSparcV9RegAlloc
+endif
+
+# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
+# ENABLE_PPC_JIT on the make command line. If not, it will still be
+# enabled automagically on an PowerPC host.
+ifeq ($(ARCH), PowerPC)
+ ENABLE_PPC_JIT = 1
+endif
+
+# What the PowerPC JIT requires
+ifdef ENABLE_PPC_JIT
+ JIT_LIBS += LLVMPowerPC
+endif
+
+LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \
+ LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
+ LLVMSystem.a $(PLATFORMLIBDL)
+endif
+
+#---------------------------------------------------------
# Set up variables for building a tool.
#---------------------------------------------------------
ifdef EXAMPLE_TOOL
From reid at x10sys.com Mon Nov 29 01:17:30 2004
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 29 Nov 2004 01:17:30 -0600
Subject: [llvm-commits] CVS: llvm/tools/llvm-db/Makefile
Message-ID: <200411290717.BAA02385@zion.cs.uiuc.edu>
Changes in directory llvm/tools/llvm-db:
Makefile updated: 1.7 -> 1.8
---
Log message:
Use LLVMLIBS=JIT to get JIT libraries
---
Diffs of the changes: (+1 -7)
Index: llvm/tools/llvm-db/Makefile
diff -u llvm/tools/llvm-db/Makefile:1.7 llvm/tools/llvm-db/Makefile:1.8
--- llvm/tools/llvm-db/Makefile:1.7 Wed Oct 27 18:18:45 2004
+++ llvm/tools/llvm-db/Makefile Mon Nov 29 01:17:19 2004
@@ -12,12 +12,6 @@
USEDLIBS = LLVMDebugger
# Enable JIT support
-include ../Makefile.JIT
-
-# Have gcc tell the linker to export symbols from the program so that
-# dynamically loaded modules can be linked against them.
-#
-TOOLLINKOPTS = $(PLATFORMLIBDL)
+LLVMLIBS = JIT
include $(LEVEL)/Makefile.common
-
From reid at x10sys.com Mon Nov 29 01:17:30 2004
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 29 Nov 2004 01:17:30 -0600
Subject: [llvm-commits] CVS: llvm/tools/lli/Makefile
Message-ID: <200411290717.BAA02394@zion.cs.uiuc.edu>
Changes in directory llvm/tools/lli:
Makefile updated: 1.47 -> 1.48
---
Log message:
Use LLVMLIBS=JIT to get JIT libraries
---
Diffs of the changes: (+3 -9)
Index: llvm/tools/lli/Makefile
diff -u llvm/tools/lli/Makefile:1.47 llvm/tools/lli/Makefile:1.48
--- llvm/tools/lli/Makefile:1.47 Thu Oct 14 14:00:33 2004
+++ llvm/tools/lli/Makefile Mon Nov 29 01:17:19 2004
@@ -6,15 +6,9 @@
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
-LEVEL = ../..
-TOOLNAME = lli
+LEVEL := ../..
+TOOLNAME := lli
+LLVMLIBS := JIT
# Enable JIT support
-include ../Makefile.JIT
-
-# Have gcc tell the linker to export symbols from the program so that
-# dynamically loaded modules can be linked against them.
-#
-TOOLLINKOPTS = $(PLATFORMLIBDL)
-
include $(LEVEL)/Makefile.common
From reid at x10sys.com Mon Nov 29 01:17:30 2004
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 29 Nov 2004 01:17:30 -0600
Subject: [llvm-commits] CVS: llvm/examples/HowToUseJIT/Makefile
Message-ID: <200411290717.BAA02388@zion.cs.uiuc.edu>
Changes in directory llvm/examples/HowToUseJIT:
Makefile updated: 1.7 -> 1.8
---
Log message:
Use LLVMLIBS=JIT to get JIT libraries
---
Diffs of the changes: (+1 -1)
Index: llvm/examples/HowToUseJIT/Makefile
diff -u llvm/examples/HowToUseJIT/Makefile:1.7 llvm/examples/HowToUseJIT/Makefile:1.8
--- llvm/examples/HowToUseJIT/Makefile:1.7 Thu Nov 18 04:03:47 2004
+++ llvm/examples/HowToUseJIT/Makefile Mon Nov 29 01:17:19 2004
@@ -11,6 +11,6 @@
EXAMPLE_TOOL = 1
# Enable JIT support
-include $(LEVEL)/tools/Makefile.JIT
+LLVMLIBS := JIT
include $(LEVEL)/Makefile.common
From reid at x10sys.com Mon Nov 29 01:17:30 2004
From: reid at x10sys.com (Reid Spencer)
Date: Mon, 29 Nov 2004 01:17:30 -0600
Subject: [llvm-commits] CVS: llvm/examples/Fibonacci/Makefile
Message-ID: <200411290717.BAA02389@zion.cs.uiuc.edu>
Changes in directory llvm/examples/Fibonacci:
Makefile updated: 1.6 -> 1.7
---
Log message:
Use LLVMLIBS=JIT to get JIT libraries
---
Diffs of the changes: (+1 -1)
Index: llvm/examples/Fibonacci/Makefile
diff -u llvm/examples/Fibonacci/Makefile:1.6 llvm/examples/Fibonacci/Makefile:1.7
--- llvm/examples/Fibonacci/Makefile:1.6 Thu Nov 18 04:03:47 2004
+++ llvm/examples/Fibonacci/Makefile Mon Nov 29 01:17:19 2004
@@ -12,6 +12,6 @@
EXAMPLE_TOOL = 1
# Enable JIT support
-include $(LEVEL)/tools/Makefile.JIT
+LLVMLIBS := JIT
include $(LEVEL)/Makefile.common
From llvm at cs.uiuc.edu Mon Nov 29 01:17:42 2004
From: llvm at cs.uiuc.edu (LLVM)
Date: Mon, 29 Nov 2004 01:17:42 -0600
Subject: [llvm-commits] CVS: llvm/tools/Makefile.JIT
Message-ID: <200411290717.BAA02403@zion.cs.uiuc.edu>
Changes in directory llvm/tools:
Makefile.JIT (r1.7) removed
---
Log message:
No longer necessary, moved Makefile.rules
---
Diffs of the changes: (+0 -0)
From gaeke at cs.uiuc.edu Mon Nov 29 01:36:10 2004
From: gaeke at cs.uiuc.edu (Brian Gaeke)
Date: Mon, 29 Nov 2004 01:36:10 -0600 (CST)
Subject: [llvm-commits] CVS: reopt/lib/TraceJIT/TraceJITEmitter.cpp
Message-ID: <200411290736.BAA10484@kain.cs.uiuc.edu>
Changes in directory reopt/lib/TraceJIT:
TraceJITEmitter.cpp updated: 1.5 -> 1.6
---
Log message:
Add relocation support.
---
Diffs of the changes: (+50 -38)
Index: reopt/lib/TraceJIT/TraceJITEmitter.cpp
diff -u reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.5 reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.6
--- reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.5 Sun Nov 21 17:01:06 2004
+++ reopt/lib/TraceJIT/TraceJITEmitter.cpp Mon Nov 29 01:35:58 2004
@@ -27,7 +27,9 @@
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineConstantPool.h"
+#include "llvm/CodeGen/MachineRelocation.h"
#include "llvm/Target/TargetData.h"
+#include "llvm/Target/TargetJITInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/DynamicLinker.h"
using namespace llvm;
@@ -47,6 +49,10 @@
// ConstantPoolAddresses - Contains the location for each entry in the
// constant pool.
std::vector
Many tools will want to use the JIT features of LLVM. However, getting the + right set of libraries to link with is tedious, platform specific, and error + prone. Additionally, the JIT has special linker switch options that it needs. + Consequently, to make it easier to build tools that use the JIT, you can + use a special value for the LLVMLIBS> variable:
++ TOOLNAME = my_jit_tool + USEDLIBS = mylib + LLVMLIBS = JIT ++
Using a value of JIT for LLVMLIBS tells the makefile + system to construct a special value for LLVMLIBS that gives the program all + the LLVM libraries needed to run the JIT. Any additional libraries needed can + still be specified with USEDLIBS. To get a full understanding of how + this changes the linker command, it is recommended that you:
++ cd examples/Fibonacci + make VERBOSE=1 ++
By default, using LLVMLIBS=JIT will link in enough to support JIT + code generation for the architecture on which the tool is linked. If you need + additional target architectures linked in, you may specify them on the command + line or in your Makefile. For example:
++ ENABLE_X86_JIT=1 + ENABLE_SPARCV9_JIT=1 + ENALBE_PPC_JIT=1 ++
will cause the tool to be able to generate code for all three platforms. +
+This target finalizes shared objects and executables and copies all - libraries, headers and executables to the directory given with the - --prefix option to configure. When completed, the prefix - directory will have everything needed to use LLVM.
+ libraries, headers, executables and documentation to the directory given + with the --prefix option to configure. When completed, + the prefix directory will have everything needed to use LLVM. +The LLVM makefiles can generate complete internal documentation + for all the classes by using doxygen. By default, this feature is + not enabled because it takes a long time and generates a massive + amount of data (>100MB). If you want this feature, you must configure LLVM + with the --enable-doxygen switch and ensure that a modern version of doxygen + (1.3.7 or later) is available in your PATH. You can download + doxygen from + + here.