Compare commits

..

20 Commits

Author SHA1 Message Date
John Criswell
3c357fb4b0 Added Stacker Reid Spencer's contributions.
llvm-svn: 10498
2003-12-17 20:37:38 +00:00
John Criswell
a0877e6620 Fixed some punctuation and grammar.
llvm-svn: 10486
2003-12-16 17:31:42 +00:00
John Criswell
da45ebd298 Not ready for prime-time.
llvm-svn: 10485
2003-12-16 16:56:10 +00:00
John Criswell
0dd5964f48 Updated for release 1.1.
Added information on FreeBSD and MacOS X.

llvm-svn: 10484
2003-12-16 16:26:26 +00:00
John Criswell
e70acef70b Fixed a minor spelling error.
llvm-svn: 10482
2003-12-15 23:08:32 +00:00
John Criswell
4bee8e0a3a Added all known bugs that are relevant and relatively concrete.
llvm-svn: 10481
2003-12-15 23:04:43 +00:00
Misha Brukman
8f7bf8914a * Unbroke our HTML-4.01 compliance!
* Added note about PR186: present in 1.1, fixed in 1.2

llvm-svn: 10480
2003-12-15 22:57:49 +00:00
John Criswell
b549680585 Updated version number to 1.1.
Thanks, Chris!

llvm-svn: 10477
2003-12-15 22:12:50 +00:00
John Criswell
53ee4b83bb Grammatical and punctuation corrections.
llvm-svn: 10476
2003-12-15 21:05:22 +00:00
Chris Lattner
d5d184faac merge testcase from mainline
llvm-svn: 10475
2003-12-15 17:35:57 +00:00
Chris Lattner
eea45bf361 Merge from mainline, bugfix for PR185
llvm-svn: 10474
2003-12-15 17:35:09 +00:00
CVS to SVN Conversion
be0de4d917 This commit was manufactured by cvs2svn to create branch 'release_11'.
llvm-svn: 10472
2003-12-15 17:33:41 +00:00
John Criswell
d102fe3a95 Added obligatory copyright notices from HP and SGI.
llvm-svn: 10454
2003-12-13 21:25:39 +00:00
John Criswell
e7faf76bef Indicate that the pathname to the LLVM GCC front end must be an
absolute pathname.  This burnt me on a Sparc build.

llvm-svn: 10453
2003-12-13 19:45:28 +00:00
John Criswell
6496cf1d2a Don't specify the pointer size or endian-ness; it won't match for certain
platforms (SparcV9).

llvm-svn: 10452
2003-12-13 17:19:23 +00:00
John Criswell
84da4a6965 Added information on fixing libstdc++ on Solaris 8.
llvm-svn: 10451
2003-12-13 16:09:30 +00:00
Chris Lattner
5da0c61395 Minor cleanups, expand on what's new, give credit for the release notes to the whole team, not just me
llvm-svn: 10443
2003-12-12 23:21:29 +00:00
Chris Lattner
8d76ed912c Mac OS/X -> Mac OS X
llvm-svn: 10442
2003-12-12 23:15:37 +00:00
Chris Lattner
807a8cfe7a merge from mainline
llvm-svn: 10441
2003-12-12 21:34:10 +00:00
CVS to SVN Conversion
17d73082cb This commit was manufactured by cvs2svn to create branch 'release_11'.
llvm-svn: 10440
2003-12-12 21:34:10 +00:00
2398 changed files with 106943 additions and 338404 deletions

View File

@@ -3,5 +3,3 @@ Makefile.config
config.log
config.status
cvs.out
autom4te.cache
configure.out

View File

@@ -1,7 +1,6 @@
This file is a partial list of people who have contributed to the LLVM
project. If you have contributed a patch or made some other contribution to
LLVM, please submit a patch to this file to add yourself, and it will be
done!
Inspired by the CREDITS file from the Linux source tree, this file is,
likewise, at least a partial list of people who have contributed to the LLVM
project. The format and the next paragraph are stolen directly from that file.
The list is sorted by name and formatted to allow easy grepping and
beautification by scripts. The fields are: name (N), email (E), web-address
@@ -13,18 +12,15 @@ E: vadve@cs.uiuc.edu
W: http://www.cs.uiuc.edu/~vadve/
D: The Sparc64 backend, provider of much wisdom, and motivator for LLVM
N: Henrik Bach
D: MingW Win32 API portability layer
N: Nate Begeman
E: natebegeman@mac.com
D: Primary PowerPC backend developer
N: Tanya Brethour
E: tonic@nondot.org
W: http://nondot.org/~tonic/
D: The llvm-ar tool
N: Misha Brukman
E: brukman+llvm@uiuc.edu
W: http://misha.brukman.net
D: Portions of X86 and Sparc JIT compilers, PowerPC backend
D: Incremental bytecode loader
D: Portions of X86 and Sparc JIT compilers, incremental bytecode loader
N: Cameron Buschardt
E: buschard@uiuc.edu
@@ -34,78 +30,21 @@ N: Casey Carter
E: ccarter@uiuc.edu
D: Fixes to the Reassociation pass, various improvement patches
N: Jeff Cohen
E: jeffc@jolt-lang.org
W: http://jolt-lang.org
D: Native Win32 API portability layer
N: John T. Criswell
E: criswell@uiuc.edu
D: Autoconf support, QMTest database, documentation improvements
N: Alkis Evlogimenos
E: alkis@evlogimenos.com
D: Linear scan register allocator, many codegen improvements, Java frontend
N: Brian Gaeke
E: gaeke@uiuc.edu
W: http://www.students.uiuc.edu/~gaeke/
D: Portions of X86 static and JIT compilers; SparcV8 backend
D: Dynamic trace optimizer
D: Portions of X86 static and JIT compilers, reoptimizer framework cleanups
D: FreeBSD/X86 compatibility fixes, the llvm-nm tool
N: Louis Gerbarg
D: Portions of the PowerPC backend
N: Paolo Invernizzi
E: arathorn@fastwebnet.it
D: Visual C++ compatibility fixes
N: Brad Jones
E: kungfoomaster@nondot.org
D: Support for packed types
N: Sumant Kowshik
E: kowshik@uiuc.edu
D: Author of the original C backend
N: Chris Lattner
E: sabre@nondot.org
W: http://nondot.org/~sabre/
D: Primary architect of LLVM
N: Tanya Lattner (formerly Tanya Brethour)
E: tonic@nondot.org
W: http://nondot.org/~tonic/
D: The initial llvm-ar tool, converted regression testsuite to dejagnu
D: Modulo scheduling in the SparcV9 backend
N: Andrew Lenharth
E: alenhar2@cs.uiuc.edu
W: http://www.lenharth.org/~andrewl/
D: Alpha backend
N: Duraid Madina
E: duraid@octopus.com.au
W: http://kinoko.c.u-tokyo.ac.jp/~duraid/
D: IA64 backend
N: Michael McCracken
E: michael.mccracken@gmail.com
D: Line number support for llvmgcc
N: Vladimir Merzliakov
E: wanderer@rsu.ru
D: Test suite fixes for FreeBSD
N: Morten Ofstad
E: morten@hue.no
D: Visual C++ compatibility fixes
N: Vladimir Prus
E: ghost@cs.msu.su
D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass
N: Ruchira Sasanka
E: sasanka@uiuc.edu
D: Graph coloring register allocator for the Sparc64 backend
@@ -116,12 +55,8 @@ D: The `paths' pass
N: Reid Spencer
E: rspencer@x10sys.com
W: http://llvm.x10sys.com/rspencer
D: Stacker, llvmc, bytecode, other. See web page for current notes.
N: Adam Treat
E: manyoso@yahoo.com
D: C++ bugs filed, and C++ front-end bug fixes.
W: http://extprosys.sourceforge.net/
D: Complete 'llvm' namespacification, Stacker, bug fixes, and improvements
N: Bill Wendling
E: wendling@isanbard.org

View File

@@ -4,8 +4,8 @@ LLVM Release License
University of Illinois/NCSA
Open Source License
Copyright (c) 2003, 2004, 2005 University of Illinois at Urbana-Champaign.
All rights reserved.
Copyright (c) 2003, University of Illinois at Urbana-Champaign. All rights
reserved.
Developed by:
@@ -49,24 +49,3 @@ The LLVM software contains code written by third parties. Such software will
have its own individual LICENSE.TXT file in the directory in which it appears.
This file will describe the copyrights, license, and restrictions which apply
to that code.
The disclaimer of warranty in the University of Illinois Open Source License
applies to all code in the LLVM Distribution, and nothing in any of the
other licenses gives permission to use the names of the LLVM Team or the
University of Illinois to endorse or promote products derived from this
Software.
The following pieces of software have additional or alternate copyrights,
licenses, and/or restrictions:
Program Directory
------- ---------
System Library llvm/lib/System
Compiler Driver llvm/tools/llvmc
PowerPC Backend llvm/lib/Target/PowerPC
bzip2 llvm/lib/Support/bzip2/LICENSE
Autoconf llvm/autoconf
llvm/projects/ModuleMaker/autoconf
llvm/projects/sample/autoconf
Burg llvm/utils/Burg
GNU Libc llvm/runtime/GCCLibraries/libc

View File

@@ -1,71 +1,46 @@
#===- ./Makefile -------------------------------------------*- Makefile -*--===#
##===- ./Makefile ------------------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
##===----------------------------------------------------------------------===##
LEVEL = .
DIRS = lib/System lib/Support utils lib
ifeq ($(MAKECMDGOALS),tools-only)
DIRS += tools
else
ifneq ($(MAKECMDGOALS),libs-only)
DIRS += tools runtime docs
OPTIONAL_DIRS = examples projects
endif
endif
EXTRA_DIST := test llvm.spec include
DIRS = lib/Support utils lib tools runtime
OPTIONAL_DIRS = projects
include $(LEVEL)/Makefile.common
# Specify options to pass to configure script when we're
# running the dist-check target
DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
test :: all
cd test; $(MAKE)
.PHONY: debug-opt-prof
debug-opt-prof:
$(Echo) Building Debug Version
$(Verb) $(MAKE)
$(Echo)
$(Echo) Building Optimized Version
$(Echo)
$(Verb) $(MAKE) ENABLE_OPTIMIZED=1
$(Echo)
$(Echo) Building Profiling Version
$(Echo)
$(Verb) $(MAKE) ENABLE_PROFILING=1
distclean:: clean
$(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
$(LEVEL)/include/Config/config.h \
$(LEVEL)/autoconf/autom4te.cache \
$(LEVEL)/config.log \
$(LEVEL)/TAGS
dist-hook::
$(Echo) Eliminating files constructed by configure
$(Verb) $(RM) -f \
$(TopDistDir)/include/llvm/ADT/hash_map \
$(TopDistDir)/include/llvm/ADT/hash_set \
$(TopDistDir)/include/llvm/ADT/iterator \
$(TopDistDir)/include/llvm/Config/config.h \
$(TopDistDir)/include/llvm/Support/DataTypes.h \
$(TopDistDir)/include/llvm/Support/ThreadSupport.h
tools-only:
@for dir in lib/Support utils lib tools; do $(MAKE) -C $$dir; done
tools-only: all
libs-only: all
AUTOCONF = autoconf
AUTOHEADER = autoheader
#------------------------------------------------------------------------
# Make sure the generated headers are up-to-date. This must be kept in
# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
#------------------------------------------------------------------------
FilesToConfig := \
include/llvm/Config/config.h \
include/llvm/Support/DataTypes.h \
include/llvm/ADT/hash_map \
include/llvm/ADT/hash_set \
include/llvm/ADT/iterator
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
configure: autoconf/configure.ac autoconf/aclocal.m4
cd autoconf && $(AUTOCONF) -o ../configure configure.ac
include/Config/config.h.in: autoconf/configure.ac autoconf/aclocal.m4
$(AUTOHEADER) -I autoconf autoconf/configure.ac
# Install support for llvm include files.
.PHONY: install-includes
install-includes:
$(MKDIR) $(includedir)/llvm
cd include && find * '!' '(' -name '*~' -o -name .cvsignore ')' -print | grep -v CVS | pax -rwdvpe $(includedir)/llvm
install:: install-includes
all-local:: $(FilesToConfigPATH)
$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
$(Echo) Regenerating $*
$(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
.PRECIOUS: $(FilesToConfigPATH)

View File

@@ -1,11 +1,11 @@
#===-- Makefile.common - Common make rules for LLVM --------*- Makefile -*--===#
#===-- Makefile.common - Common make rules for LLVM -------*- makefile -*--====
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
##===----------------------------------------------------------------------===##
#
# This file is included by all of the LLVM makefiles. This file defines common
# rules to do things like compile a .cpp file or generate dependency info.
@@ -16,7 +16,7 @@
# The variable $(LEVEL) *must* be set:
#
# 1. LEVEL - The level of the current subdirectory from the top of the
# source directory. This level should be expressed as a path, for
# MagicStats view. This level should be expressed as a path, for
# example, ../.. for two levels deep.
#
# 2. DIRS - A list of subdirectories to be built. Fake targets are set up
@@ -39,29 +39,25 @@
#
# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree.
#
# 8. PROJ_SRC_DIR - The directory which contains the current set of Makefiles
# 8. BUILD_SRC_DIR - The directory which contains the current set of Makefiles
# and usually the source code too (unless SourceDir is set).
#
# 9. PROJ_SRC_ROOT - The root directory of the source code being compiled.
# 9. BUILD_SRC_ROOT - The root directory of the source code being compiled.
#
# 10. PROJ_OBJ_DIR - The directory where object code should be placed.
# 10. BUILD_OBJ_DIR - The directory where object code should be placed.
#
# 11. PROJ_OBJ_ROOT - The root directory for where object code should be
# 11. BUILD_OBJ_ROOT - The root directory for where object code should be
# placed.
#
# For building,
# LLVM, LLVM_SRC_ROOT = PROJ_SRC_ROOT
# LLVM, LLVM_SRC_ROOT = BUILD_SRC_ROOT
#
#===-----------------------------------------------------------------------====
#
# Configuration file to set paths specific to local installation of LLVM
#
ifndef LLVM_OBJ_ROOT
include $(LEVEL)/Makefile.config
else
include $(LLVM_OBJ_ROOT)/Makefile.config
endif
#
# Include all of the build rules used for making LLVM

View File

@@ -1,21 +1,174 @@
#===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#===-- Makefile.config - Local configuration for LLVM ------*- makefile -*--====
#
# This file is included by Makefile.common. It defines paths and other
# values specific to a particular installation of LLVM.
#
#===------------------------------------------------------------------------===#
#===-----------------------------------------------------------------------====
# Define LLVM specific info and directories based on the autoconf variables
LLVMPackageName := @PACKAGE_NAME@
LLVMVersion := @PACKAGE_VERSION@
LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
#
# Target operating system for which LLVM will be compiled.
#
OS=@OS@
#
# Target hardware architecture
#
ARCH=@ARCH@
# Path to the C++ compiler to use. This is an optional setting, which defaults
# to whatever your gmake defaults to.
#
# Under Linux, for some reason the compiler driver wants to search the PATH to
# find the system assembler, which breaks if the LLVM assembler is in our path.
# Hack it to use the assembler in /usr/bin directly.
#
CXX = @CXX@
# We have the same problem with the CC binary, which use used by testcases for
# native builds.
#
CC := @CC@
#
# Compilation flags for the C and C++ compilers.
#
#
# Removing the compiler flags for now. They interfere with the test suite
# (which has its own autoconf stuff), and we don't use -DHAVE_CONFIG_H anyway.
#
#CPPFLAGS+=@DEFS@
#CCFLAGS+=@DEFS@
LDFLAGS+=@LDFLAGS@
#
# Removed since it prevents the tests from working properly.
#
#LIBS+=@LIBS@
#
# Libraries needed by tools
#
TOOLLINKOPTS=@LIBS@
#
# Path to the archiver program.
#
AR_PATH = @AR@
#
# The pathnames of the Flex and Bison programs, respectively.
#
BISON = @YACC@
FLEX = @LEX@
#
# Paths to miscellaneous programs.
#
RPWD = @RPWD@
SED = @SED@
RM = @RM@
ECHO = @ECHO@
MKDIR = @abs_top_srcdir@/autoconf/mkinstalldirs
DATE = @DATE@
MV = @MV@
INSTALL = @INSTALL@
DOT = @DOT@
ETAGS = @ETAGS@
#
# Determine the target for which LLVM should generate code.
#
LLVMGCCARCH := @target@/3.4-llvm
# Path to directory where object files should be stored during a build.
# Set OBJ_ROOT to "." if you do not want to use a separate place for
# object files.
#
#OBJ_ROOT = .
OBJ_ROOT := .
# Path to location for LLVM front-end this should only be specified here if you
# want to override the value set in Makefile.$(uname)
#
LLVMGCCDIR := @LLVMGCCDIR@
# When this setting is set to true, programs in the llvm/test/Programs hierarchy
# are not recompiled from source code. Instead, the bytecode for the file is
# pulled from the BYTECODE_REPOSITORY directory. This can be useful when disk
# space is limited or when you just don't want to spend time running the C
# frontend.
#
#USE_PRECOMPILED_BYTECODE := 1
@UPB@
# This path specifies the cannonical location of bytecode files for compiled
# versions of the test/Programs/* programs. This is used as the bytecode source
# when USE_PRECOMPILED_BYTECODE is specified or when source code is not
# available for the program (such as SPEC).
#
BYTECODE_REPOSITORY := @BCR@
# Path to location for purify, this is only needed if you build with
# ENABLE_PURIFY=1
#
PURIFY = @PURIFY@
#
# SPEC benchmarks:
# Set the USE_SPEC variable to enable the use of the SPEC benchmarks.
# You must provide the SPEC benchmarks on your own.
#
@USE_SPEC@
#
# Path to the SPEC benchmarks. If you have the SPEC benchmarks, place the
# path here.
#
#SPEC_ROOT := /home/vadve/shared/benchmarks/speccpu2000/benchspec
SPEC_ROOT := @SPEC_ROOT@
#
# Path to the PAPI code. This is used by the reoptimizer only.
#
#PAPIDIR := /home/vadve/shared/papi-2.3.4.1
PAPIDIR := @PAPIDIR@
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1)
#
# When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are
# turned on, and Debug builds are turned off.
#
#ENABLE_OPTIMIZED = 1
@ENABLE_OPTIMIZED@
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
#
#ENABLE_PROFILING = 1
#
# This option tells the Makefiles to produce verbose output.
# It essentially prints the commands that make is executing
#
#VERBOSE = 1
# When ENABLE_PURIFY is set to 1, the LLVM tools are linked with purify (which
# must be locally installed) to allow for some automated memory error debugging.
#
#ENABLE_PURIFY = 1
@ENABLE_PURIFY@
#
# Enable JIT for this platform
#
@JIT@
#
# Disable LLC diffs for testing.
#
@DISABLE_LLC_DIFFS@
###########################################################################
# Directory Configuration
@@ -25,178 +178,85 @@ LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
# o LLVM_SRC_ROOT : The root directory of the LLVM source code.
# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code.
#
# o PROJ_SRC_DIR : The directory containing the code to build.
# o PROJ_SRC_ROOT : The root directory of the code to build.
# o BUILD_SRC_DIR : The directory containing the code to build.
# o BUILD_SRC_ROOT : The root directory of the code to build.
#
# o PROJ_OBJ_DIR : The directory in which compiled code will be placed.
# o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
# o BUILD_OBJ_DIR : The directory in which compiled code will be placed.
# o BUILD_OBJ_ROOT : The root directory in which compiled code is placed.
#
###########################################################################
# Set the project name to LLVM if its not defined
ifndef PROJECT_NAME
PROJECT_NAME := LLVM
#
# Set the object build directory. By default, it is the current directory.
#
ifndef BUILD_OBJ_DIR
BUILD_OBJ_DIR := $(subst //,/,$(shell $(RPWD)))
endif
PROJ_OBJ_DIR := $(shell pwd)
PROJ_OBJ_ROOT := $(subst //,/,$(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); pwd))
#
# Set the root of the object directory.
#
ifndef BUILD_OBJ_ROOT
BUILD_OBJ_ROOT := $(subst //,/,$(shell cd $(BUILD_OBJ_DIR)/$(LEVEL); $(RPWD)))
endif
ifeq ($(PROJECT_NAME),LLVM)
LLVM_SRC_ROOT := @abs_top_srcdir@
LLVM_OBJ_ROOT := @abs_top_builddir@
PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
PROJ_SRC_DIR := $(subst //,/,$(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
PROJ_prefix := @prefix@
PROJ_bindir := @prefix@/bin
PROJ_libdir := @prefix@/lib
PROJ_datadir := @prefix@/share
PROJ_docsdir := @prefix@/docs/llvm
PROJ_etcdir := @prefix@/etc/llvm
PROJ_includedir := @prefix@/include
PROJ_infodir := @prefix@/info
PROJ_mandir := @prefix@/man
PROJ_VERSION := $(LLVMVersion)
else
ifndef PROJ_SRC_ROOT
$(error Projects must define PROJ_SRC_ROOT)
#
# Set the source build directory. That is almost always the current directory.
#
ifndef BUILD_SRC_DIR
BUILD_SRC_DIR := $(subst //,/,@abs_top_srcdir@/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR)))
endif
ifndef PROJ_OBJ_ROOT
$(error Projects must define PROJ_OBJ_ROOT)
endif
ifndef PROJ_INSTALL_ROOT
$(error Projects must define PROJ_INSTALL_ROOT)
endif
ifndef LLVM_SRC_ROOT
$(error Projects must define LLVM_SRC_ROOT)
#
# Set the source root directory.
#
ifndef BUILD_SRC_ROOT
BUILD_SRC_ROOT := $(subst //,/,@abs_top_srcdir@)
endif
#
# Set the LLVM object directory.
#
ifndef LLVM_OBJ_ROOT
$(error Projects must define LLVM_OBJ_ROOT)
endif
PROJ_SRC_DIR := $(subst //,/,$(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
PROJ_prefix := $(PROJ_INSTALL_ROOT)
PROJ_bindir := $(PROJ_INSTALL_ROOT)/bin
PROJ_libdir := $(PROJ_INSTALL_ROOT)/lib
PROJ_datadir := $(PROJ_INSTALL_ROOT)/share
PROJ_docsdir := $(PROJ_INSTALL_ROOT)/docs/llvm
PROJ_etcdir := $(PROJ_INSTALL_ROOT)/etc/llvm
PROJ_includedir := $(PROJ_INSTALL_ROOT)/include
PROJ_infodir := $(PROJ_INSTALL_ROOT)/info
PROJ_mandir := $(PROJ_INSTALL_ROOT)/man
ifndef PROJ_VERSION
PROJ_VERSION := 1.0
ifdef LLVM_SRC_ROOT
LLVM_OBJ_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(RPWD))
else
LLVM_OBJ_ROOT := $(BUILD_OBJ_ROOT)
endif
endif
# Determine if we're on a unix type operating system
LLVM_ON_UNIX:=@LLVM_ON_UNIX@
LLVM_ON_WIN32:=@LLVM_ON_WIN32@
#
# Set the LLVM source directory.
# It is typically the root directory of what we're compiling now.
#
ifndef LLVM_SRC_ROOT
LLVM_SRC_ROOT := $(BUILD_SRC_ROOT)
endif
# Target operating system for which LLVM will be compiled.
OS=@OS@
#
# Set SourceDir for backwards compatbility.
#
ifndef SourceDir
SourceDir=$(BUILD_SRC_DIR)
endif
# Target hardware architecture
ARCH=@ARCH@
# Installation directories, as provided by the configure script.
# Target triple (cpu-vendor-os) for which we should generate code
TARGET_TRIPLE=@target@
exec_prefix = @exec_prefix@
prefix = @prefix@
program_transform_name = @program_transform_name@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
includedir = @includedir@
infodir = @infodir@
mandir = @mandir@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
# Targets that we should build
TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
# Endian-ness of the target
ENDIAN=@ENDIAN@
# Path to the C++ compiler to use. This is an optional setting, which defaults
# to whatever your gmake defaults to.
CXX = @CXX@
# Path to the CC binary, which use used by testcases for native builds.
CC := @CC@
# Linker flags.
LDFLAGS+=@LDFLAGS@
# Path to the library archiver program.
AR_PATH = @AR@
# The pathnames of the programs we require to build
BISON := @BISON@
CMP := @CMP@
CP := @CP@
DATE := @DATE@
FIND := @FIND@
FLEX := @LEX@
GREP := @GREP@
INSTALL := @INSTALL@
MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
MV := @MV@
RANLIB := @RANLIB@
RM := @RM@
SED := @SED@
TAR := @TAR@
YACC := @YACC@
# Paths to miscellaneous programs we hope are present but might not be
BZIP2 := @BZIP2@
DOT := @DOT@
DOXYGEN := @DOXYGEN@
ETAGS := @ETAGS@
ETAGSFLAGS := @ETAGSFLAGS@
GROFF := @GROFF@
GZIP := @GZIP@
POD2HTML := @POD2HTML@
POD2MAN := @POD2MAN@
RUNTEST := @RUNTEST@
TCLSH := @TCLSH@
ZIP := @ZIP@
LIBS := @LIBS@
# Path to location for LLVM C/C++ front-end. You can modify this if you
# want to override the value set by configure.
LLVMGCCDIR := @LLVMGCCDIR@
# Determine the target for which LLVM should generate code.
LLVMGCCARCH := @target@/3.4-llvm
# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
LLVMGCC := @LLVMGCC@
LLVMGXX := @LLVMGXX@
LLVMCC1 := @LLVMCC1@
LLVMCC1PLUS := @LLVMCC1PLUS@
# Path to directory where object files should be stored during a build.
# Set OBJ_ROOT to "." if you do not want to use a separate place for
# object files.
OBJ_ROOT := .
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1):
# When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are
# turned on, and Debug builds are turned off.
#ENABLE_OPTIMIZED = 1
@ENABLE_OPTIMIZED@
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
#ENABLE_PROFILING = 1
# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
# This option tells the Makefiles to produce verbose output.
# It essentially prints the commands that make is executing
#VERBOSE = 1
# Enable JIT for this platform
@JIT@
# Shared library extension for this platform.
SHLIBEXT = @SHLIBEXT@
# Executable file extension for this platform.
EXEEXT = @EXEEXT@
# Things we just assume are "there"
ECHO := echo

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,128 @@
Low Level Virtual Machine (LLVM)
================================
The LLVM Compiler Infrastructure
http://llvm.cs.uiuc.edu
This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.
Welcome to LLVM!
----------------
This file is intended to do four things:
(1) help you get started using LLVM;
(2) tell you how to get questions about LLVM answered;
(3) tell you where to find documentation for different kinds of questions; and
(4) tell you about three LLVM-related mailing lists.
LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.
Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.
Getting Started with LLVM
-------------------------
(1) For license information:
llvm/LICENSE.txt
(2) Installing and compiling LLVM:
llvm/docs/GettingStarted.html
(3) Learn about features and limitations of this release:
llvm/docs/ReleaseNotes.html
(4) Learn how to write a pass within the LLVM system:
llvm/docs/WritingAnLLVMPass.html
(5) Learn how to start a new development project using LLVM, where your
new source code can live anywhere (outside or inside the LLVM tree),
while using LLVM header files and libraries:
llvm/docs/Projects.html
Getting Help with LLVM
----------------------
(1) If you have questions or development problems not answered in the
documentation, send e-mail to llvmdev@cs.uiuc.edu. This mailing list is
monitored by all the people in the LLVM group at Illinois, and you should
expect prompt first responses.
(2) To report a bug, submit a bug report as described in the document:
http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html
(3) We now use Bugzilla to track bugs, so you can check the status of
previous bugs at:
http://llvm.cs.uiuc.edu/bugs/query.cgi
LLVM Documentation
------------------
All the documents mentioned below except the design overview tech report
are included as part of the LLVM release (in llvm/docs/*):
LLVM Design Overview:
LLVM : A Compilation Framework for Lifelong Program Analysis
and Transformation:
http://llvm.cs.uiuc.edu/pubs/2003-09-30-LifelongOptimizationTR.html
LLVM User Guides:
Download and Installation Instructions:
llvm/docs/GettingStarted.html
LLVM Command Guide:
llvm/docs/CommandGuide/index.html
LLVM Assembly Language:
llvm/docs/LangRef.html
LLVM Test Suite Guide:
llvm/docs/TestingGuide.html
LLVM Programming Documentation:
LLVM Programmers Manual:
llvm/docs/ProgrammersManual.html
Writing an LLVM Pass:
llvm/docs/WritingAnLLVMPass.html
Alias Analysis in LLVM:
llvm/docs/AliasAnalysis.html
Command Line Library:
llvm/docs/CommandLine.html
Coding Standards:
llvm/docs/CodingStandards.html
Other LLVM Resources:
Submitting a Bug:
http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html
Open Projects:
llvm/docs/OpenProjects.html
Creating a new LLVM Project:
llvm/docs/Projects.html
Mailing Lists
--------------
There are three mailing lists for providing LLVM users with information:
(1) LLVM Announcements List:
http://mail.cs.uiuc.edu/mailman/listinfo/llvm-announce
This is a low volume list that provides important announcements regarding
LLVM. It is primarily intended to announce new releases, major updates to
the software, etc. This list is highly recommended for anyone that uses
LLVM.
(2) LLVM Developers List:
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
This list is for people who want to be included in technical discussions
of LLVM. People post to this list when they have questions about writing
code for or using the LLVM tools. It is relatively low volume.
(3) LLVM Commits List
http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits
This list contains all commit messages that are made when LLVM developers
commit code changes to the CVS archive. It is useful for those who want to
stay on the bleeding edge of LLVM development. This list is very high
volume.

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
Xcode project files for LLVM, for Xcode 2.1

View File

@@ -1,2 +0,0 @@
aclocal.m4
autom4te.cache

View File

@@ -1,43 +0,0 @@
#!/bin/sh
die () {
echo "$@" 1>&2
exit 1
}
outfile=configure
configfile=configure.ac
test -d autoconf && test -f autoconf/$configfile && cd autoconf
test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first"
autoconf --version | egrep '2\.59' > /dev/null
if test $? -ne 0 ; then
die "Your autoconf was not detected as being 2.59"
fi
aclocal --version | egrep '1\.9\.2' > /dev/null
if test $? -ne 0 ; then
die "Your aclocal was not detected as being 1.9.2"
fi
autoheader --version | egrep '2\.59' > /dev/null
if test $? -ne 0 ; then
die "Your autoheader was not detected as being 2.59"
fi
libtool --version | grep '1\.5\.10' > /dev/null
if test $? -ne 0 ; then
die "Your libtool was not detected as being 1.5.10"
fi
echo ""
echo "### NOTE: ############################################################"
echo "### If you get *any* warnings from autoconf below you MUST fix the"
echo "### scripts in the m4 directory because there are future forward"
echo "### compatibility or platform support issues at risk. Please do NOT"
echo "### commit any configure script that was generated with warnings"
echo "### present. You should get just three 'Regenerating..' lines."
echo "######################################################################"
echo ""
echo "Regenerating aclocal.m4 with aclocal 1.9.2"
cwd=`pwd`
aclocal --force -I $cwd/m4 || die "aclocal failed"
echo "Regenerating configure with autoconf 2.59"
autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed"
cd ..
echo "Regenerating config.h.in with autoheader 2.59"
autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed"
exit 0

View File

@@ -1,40 +0,0 @@
Upgrading Libtool
===============================================================================
If you are in the mood to upgrade libtool, you must do the following:
1. Get the new version of libtool and put it in <SRC>
2. configure/build/install libtool with --prefix=<PFX>
3. Copy <SRC>/ltdl.m4 to llvm/autoconf/m4
4. Copy <PFX>/share/aclocal/libtool.m4 to llvm/autoconf/m4/libtool.m4
5. Copy <PFX>/share/libtool/ltmain.sh to llvm/autoconf/ltmain.sh
6. Run sed -e 's/output.exp/outputname.exp/g' on ltmain.sh
7. Copy <PFX>/share/libtool/libltdl/ltdl.c to llvm/lib/System
8. Copy <PFX>/share/libtool/libltdl/ltdl.h to llvm/lib/System
9. Adjust the llvm/autoconf/m4/libtool.m4 file to ensure that the variable
default_ofile is set to "mklib" instead of "libtool"
10. Run "autoupdate libtool.m4 ltdl.m4" in the llvm/autoconf/m4 directory.
This should correctly update the macro definitions in the libtool m4
files to match the version of autoconf that LLVM uses. This converts
AC_HELP_STRING to AS_HELP_STRING and AC_TRY_LINK to AC_LINK_IFELSE, amongst
other things. You may need to manually adjust the files.
11. Run AutoRegen.sh to get the new macros into configure script
12. If there are any warnings from configure, go to step 9.
13. Rebuild LLVM, making sure it reconfigured
14. Test the JIT which uses libltdl
15. If it all works, only THEN commit the changes.
Upgrading autoconf
===============================================================================
If you are in the mood to upgrade autoconf, you should:
1. Consider not upgrading.
2. No really, this is a hassle, you don't want to do it.
3. Get the new version of autoconf and put it in <SRC>
4. configure/build/install autoconf with --prefix=<PFX>
5. Run autoupdate on all the m4 macros in llvm/autoconf/m4
6. Run autoupdate on llvm/autoconf/configure.ac
7. Regenerate configure script with AutoRegen.sh
8. If there are any warnings from autoconf, fix them and go to step 7.
9. Test, test, test.

View File

@@ -5888,8 +5888,10 @@ if test "$ac_cv_cxx_namespaces" = yes; then
fi
])
#
# Check for hash_map extension. This is from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html
#
AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class std::hash_map],
ac_cv_cxx_have_std_ext_hash_map,
@@ -5902,12 +5904,9 @@ using namespace std;
#endif],[hash_map<int, int> t;],
[ac_cv_cxx_have_std_ext_hash_map=yes], [ac_cv_cxx_have_std_ext_hash_map=no])
AC_LANG_RESTORE])
HAVE_STD_EXT_HASH_MAP=0
if test "$ac_cv_cxx_have_std_ext_hash_map" = yes
then
HAVE_STD_EXT_HASH_MAP=1
fi
AC_SUBST(HAVE_STD_EXT_HASH_MAP)])
if test "$ac_cv_cxx_have_std_ext_hash_map" = yes; then
AC_DEFINE(HAVE_STD_EXT_HASH_MAP,,[Define if the compiler has a header <ext/hash_map> that defines template class std::hash_map.])
fi])
AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class __gnu_cxx::hash_map],
@@ -5921,12 +5920,9 @@ using namespace __gnu_cxx;
#endif],[hash_map<int,int> t; ],
[ac_cv_cxx_have_gnu_ext_hash_map=yes],[ac_cv_cxx_have_gnu_ext_hash_map=no])
AC_LANG_RESTORE])
HAVE_GNU_EXT_HASH_MAP=0
if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes
then
HAVE_GNU_EXT_HASH_MAP=1
fi
AC_SUBST(HAVE_GNU_EXT_HASH_MAP)])
if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes; then
AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,,[Define if the compiler has a header <ext/hash_map> that defines template class __gnu_cxx::hash_map.])
fi])
AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <hash_map> defining template class ::hash_map],
@@ -5937,20 +5933,18 @@ AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP],
AC_TRY_COMPILE([#include <hash_map>],[hash_map<int,int> t; ],
[ac_cv_cxx_have_global_hash_map=yes], [ac_cv_cxx_have_global_hash_map=no])
AC_LANG_RESTORE])
HAVE_GLOBAL_HASH_MAP=0
if test "$ac_cv_cxx_have_global_hash_map" = yes
then
HAVE_GLOBAL_HASH_MAP=1
fi
AC_SUBST(HAVE_GLOBAL_HASH_MAP)])
if test "$ac_cv_cxx_have_global_hash_map" = yes; then
AC_DEFINE(HAVE_GLOBAL_HASH_MAP,,[Define if the compiler has a header <hash_map> that defines template class ::hash_map.])
fi])
AC_DEFUN([AC_CXX_HAVE_HASH_MAP],
[AC_CXX_HAVE_STD_EXT_HASH_MAP
AC_CXX_HAVE_GNU_EXT_HASH_MAP
AC_CXX_HAVE_GLOBAL_HASH_MAP])
#
# Check for hash_set extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
#
AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_SET],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_set> defining template class std::hash_set],
ac_cv_cxx_have_std_ext_hash_set,
@@ -5963,12 +5957,9 @@ using namespace std;
#endif],[hash_set<int> t; ],
[ac_cv_cxx_have_std_ext_hash_set=yes], [ac_cv_cxx_have_std_ext_hash_set=no])
AC_LANG_RESTORE])
HAVE_STD_EXT_HASH_SET=0
if test "$ac_cv_cxx_have_std_ext_hash_set" = yes
then
HAVE_STD_EXT_HASH_SET=1
fi
AC_SUBST(HAVE_STD_EXT_HASH_SET)])
if test "$ac_cv_cxx_have_std_ext_hash_set" = yes; then
AC_DEFINE(HAVE_STD_EXT_HASH_SET,,[Define if the compiler has a header <ext/hash_set> that defines template class std::hash_set.])
fi])
AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_SET],
[AC_CACHE_CHECK(
@@ -5983,12 +5974,9 @@ using namespace __gnu_cxx;
#endif],[hash_set<int> t; ],
[ac_cv_cxx_have_gnu_ext_hash_set=yes], [ac_cv_cxx_have_gnu_ext_hash_set=no])
AC_LANG_RESTORE])
HAVE_GNU_EXT_HASH_SET=0
if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes
then
HAVE_GNU_EXT_HASH_SET=1
fi
AC_SUBST(HAVE_GNU_EXT_HASH_SET)])
if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes; then
AC_DEFINE(HAVE_GNU_EXT_HASH_SET,,[Define if the compiler has a header <ext/hash_set> that defines template class __gnu_cxx::hash_set.])
fi])
AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET],
[AC_CACHE_CHECK([whether the compiler has <hash_set> defining template class ::hash_set],
@@ -5999,20 +5987,19 @@ AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET],
AC_TRY_COMPILE([#include <hash_set>],[hash_set<int> t; return 0;],
[ac_cv_cxx_have_global_hash_set=yes], [ac_cv_cxx_have_global_hash_set=no])
AC_LANG_RESTORE])
HAVE_GLOBAL_HASH_SET=0
if test "$ac_cv_cxx_have_global_hash_set" = yes
then
HAVE_GLOBAL_HASH_SET=1
fi
AC_SUBST(HAVE_GLOBAL_HASH_SET)])
if test "$ac_cv_cxx_have_global_hash_set" = yes; then
AC_DEFINE(HAVE_GLOBAL_HASH_SET,,[Define if the compiler has a header <hash_set> that defines template class ::hash_set.])
fi])
AC_DEFUN([AC_CXX_HAVE_HASH_SET],
[AC_CXX_HAVE_STD_EXT_HASH_SET
AC_CXX_HAVE_GNU_EXT_HASH_SET
AC_CXX_HAVE_GLOBAL_HASH_SET])
#
# Check for standard iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
#
AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has the standard iterator,
ac_cv_cxx_have_std_iterator,
@@ -6026,12 +6013,10 @@ using namespace std;
ac_cv_cxx_have_std_iterator=yes, ac_cv_cxx_have_std_iterator=no)
AC_LANG_RESTORE
])
HAVE_STD_ITERATOR=0
if test "$ac_cv_cxx_have_std_iterator" = yes
then
HAVE_STD_ITERATOR=1
if test "$ac_cv_cxx_have_std_iterator" = yes; then
AC_DEFINE(HAVE_STD_ITERATOR,,[define if the compiler has STL iterators])
fi
AC_SUBST(HAVE_STD_ITERATOR)])
])
#
# Check for bidirectional iterator extension. This is modified from
@@ -6050,15 +6035,15 @@ using namespace std;
ac_cv_cxx_have_bi_iterator=yes, ac_cv_cxx_have_bi_iterator=no)
AC_LANG_RESTORE
])
HAVE_BI_ITERATOR=0
if test "$ac_cv_cxx_have_bi_iterator" = yes
then
HAVE_BI_ITERATOR=1
if test "$ac_cv_cxx_have_bi_iterator" = yes; then
AC_DEFINE(HAVE_BI_ITERATOR,,[define if the compiler has bidirectional iterator])
fi
AC_SUBST(HAVE_BI_ITERATOR)])
])
#
# Check for forward iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
#
AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has forward iterators,
ac_cv_cxx_have_fwd_iterator,
@@ -6072,12 +6057,41 @@ using namespace std;
ac_cv_cxx_have_fwd_iterator=yes, ac_cv_cxx_have_fwd_iterator=no)
AC_LANG_RESTORE
])
HAVE_FWD_ITERATOR=0
if test "$ac_cv_cxx_have_fwd_iterator" = yes
then
HAVE_FWD_ITERATOR=1
if test "$ac_cv_cxx_have_fwd_iterator" = yes; then
AC_DEFINE(HAVE_FWD_ITERATOR,,[define if the compiler has STL iterators])
fi
AC_SUBST(HAVE_FWD_ITERATOR)])
])
#
# Check for slist extension. This is from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
#
AC_DEFUN([AC_CXX_HAVE_EXT_SLIST],
[AC_CACHE_CHECK(whether the compiler has ext/slist,
ac_cv_cxx_have_ext_slist,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <ext/slist>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif],[slist<int> s; return 0;],
ac_cv_cxx_have_ext_slist=std, ac_cv_cxx_have_ext_slist=no)
AC_TRY_COMPILE([#include <ext/slist>
#ifdef HAVE_NAMESPACES
using namespace __gnu_cxx;
#endif],[slist<int> s; return 0;],
ac_cv_cxx_have_ext_slist=gnu, ac_cv_cxx_have_ext_slist=no)
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_have_ext_slist" = std; then
AC_DEFINE(HAVE_EXT_SLIST,std,[define if the compiler has ext/slist])
fi
if test "$ac_cv_cxx_have_ext_slist" = gnu; then
AC_DEFINE(HAVE_EXT_SLIST,gnu,[define if the compiler has ext/slist])
fi
])
#
# Check for FLEX. This is modified from
@@ -6097,10 +6111,6 @@ fi
# Check for Bison. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html
#
# This macro verifies that Bison is installed. If successful, then
# 1) YACC is set to bison -y (to emulate YACC calls)
# 2) BISON is set to bison
#
AC_DEFUN([AC_PROG_BISON],
[AC_CACHE_CHECK(,
ac_cv_has_bison,
@@ -6109,7 +6119,7 @@ ac_cv_has_bison,
if test "$YACC" != "bison -y"; then
AC_MSG_ERROR([bison not found but required])
else
AC_SUBST(BISON,[bison],[location of bison])
AC_SUBST(YACC,[bison],[location of bison])
fi
])
@@ -6210,7 +6220,6 @@ AC_DEFUN([AC_CONFIG_MAKEFILE],
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
AC_DEFUN([AC_C_PRINTF_A],
[
AC_MSG_CHECKING([for printf %a format specifier])
AC_LANG_SAVE
AC_LANG_C
AC_RUN_IFELSE(
@@ -6230,7 +6239,6 @@ AC_DEFUN([AC_C_PRINTF_A],
return (0);]]]),
ac_c_printf_a=yes,ac_c_printf_a=no)
AC_LANG_RESTORE
AC_MSG_RESULT($ac_c_printf_a)
if test "$ac_c_printf_a" = "yes"; then
AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string])
fi
@@ -6241,7 +6249,6 @@ AC_DEFUN([AC_C_PRINTF_A],
#
AC_DEFUN([AC_LINK_USE_R],
[
AC_MSG_CHECKING([for compiler -Wl,-R<path> option])
AC_LANG_SAVE
AC_LANG_C
oldcflags="$CFLAGS"
@@ -6249,58 +6256,8 @@ AC_DEFUN([AC_LINK_USE_R],
AC_LINK_IFELSE([int main() { return 0; }],[ac_cv_link_use_r=yes],[ac_cv_link_use_r=no])
CFLAGS="$oldcflags"
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_link_use_r)
if test "$ac_cv_link_use_r" = yes
then
AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.])
fi
])
dnl AC_SINGLE_CXX_CHECK(DEFINEVAR, CACHEVAR, FUNCTION, HEADER, PROGRAM)
dnl $1, $2, $3, $4, $5
dnl
AC_DEFUN([AC_SINGLE_CXX_CHECK],
[AC_CACHE_CHECK([for $3 in $4], [$2],
[AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE(AC_LANG_SOURCE([$5]),[$2=yes],[$2=no])
AC_LANG_POP(C++)])
if test "$$2" = "yes"
then
AC_DEFINE($1, 1, [Define to 1 if your compiler defines $3 in the $4
header file.])
fi])
AC_DEFUN([AC_FUNC_ISNAN],[
AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_MATH_H], [ac_cv_func_isnan_in_math_h],
[isnan], [<math.h>],
[#include <math.h>
int foo(float f) {return isnan(f);}])
AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_CMATH], [ac_cv_func_isnan_in_cmath],
[isnan], [<cmath>],
[#include <cmath>
int foo(float f) {return isnan(f);}])
AC_SINGLE_CXX_CHECK([HAVE_STD_ISNAN_IN_CMATH], [ac_cv_func_std_isnan_in_cmath],
[std::isnan], [<cmath>],
[#include <cmath>
using std::isnan; int foo(float f) {return isnan(f);}])
])
AC_DEFUN([AC_FUNC_ISINF],[
AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_MATH_H], [ac_cv_func_isinf_in_math_h],
[isinf], [<math.h>],
[#include <math.h>
int foo(float f) {return isinf(f);}])
AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_CMATH], [ac_cv_func_isinf_in_cmath],
[isinf], [<cmath>],
[#include <cmath>
int foo(float f) {return isinf(f);}])
AC_SINGLE_CXX_CHECK([HAVE_STD_ISINF_IN_CMATH], [ac_cv_func_std_isinf_in_cmath],
[std::isinf], [<cmath>],
[#include <cmath>
using std::isinf; int foo(float f) {return isinf(f);}])
AC_SINGLE_CXX_CHECK([HAVE_FINITE_IN_IEEEFP_H], [ac_cv_func_finite_in_ieeefp_h],
[finite], [<ieeefp.h>],
[#include <ieeefp.h>
int foo(float f) {return finite(f);}])
])

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-09-07'
timestamp='2003-02-22'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -106,7 +106,6 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -197,21 +196,15 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
luna88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -227,33 +220,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips64-unknown-openbsd${UNAME_RELEASE}
echo mipseb-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
fi
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
@@ -291,12 +276,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -319,9 +303,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -339,9 +320,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -414,9 +392,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -752,7 +727,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -760,11 +735,6 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -775,7 +745,18 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -786,8 +767,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
x86:Interix*:3*)
echo i586-pc-interix3
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -808,34 +789,17 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
exit 0 ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -911,9 +875,6 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -971,9 +932,6 @@ EOF
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
@@ -1004,9 +962,6 @@ EOF
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1076,9 +1031,9 @@ EOF
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[5678]*:*)
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1176,10 +1131,9 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
@@ -1194,7 +1148,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-?:NONSTOP_KERNEL:*:*)
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1235,19 +1189,6 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms && exit 0 ;;
I*) echo ia64-dec-vms && exit 0 ;;
V*) echo vax-dec-vms && exit 0 ;;
esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2004-08-29'
timestamp='2003-02-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -118,8 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -145,7 +144,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray)
-apple | -axis)
os=
basic_machine=$1
;;
@@ -229,15 +228,14 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | mcore \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -249,7 +247,6 @@ case $basic_machine in
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
@@ -262,9 +259,9 @@ case $basic_machine in
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| tahoe | thumb | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -300,15 +297,15 @@ case $basic_machine in
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| ip2k-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -322,13 +319,11 @@ case $basic_machine in
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@@ -337,7 +332,7 @@ case $basic_machine in
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -364,9 +359,6 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -381,12 +373,6 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -446,27 +432,12 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -667,6 +638,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -747,6 +722,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -758,10 +737,6 @@ case $basic_machine in
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -793,24 +768,18 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
pentiumii | pentium2)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
pentiumii-* | pentium2-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
@@ -869,10 +838,6 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
@@ -880,9 +845,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@@ -957,6 +919,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -982,10 +948,6 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1059,9 +1021,6 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1084,7 +1043,7 @@ case $basic_machine in
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1157,20 +1116,19 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
| -powermax* | -dnix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1194,9 +1152,6 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1209,9 +1164,6 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
@@ -1233,9 +1185,6 @@ case $os in
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
@@ -1258,9 +1207,6 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
@@ -1328,9 +1274,6 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1377,9 +1320,6 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@@ -1512,15 +1452,9 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;

File diff suppressed because it is too large Load Diff

View File

@@ -1,522 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2004-05-31.23
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit 0
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# Dependencies are output in .lo.d with libtool 1.4.
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
# latter, because the former will be cleaned when $dir.libs is
# erased.
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,38 +1,19 @@
#!/bin/sh
#
# install - install a program, script, or datafile
scriptversion=2004-09-10.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright (C) 1994 X Consortium
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -42,11 +23,13 @@ scriptversion=2004-09-10.20
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -58,265 +41,211 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
src=""
dst=""
dir_arg=""
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
-d) dir_arg=true
shift
continue;;
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-d) dir_arg=true
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
--help) echo "$usage"; exit 0;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
:
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
if test -n "$dir_arg"; then
dst=$src
src=
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if [ -f $src -o -d $src ]
then
:
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
:
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
:
fi
fi
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
pathcomp=
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
:
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit; }
pathcomp="${pathcomp}/"
done
fi
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
:
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +0,0 @@
#
# Check for Bison.
#
# This macro verifies that Bison is installed. If successful, then
# 1) YACC is set to bison -y (to emulate YACC calls)
# 2) BISON is set to bison
#
AC_DEFUN([AC_PROG_BISON],
[AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()])
if test "$YACC" != "bison -y"; then
AC_MSG_ERROR([bison not found but required])
else
AC_SUBST(BISON,[bison],[location of bison])
fi])

View File

@@ -1,31 +0,0 @@
#
# Determine if the printf() functions have the %a format character.
# This is modified from:
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
AC_DEFUN([AC_C_PRINTF_A],
[AC_CACHE_CHECK([if printf has the %a format character],[llvm_cv_c_printf_a],
[AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <stdio.h>
#include <stdlib.h>
]],[[
volatile double A, B;
char Buffer[100];
A = 1;
A /= 10.0;
sprintf(Buffer, "%a", A);
B = atof(Buffer);
if (A != B)
return (1);
if (A != 0x1.999999999999ap-4)
return (1);
return (0);]])],
llvm_cv_c_printf_a=yes,
llvmac_cv_c_printf_a=no,
llvmac_cv_c_printf_a=no)
AC_LANG_POP([C])])
if test "$llvm_cv_c_printf_a" = "yes"; then
AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string])
fi
])

View File

@@ -1,26 +0,0 @@
#
# Check for GNU Make. This is originally from
# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html
#
AC_DEFUN([AC_CHECK_GNU_MAKE],
[AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command],
dnl Search all the common names for GNU make
[llvm_cv_gnu_make_command=''
for a in "$MAKE" make gmake gnumake ; do
if test -z "$a" ; then continue ; fi ;
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null )
then
llvm_cv_gnu_make_command=$a ;
break;
fi
done])
dnl If there was a GNU version, then set @ifGNUmake@ to the empty string,
dnl '#' otherwise
if test "x$llvm_cv_gnu_make_command" != "x" ; then
ifGNUmake='' ;
else
ifGNUmake='#' ;
AC_MSG_RESULT("Not found");
fi
AC_SUBST(ifGNUmake)
])

View File

@@ -1,9 +0,0 @@
#
# Configure a Makefile without clobbering it if it exists and is not out of
# date. This macro is unique to LLVM.
#
AC_DEFUN([AC_CONFIG_MAKEFILE],
[AC_CONFIG_COMMANDS($1,
[${llvm_src}/autoconf/mkinstalldirs `dirname $1`
${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/$1 $1])
])

View File

@@ -1,14 +0,0 @@
#
# Provide the arguments and other processing needed for an LLVM project
#
AC_DEFUN([LLVM_CONFIG_PROJECT],
[AC_ARG_WITH([llvmsrc],
AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),
[llvm_src="$withval"],[llvm_src=`cd ${srcdir}/../..; pwd`])
AC_SUBST(LLVM_SRC,$llvm_src)
AC_ARG_WITH([llvmobj],
AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),
[llvm_obj="$withval"],[llvm_obj=`cd ../..; pwd`])
AC_SUBST(LLVM_OBJ,$llvm_obj)
AC_CONFIG_COMMANDS([setup],,[llvm_src="${LLVM_SRC}"])
])

View File

@@ -1,22 +0,0 @@
#
# Check for bidirectional iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
#
AC_DEFUN([AC_CXX_HAVE_BI_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has the bidirectional iterator,
ac_cv_cxx_have_bi_iterator,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[bidirectional_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_bi_iterator=yes],[ac_cv_cxx_have_bi_iterator=no])
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_have_bi_iterator" = yes
then
AC_DEFINE(HAVE_BI_ITERATOR,1,[Have bi-directional iterator])
else
AC_DEFINE(HAVE_BI_ITERATOR,0,[Does not have bi-directional iterator])
fi
])

View File

@@ -1,22 +0,0 @@
# Check for forward iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has forward iterators,
ac_cv_cxx_have_fwd_iterator,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[forward_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_fwd_iterator=yes],[ac_cv_cxx_have_fwd_iterator=no])
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_have_fwd_iterator" = yes
then
AC_DEFINE(HAVE_FWD_ITERATOR,1,[Have forward iterator])
else
AC_DEFINE(HAVE_FWD_ITERATOR,0,[Does not have forward iterator])
fi
])

View File

@@ -1,59 +0,0 @@
# Check for hash_map extension. This is from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html
AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class std::hash_map],
ac_cv_cxx_have_std_ext_hash_map,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_map>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[hash_map<int, int> t;]])],[ac_cv_cxx_have_std_ext_hash_map=yes],[ac_cv_cxx_have_std_ext_hash_map=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_std_ext_hash_map" = yes
then
AC_DEFINE(HAVE_STD_EXT_HASH_MAP,1,[Have ext/hash_map>])
else
AC_DEFINE(HAVE_STD_EXT_HASH_MAP,0,[Does not have ext/hash_map>])
fi
])
AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_map> defining template class __gnu_cxx::hash_map],
ac_cv_cxx_have_gnu_ext_hash_map,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_map>
#ifdef HAVE_NAMESPACES
using namespace __gnu_cxx;
#endif]], [[hash_map<int,int> t; ]])],[ac_cv_cxx_have_gnu_ext_hash_map=yes],[ac_cv_cxx_have_gnu_ext_hash_map=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes
then
AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,1,[Have ext/hash_map])
else
AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,0,[Does not have ext/hash_map])
fi
])
AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP],
[AC_CACHE_CHECK([whether the compiler has <hash_map> defining template class ::hash_map],
ac_cv_cxx_have_global_hash_map,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hash_map>]], [[hash_map<int,int> t; ]])],[ac_cv_cxx_have_global_hash_map=yes],[ac_cv_cxx_have_global_hash_map=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_global_hash_map" = yes
then
AC_DEFINE(HAVE_GLOBAL_HASH_MAP,1,[Have <hash_map>])
else
AC_DEFINE(HAVE_GLOBAL_HASH_MAP,0,[Does not have <hash_map>])
fi
])
AC_DEFUN([AC_CXX_HAVE_HASH_MAP],
[AC_CXX_HAVE_STD_EXT_HASH_MAP
AC_CXX_HAVE_GNU_EXT_HASH_MAP
AC_CXX_HAVE_GLOBAL_HASH_MAP])

View File

@@ -1,60 +0,0 @@
# Check for hash_set extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_SET],
[AC_CACHE_CHECK([whether the compiler has <ext/hash_set> defining template class std::hash_set],
ac_cv_cxx_have_std_ext_hash_set,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_set>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]], [[hash_set<int> t; ]])],[ac_cv_cxx_have_std_ext_hash_set=yes],[ac_cv_cxx_have_std_ext_hash_set=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_std_ext_hash_set" = yes
then
AC_DEFINE(HAVE_STD_EXT_HASH_SET,1,[Have hash_set in std namespace])
else
AC_DEFINE(HAVE_STD_EXT_HASH_SET,0,[Does not have hash_set in std namespace])
fi
])
AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_SET],
[AC_CACHE_CHECK(
[whether the compiler has <ext/hash_set> defining template class __gnu_cxx::hash_set],
ac_cv_cxx_have_gnu_ext_hash_set,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ext/hash_set>
#ifdef HAVE_NAMESPACES
using namespace __gnu_cxx;
#endif]], [[hash_set<int> t; ]])],[ac_cv_cxx_have_gnu_ext_hash_set=yes],[ac_cv_cxx_have_gnu_ext_hash_set=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes
then
AC_DEFINE(HAVE_GNU_EXT_HASH_SET,1,[Have hash_set in gnu namespace])
else
AC_DEFINE(HAVE_GNU_EXT_HASH_SET,0,[Does not have hash_set in gnu namespace])
fi
])
AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET],
[AC_CACHE_CHECK([whether the compiler has <hash_set> defining template class ::hash_set],
ac_cv_cxx_have_global_hash_set,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hash_set>]], [[hash_set<int> t; return 0;]])],[ac_cv_cxx_have_global_hash_set=yes],[ac_cv_cxx_have_global_hash_set=no])
AC_LANG_POP([C++])])
if test "$ac_cv_cxx_have_global_hash_set" = yes
then
AC_DEFINE(HAVE_GLOBAL_HASH_SET,1,[Have hash_set in global namespace])
else
AC_DEFINE(HAVE_GLOBAL_HASH_SET,0,[Does not have hash_set in global namespace])
fi
])
AC_DEFUN([AC_CXX_HAVE_HASH_SET],
[AC_CXX_HAVE_STD_EXT_HASH_SET
AC_CXX_HAVE_GNU_EXT_HASH_SET
AC_CXX_HAVE_GLOBAL_HASH_SET])

View File

@@ -1,19 +0,0 @@
# Check for C++ namespace support. This is from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html
#
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[namespace Outer { namespace Inner { int i = 0; }}]],
[[using namespace Outer::Inner; return i;]])],
ac_cv_cxx_namespaces=yes,
ac_cv_cxx_namespaces=no)
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_namespaces" = yes; then
AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
fi
])

View File

@@ -1,26 +0,0 @@
# Check for standard iterator extension. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR],
[AC_CACHE_CHECK(whether the compiler has the standard iterator,
ac_cv_cxx_have_std_iterator,
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <iterator>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif]],
[[iterator<int,int,int> t; return 0;]])],
ac_cv_cxx_have_std_iterator=yes,
ac_cv_cxx_have_std_iterator=no)
AC_LANG_POP([C++])
])
if test "$ac_cv_cxx_have_std_iterator" = yes
then
AC_DEFINE(HAVE_STD_ITERATOR,1,[Have std namespace iterator])
else
AC_DEFINE(HAVE_STD_ITERATOR,0,[Does not have std namespace iterator])
fi
])

View File

@@ -1,118 +0,0 @@
dnl Check for a standard program that has a bin, include and lib directory
dnl
dnl Parameters:
dnl $1 - prefix directory to check
dnl $2 - program name to check
dnl $3 - header file to check
dnl $4 - library file to check
AC_DEFUN([CHECK_STD_PROGRAM],
[m4_define([allcapsname],translit($2,a-z,A-Z))
if test -n "$1" -a -d "$1" -a -n "$2" -a -d "$1/bin" -a -x "$1/bin/$2" ; then
AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"])
AC_SUBST(allcapsname(),[$1/bin/$2])
AC_SUBST(allcapsname()[_BIN],[$1/bin])
AC_SUBST(allcapsname()[_DIR],[$1])
if test -n "$3" -a -d "$1/include" -a -f "$1/include/$3" ; then
AC_SUBST(allcapsname()[_INC],[$1/include])
fi
if test -n "$4" -a -d "$1/lib" -a -f "$1/lib/$4" ; then
AC_SUBST(allcapsname()[_LIB],[$1/lib])
fi
fi
])
dnl Find a program via --with options, in the path, or well known places
dnl
dnl Parameters:
dnl $1 - program's executable name
dnl $2 - header file name to check (optional)
dnl $3 - library file name to check (optional)
dnl $4 - alternate (long) name for the program
AC_DEFUN([FIND_STD_PROGRAM],
[m4_define([allcapsname],translit($1,a-z,A-Z))
m4_define([stdprog_long_name],ifelse($4,,translit($1,[ !@#$%^&*()-+={}[]:;"',./?],[-]),translit($4,[ !@#$%^&*()-+={}[]:;"',./?],[-])))
AC_MSG_CHECKING([for ]stdprog_long_name()[ bin/lib/include locations])
AC_ARG_WITH($1,
AS_HELP_STRING([--with-]stdprog_long_name()[=DIR],
[Specify that the ]stdprog_long_name()[ install prefix is DIR]),
$1[pfxdir=$withval],$1[pfxdir=nada])
AC_ARG_WITH($1[-bin],
AS_HELP_STRING([--with-]stdprog_long_name()[-bin=DIR],
[Specify that the ]stdprog_long_name()[ binary is in DIR]),
$1[bindir=$withval],$1[bindir=nada])
AC_ARG_WITH($1[-lib],
AS_HELP_STRING([--with-]stdprog_long_name()[-lib=DIR],
[Specify that ]stdprog_long_name()[ libraries are in DIR]),
$1[libdir=$withval],$1[libdir=nada])
AC_ARG_WITH($1[-inc],
AS_HELP_STRING([--with-]stdprog_long_name()[-inc=DIR],
[Specify that the ]stdprog_long_name()[ includes are in DIR]),
$1[incdir=$withval],$1[incdir=nada])
eval pfxval=\$\{$1pfxdir\}
eval binval=\$\{$1bindir\}
eval incval=\$\{$1incdir\}
eval libvar=\$\{$1libdir\}
if test "${pfxval}" != "nada" ; then
CHECK_STD_PROGRAM(${pfxval},$1,$2,$3)
elif test "${binval}" != "nada" ; then
if test "${libval}" != "nada" ; then
if test "${incval}" != "nada" ; then
if test -d "${binval}" ; then
if test -d "${incval}" ; then
if test -d "${libval}" ; then
AC_SUBST(allcapsname(),${binval}/$1)
AC_SUBST(allcapsname()[_BIN],${binval})
AC_SUBST(allcapsname()[_INC],${incval})
AC_SUBST(allcapsname()[_LIB],${libval})
AC_SUBST([USE_]allcapsname(),[1])
AC_MSG_RESULT([found via --with options])
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-libdir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-incdir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-bindir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-incdir option must be specified])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-libdir option must be specified])
fi
else
tmppfxdir=`which $1 2>&1`
if test -n "$tmppfxdir" -a -d "${tmppfxdir%*$1}" -a \
-d "${tmppfxdir%*$1}/.." ; then
tmppfxdir=`cd "${tmppfxdir%*$1}/.." ; pwd`
CHECK_STD_PROGRAM($tmppfxdir,$1,$2,$3)
AC_MSG_RESULT([found in PATH at ]$tmppfxdir)
else
checkresult="yes"
eval checkval=\$\{"USE_"allcapsname()\}
CHECK_STD_PROGRAM([/usr],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/usr/local],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/sw],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/opt],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/],$1,$2,$3)
if test -z "${checkval}" ; then
checkresult="no"
fi
fi
fi
fi
fi
AC_MSG_RESULT($checkresult)
fi
fi
])

View File

@@ -1,17 +0,0 @@
#
# Check for FLEX.
#
# This macro verifies that flex is installed. If successful, then
# 1) $LEX is set to "flex" (to emulate lex calls)
# 2) BISON is set to bison
AC_DEFUN([AC_PROG_FLEX],
[AC_CACHE_CHECK(,
ac_cv_has_flex,
[AC_PROG_LEX()
])
if test "$LEX" != "flex"; then
AC_MSG_ERROR([flex not found but required])
else
AC_SUBST(FLEX,[flex],[location of flex])
fi
])

View File

@@ -1,36 +0,0 @@
#
# This function determins if the the isinf function isavailable on this
# platform.
#
AC_DEFUN([AC_FUNC_ISINF],[
AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h],
[isinf], [<math.h>],
[float f; isinf(f);])
if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then
AC_DEFINE([HAVE_ISINF_IN_MATH_H],1,[Set to 1 if the isinf function is found in <math.h>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath],
[isinf], [<cmath>],
[float f; isinf(f);])
if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_ISINF_IN_CMATH],1,[Set to 1 if the isinf function is found in <cmath>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath],
[std::isinf], [<cmath>],
[float f; std::isinf(f)}])
if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h],
[finite], [<ieeefp.h>],
[float f; finite(f);])
if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then
AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H],1,[Set to 1 if the finite function is found in <ieeefp.h>])
fi
])

View File

@@ -1,27 +0,0 @@
#
# This function determines if the isnan function is available on this
# platform.
#
AC_DEFUN([AC_FUNC_ISNAN],[
AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h],
[isnan], [<math.h>],
[float f; isnan(f);])
if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then
AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in <math.h>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath],
[isnan], [<cmath>],
[float f; isnan(f);])
if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in <cmath>])
fi
AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath],
[std::isnan], [<cmath>],
[float f; std::isnan(f);])
if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then
AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in <cmath>])
fi
])

View File

@@ -1,26 +0,0 @@
#
# Check for the ability to mmap a file.
#
AC_DEFUN([AC_FUNC_MMAP_FILE],
[AC_CACHE_CHECK(for mmap of files,
ac_cv_func_mmap_file,
[ AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
]],[[
int fd;
fd = creat ("foo",0777);
fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0);
unlink ("foo");
return (fd != (int) MAP_FAILED);]])],
[ac_cv_func_mmap_file=yes],[ac_cv_func_mmap_file=no],[ac_cv_func_mmap_file=no])
AC_LANG_POP([C])
])
if test "$ac_cv_func_mmap_file" = yes; then
AC_DEFINE([HAVE_MMAP_FILE],[],[Define if mmap() can map files into memory])
AC_SUBST(MMAP_FILE,[yes])
fi
])

View File

@@ -1,21 +0,0 @@
#
# Check for anonymous mmap macros. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
#
AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS],
[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON,
ac_cv_header_mmap_anon,
[ AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>]],
[[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])],
ac_cv_header_mmap_anon=yes,
ac_cv_header_mmap_anon=no)
AC_LANG_POP([C])
])
if test "$ac_cv_header_mmap_anon" = yes; then
AC_DEFINE([HAVE_MMAP_ANONYMOUS],[1],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON])
fi
])

View File

@@ -1,19 +0,0 @@
#
# Determine if the system can handle the -R option being passed to the linker.
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_LINK_USE_R],
[AC_CACHE_CHECK([for compiler -Wl,-R<path> option],[llvm_cv_link_use_r],
[ AC_LANG_PUSH([C])
oldcflags="$CFLAGS"
CFLAGS="$CFLAGS -Wl,-R."
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[int main() { return 0; }]])],
[llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no])
CFLAGS="$oldcflags"
AC_LANG_POP([C])
])
if test "$llvm_cv_link_use_r" = yes ; then
AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.])
fi
])

View File

@@ -1,427 +0,0 @@
## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
## Copyright (C) 1999-2000 Free Software Foundation, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 6 AC_LIB_LTDL
# AC_WITH_LTDL
# ------------
# Clients of libltdl can use this macro to allow the installer to
# choose between a shipped copy of the ltdl sources or a preinstalled
# version of the library.
AC_DEFUN([AC_WITH_LTDL],
[AC_REQUIRE([AC_LIB_LTDL])
AC_SUBST([LIBLTDL])
AC_SUBST([INCLTDL])
# Unless the user asks us to check, assume no installed ltdl exists.
use_installed_libltdl=no
AC_ARG_WITH([included_ltdl],
[ --with-included-ltdl use the GNU ltdl sources included here])
if test "x$with_included_ltdl" != xyes; then
# We are not being forced to use the included libltdl sources, so
# decide whether there is a useful installed version we can use.
AC_CHECK_HEADER([ltdl.h],
[AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
[with_included_ltdl=no],
[with_included_ltdl=yes])
])
fi
if test "x$enable_ltdl_install" != xyes; then
# If the user did not specify an installable libltdl, then default
# to a convenience lib.
AC_LIBLTDL_CONVENIENCE
fi
if test "x$with_included_ltdl" = xno; then
# If the included ltdl is not to be used. then Use the
# preinstalled libltdl we found.
AC_DEFINE([HAVE_LTDL], 1,
[Define this if a modern libltdl is already installed])
LIBLTDL=-lltdl
fi
# Report our decision...
AC_MSG_CHECKING([whether to use included libltdl])
AC_MSG_RESULT([$with_included_ltdl])
AC_CONFIG_SUBDIRS([libltdl])
])# AC_WITH_LTDL
# AC_LIB_LTDL
# -----------
# Perform all the checks necessary for compilation of the ltdl objects
# -- including compiler checks and header checks.
AC_DEFUN([AC_LIB_LTDL],
[AC_PREREQ(2.59)
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_C_CONST])
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([_LT_AC_CHECK_DLFCN])
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
AC_REQUIRE([AC_LTDL_SHLIBEXT])
AC_REQUIRE([AC_LTDL_SHLIBPATH])
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
AC_REQUIRE([AC_LTDL_OBJDIR])
AC_REQUIRE([AC_LTDL_DLPREOPEN])
AC_REQUIRE([AC_LTDL_DLLIB])
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
stdio.h unistd.h])
AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h])
AC_CHECK_HEADERS([string.h strings.h], [break])
AC_CHECK_FUNCS([strchr index], [break])
AC_CHECK_FUNCS([strrchr rindex], [break])
AC_CHECK_FUNCS([memcpy bcopy], [break])
AC_CHECK_FUNCS([memmove strcmp])
AC_CHECK_FUNCS([closedir opendir readdir])
])# AC_LIB_LTDL
# AC_LTDL_ENABLE_INSTALL
# ----------------------
AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
[AC_ARG_ENABLE([ltdl-install],
[AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
])])# AC_LTDL_ENABLE_INSTALL
# AC_LTDL_SYS_DLOPEN_DEPLIBS
# --------------------------
AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
[libltdl_cv_sys_dlopen_deplibs],
[# PORTME does your system automatically load deplibs for dlopen?
# or its logical equivalent (e.g. shl_load for HP-UX < 11)
# For now, we just catch OSes we know something about -- in the
# future, we'll try test this programmatically.
libltdl_cv_sys_dlopen_deplibs=unknown
case "$host_os" in
aix3*|aix4.1.*|aix4.2.*)
# Unknown whether this is true for these versions of AIX, but
# we want this `case' here to explicitly catch those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
aix[[45]]*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
darwin*)
# Assuming the user has installed a libdl from somewhere, this is true
# If you are looking for one http://www.opendarwin.org/projects/dlcompat
libltdl_cv_sys_dlopen_deplibs=yes
;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
# GNU and its variants, using gnu ld.so (Glibc)
libltdl_cv_sys_dlopen_deplibs=yes
;;
hpux10*|hpux11*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
irix[[12345]]*|irix6.[[01]]*)
# Catch all versions of IRIX before 6.2, and indicate that we don't
# know how it worked for any of those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
irix*)
# The case above catches anything before 6.2, and it's known that
# at 6.2 and later dlopen does load deplibs.
libltdl_cv_sys_dlopen_deplibs=yes
;;
netbsd*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
openbsd*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
osf[[1234]]*)
# dlopen did load deplibs (at least at 4.x), but until the 5.x series,
# it did *not* use an RPATH in a shared library to find objects the
# library depends on, so we explictly say `no'.
libltdl_cv_sys_dlopen_deplibs=no
;;
osf5.0|osf5.0a|osf5.1)
# dlopen *does* load deplibs and with the right loader patch applied
# it even uses RPATH in a shared library to search for shared objects
# that the library depends on, but there's no easy way to know if that
# patch is installed. Since this is the case, all we can really
# say is unknown -- it depends on the patch being installed. If
# it is, this changes to `yes'. Without it, it would be `no'.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
osf*)
# the two cases above should catch all versions of osf <= 5.1. Read
# the comments above for what we know about them.
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library
# is used to find them so we can finally say `yes'.
libltdl_cv_sys_dlopen_deplibs=yes
;;
solaris*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
esac
])
if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
[Define if the OS needs help to load dependent libraries for dlopen().])
fi
])# AC_LTDL_SYS_DLOPEN_DEPLIBS
# AC_LTDL_SHLIBEXT
# ----------------
AC_DEFUN([AC_LTDL_SHLIBEXT],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([which extension is used for loadable modules],
[libltdl_cv_shlibext],
[
module=yes
eval libltdl_cv_shlibext=$shrext_cmds
])
if test -n "$libltdl_cv_shlibext"; then
AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
[Define to the extension used for shared libraries, say, ".so".])
fi
])# AC_LTDL_SHLIBEXT
# AC_LTDL_SHLIBPATH
# -----------------
AC_DEFUN([AC_LTDL_SHLIBPATH],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([which variable specifies run-time library path],
[libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
if test -n "$libltdl_cv_shlibpath_var"; then
AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
[Define to the name of the environment variable that determines the dynamic library search path.])
fi
])# AC_LTDL_SHLIBPATH
# AC_LTDL_SYSSEARCHPATH
# ---------------------
AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([for the default library search path],
[libltdl_cv_sys_search_path],
[libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
if test -n "$libltdl_cv_sys_search_path"; then
sys_search_path=
for dir in $libltdl_cv_sys_search_path; do
if test -z "$sys_search_path"; then
sys_search_path="$dir"
else
sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
fi
done
AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
[Define to the system default library search path.])
fi
])# AC_LTDL_SYSSEARCHPATH
# AC_LTDL_OBJDIR
# --------------
AC_DEFUN([AC_LTDL_OBJDIR],
[AC_CACHE_CHECK([for objdir],
[libltdl_cv_objdir],
[libltdl_cv_objdir="$objdir"
if test -n "$objdir"; then
:
else
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
libltdl_cv_objdir=.libs
else
# MS-DOS does not allow filenames that begin with a dot.
libltdl_cv_objdir=_libs
fi
rmdir .libs 2>/dev/null
fi
])
AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
[Define to the sub-directory in which libtool stores uninstalled libraries.])
])# AC_LTDL_OBJDIR
# AC_LTDL_DLPREOPEN
# -----------------
AC_DEFUN([AC_LTDL_DLPREOPEN],
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
[libltdl_cv_preloaded_symbols],
[if test -n "$lt_cv_sys_global_symbol_pipe"; then
libltdl_cv_preloaded_symbols=yes
else
libltdl_cv_preloaded_symbols=no
fi
])
if test x"$libltdl_cv_preloaded_symbols" = xyes; then
AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
[Define if libtool can extract symbol lists from object files.])
fi
])# AC_LTDL_DLPREOPEN
# AC_LTDL_DLLIB
# -------------
AC_DEFUN([AC_LTDL_DLLIB],
[LIBADD_DL=
AC_SUBST(LIBADD_DL)
AC_LANG_PUSH([C])
AC_CHECK_FUNC([shl_load],
[AC_DEFINE([HAVE_SHL_LOAD], [1],
[Define if you have the shl_load function.])],
[AC_CHECK_LIB([dld], [shl_load],
[AC_DEFINE([HAVE_SHL_LOAD], [1],
[Define if you have the shl_load function.])
LIBADD_DL="$LIBADD_DL -ldld"],
[AC_CHECK_LIB([dl], [dlopen],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
# include <dlfcn.h>
#endif
]], [[dlopen(0, 0);]])],[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],[AC_CHECK_LIB([svld], [dlopen],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"],
[AC_CHECK_LIB([dld], [dld_link],
[AC_DEFINE([HAVE_DLD], [1],
[Define if you have the GNU dld library.])
LIBADD_DL="$LIBADD_DL -ldld"],
[AC_CHECK_FUNC([_dyld_func_lookup],
[AC_DEFINE([HAVE_DYLD], [1],
[Define if you have the _dyld_func_lookup function.])])
])
])
])
])
])
])
if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
then
lt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
AC_CHECK_FUNCS([dlerror])
LIBS="$lt_save_LIBS"
fi
AC_LANG_POP
])# AC_LTDL_DLLIB
# AC_LTDL_SYMBOL_USCORE
# ---------------------
# does the compiler prefix global symbols with an underscore?
AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
AC_CACHE_CHECK([for _ prefix in compiled symbols],
[ac_cv_sys_symbol_underscore],
[ac_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<EOF
void nm_test_func(){}
int main(){nm_test_func;return 0;}
EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
ac_nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
# See whether the symbols have a leading underscore.
if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
ac_cv_sys_symbol_underscore=yes
else
if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
:
else
echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD()
fi
fi
else
echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD()
fi
else
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD()
cat conftest.c >&AS_MESSAGE_LOG_FD()
fi
rm -rf conftest*
])
])# AC_LTDL_SYMBOL_USCORE
# AC_LTDL_DLSYM_USCORE
# --------------------
AC_DEFUN([AC_LTDL_DLSYM_USCORE],
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
if test x"$ac_cv_sys_symbol_underscore" = xyes; then
if test x"$libltdl_cv_func_dlopen" = xyes ||
test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
[libltdl_cv_need_uscore],
[libltdl_cv_need_uscore=unknown
save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
_LT_AC_TRY_DLOPEN_SELF(
[libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
[], [libltdl_cv_need_uscore=cross])
LIBS="$save_LIBS"
])
fi
fi
if test x"$libltdl_cv_need_uscore" = xyes; then
AC_DEFINE(NEED_USCORE, 1,
[Define if dlsym() requires a leading underscore in symbol names.])
fi
])# AC_LTDL_DLSYM_USCORE
# AC_LTDL_FUNC_ARGZ
# -----------------
AC_DEFUN([AC_LTDL_FUNC_ARGZ],
[AC_CHECK_HEADERS([argz.h])
AC_CHECK_TYPES([error_t],
[],
[AC_DEFINE([error_t], [int],
[Define to a type to use for `error_t' if it is not otherwise available.])],
[#if HAVE_ARGZ_H
# include <argz.h>
#endif])
AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
])# AC_LTDL_FUNC_ARGZ

View File

@@ -1,17 +0,0 @@
#
# When allocating RWX memory, check whether we need to use /dev/zero
# as the file descriptor or not.
#
AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP],
[AC_CACHE_CHECK([if /dev/zero is needed for mmap],
ac_cv_need_dev_zero_for_mmap,
[if test "$llvm_cv_os_type" = "Interix" ; then
ac_cv_need_dev_zero_for_mmap=yes
else
ac_cv_need_dev_zero_for_mmap=no
fi
])
if test "$ac_cv_need_dev_zero_for_mmap" = yes; then
AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1],
[Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary])
fi])

View File

@@ -1,39 +0,0 @@
dnl This macro checks for tclsh which is required to run dejagnu. On some
dnl platforms (notably FreeBSD), tclsh is named tclshX.Y - this handles
dnl that for us so we can get the latest installed tclsh version.
dnl
AC_DEFUN([DJ_AC_PATH_TCLSH], [
no_itcl=true
AC_MSG_CHECKING(for the tclsh program in tclinclude directory)
AC_ARG_WITH(tclinclude,
AS_HELP_STRING([--with-tclinclude],
[directory where tcl headers are]),
[with_tclinclude=${withval}],[with_tclinclude=''])
AC_CACHE_VAL(ac_cv_path_tclsh,[
dnl first check to see if --with-itclinclude was specified
if test x"${with_tclinclude}" != x ; then
if test -f ${with_tclinclude}/tclsh ; then
ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)`
elif test -f ${with_tclinclude}/src/tclsh ; then
ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)`
else
AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh])
fi
fi
dnl see if one is installed
if test x"${ac_cv_path_tclsh}" = x ; then
AC_MSG_RESULT(none)
AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh])
if test x"${TCLSH}" = x ; then
ac_cv_path_tclsh='';
else
ac_cv_path_tclsh="${TCLSH}";
fi
else
AC_MSG_RESULT(${ac_cv_path_tclsh})
TCLSH="${ac_cv_path_tclsh}"
AC_SUBST(TCLSH)
fi
])])

View File

@@ -1,12 +0,0 @@
#
# This function determins if the the srand48,drand48,lrand48 functions are
# available on this platform.
#
AC_DEFUN([AC_FUNC_RAND48],[
AC_SINGLE_CXX_CHECK([ac_cv_func_rand48],
[srand48/lrand48/drand48], [<stdlib.h>],
[srand48(0);lrand48();drand48();])
if test "$ac_cv_func_rand48" = "yes" ; then
AC_DEFINE([HAVE_RAND48],1,[Define to 1 if srand48/lrand48/drand48 exist in <stdlib.h>])
fi
])

View File

@@ -1,22 +0,0 @@
dnl Check a program for version sanity. The test runs a program, passes it an
dnl argument to make it print out some identification string, and filters that
dnl output with a regular expression. If the output is non-empty, the program
dnl passes the sanity check.
dnl $1 - Name or full path of the program to run
dnl $2 - Argument to pass to print out identification string
dnl $3 - grep RE to match identification string
AC_DEFUN([CHECK_PROGRAM_SANITY],
[
AC_MSG_CHECKING([sanity for program ]$1)
sanity_path=`which $1 2>/dev/null`
if test "$?" -eq 0 -a -x "$sanity_path" ; then
sanity=`$1 $2 2>&1 | grep "$3"`
if test -z "$sanity" ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.])
fi
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([not found])
fi
])

View File

@@ -1,10 +0,0 @@
dnl AC_SINGLE_CXX_CHECK(CACHEVAR, FUNCTION, HEADER, PROGRAM)
dnl $1, $2, $3, $4,
dnl
AC_DEFUN([AC_SINGLE_CXX_CHECK],
[AC_CACHE_CHECK([for $2 in $3], [$1],
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include $3],[$4]),[$1=yes],[$1=no])
AC_LANG_POP([C++])])
])

View File

@@ -1,353 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit 0
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit 0
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,56 +1,31 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Public domain
# $Id$
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
@@ -63,88 +38,64 @@ do
done
case $# in
0) exit 0 ;;
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
# echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
# echo "mkdir $pathcomp"
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
# echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
if test ! -z "$lasterr"; then
errstatus=$lasterr
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# sh-indentation: 3
# End:
# mkinstalldirs ends here

19215
llvm/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
doxygen.cfg
doxygen
doxygen.out
*.tar.gz

File diff suppressed because it is too large Load Diff

View File

@@ -1,238 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>LLVM bugpoint tool: design and usage</title>
<link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<div class="doc_title">
LLVM bugpoint tool: design and usage
</div>
<ul>
<li><a href="#desc">Description</a></li>
<li><a href="#design">Design Philosophy</a>
<ul>
<li><a href="#autoselect">Automatic Debugger Selection</a></li>
<li><a href="#crashdebug">Crash debugger</a></li>
<li><a href="#codegendebug">Code generator debugger</a></li>
<li><a href="#miscompilationdebug">Miscompilation debugger</a></li>
</ul></li>
<li><a href="#advice">Advice for using <tt>bugpoint</tt></a></li>
</ul>
<div class="doc_author">
<p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="desc">Description</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p><tt>bugpoint</tt> narrows down the source of problems in LLVM tools and
passes. It can be used to debug three types of failures: optimizer crashes,
miscompilations by optimizers, or bad native code generation (including problems
in the static and JIT compilers). It aims to reduce large test cases to small,
useful ones. For example, if <tt>gccas</tt> crashes while optimizing a
file, it will identify the optimization (or combination of optimizations) that
causes the crash, and reduce the file down to a small example which triggers the
crash.</p>
<p>For detailed case scenarios, such as debugging <tt>gccas</tt>,
<tt>gccld</tt>, or one of the LLVM code generators, see <a
href="HowToSubmitABug.html">How To Submit a Bug Report document</a>.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="design">Design Philosophy</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p><tt>bugpoint</tt> is designed to be a useful tool without requiring any
hooks into the LLVM infrastructure at all. It works with any and all LLVM
passes and code generators, and does not need to "know" how they work. Because
of this, it may appear to do stupid things or miss obvious
simplifications. <tt>bugpoint</tt> is also designed to trade off programmer
time for computer time in the compiler-debugging process; consequently, it may
take a long period of (unattended) time to reduce a test case, but we feel it
is still worth it. Note that <tt>bugpoint</tt> is generally very quick unless
debugging a miscompilation where each test of the program (which requires
executing it) takes a long time.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="autoselect">Automatic Debugger Selection</a>
</div>
<div class="doc_text">
<p><tt>bugpoint</tt> reads each <tt>.bc</tt> or <tt>.ll</tt> file specified on
the command line and links them together into a single module, called the test
program. If any LLVM passes are specified on the command line, it runs these
passes on the test program. If any of the passes crash, or if they produce
malformed output (which causes the verifier to abort), <tt>bugpoint</tt> starts
the <a href="#crashdebug">crash debugger</a>.</p>
<p>Otherwise, if the <tt>-output</tt> option was not specified,
<tt>bugpoint</tt> runs the test program with the C backend (which is assumed to
generate good code) to generate a reference output. Once <tt>bugpoint</tt> has
a reference output for the test program, it tries executing it with the
selected code generator. If the selected code generator crashes,
<tt>bugpoint</tt> starts the <a href="#crashdebug">crash debugger</a> on the
code generator. Otherwise, if the resulting output differs from the reference
output, it assumes the difference resulted from a code generator failure, and
starts the <a href="#codegendebug">code generator debugger</a>.</p>
<p>Finally, if the output of the selected code generator matches the reference
output, <tt>bugpoint</tt> runs the test program after all of the LLVM passes
have been applied to it. If its output differs from the reference output, it
assumes the difference resulted from a failure in one of the LLVM passes, and
enters the <a href="#miscompilationdebug">miscompilation debugger</a>.
Otherwise, there is no problem <tt>bugpoint</tt> can debug.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="crashdebug">Crash debugger</a>
</div>
<div class="doc_text">
<p>If an optimizer or code generator crashes, <tt>bugpoint</tt> will try as hard
as it can to reduce the list of passes (for optimizer crashes) and the size of
the test program. First, <tt>bugpoint</tt> figures out which combination of
optimizer passes triggers the bug. This is useful when debugging a problem
exposed by <tt>gccas</tt>, for example, because it runs over 38 passes.</p>
<p>Next, <tt>bugpoint</tt> tries removing functions from the test program, to
reduce its size. Usually it is able to reduce a test program to a single
function, when debugging intraprocedural optimizations. Once the number of
functions has been reduced, it attempts to delete various edges in the control
flow graph, to reduce the size of the function as much as possible. Finally,
<tt>bugpoint</tt> deletes any individual LLVM instructions whose absence does
not eliminate the failure. At the end, <tt>bugpoint</tt> should tell you what
passes crash, give you a bytecode file, and give you instructions on how to
reproduce the failure with <tt>opt</tt>, <tt>analyze</tt>, or <tt>llc</tt>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="codegendebug">Code generator debugger</a>
</div>
<div class="doc_text">
<p>The code generator debugger attempts to narrow down the amount of code that
is being miscompiled by the selected code generator. To do this, it takes the
test program and partitions it into two pieces: one piece which it compiles
with the C backend (into a shared object), and one piece which it runs with
either the JIT or the static LLC compiler. It uses several techniques to
reduce the amount of code pushed through the LLVM code generator, to reduce the
potential scope of the problem. After it is finished, it emits two bytecode
files (called "test" [to be compiled with the code generator] and "safe" [to be
compiled with the C backend], respectively), and instructions for reproducing
the problem. The code generator debugger assumes that the C backend produces
good code.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="miscompilationdebug">Miscompilation debugger</a>
</div>
<div class="doc_text">
<p>The miscompilation debugger works similarly to the code generator debugger.
It works by splitting the test program into two pieces, running the
optimizations specified on one piece, linking the two pieces back together, and
then executing the result. It attempts to narrow down the list of passes to
the one (or few) which are causing the miscompilation, then reduce the portion
of the test program which is being miscompiled. The miscompilation debugger
assumes that the selected code generator is working properly.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="advice">Advice for using bugpoint</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<tt>bugpoint</tt> can be a remarkably useful tool, but it sometimes works in
non-obvious ways. Here are some hints and tips:<p>
<ol>
<li>In the code generator and miscompilation debuggers, <tt>bugpoint</tt> only
works with programs that have deterministic output. Thus, if the program
outputs <tt>argv[0]</tt>, the date, time, or any other "random" data,
<tt>bugpoint</tt> may misinterpret differences in these data, when output,
as the result of a miscompilation. Programs should be temporarily modified
to disable outputs that are likely to vary from run to run.
<li>In the code generator and miscompilation debuggers, debugging will go
faster if you manually modify the program or its inputs to reduce the
runtime, but still exhibit the problem.
<li><tt>bugpoint</tt> is extremely useful when working on a new optimization:
it helps track down regressions quickly. To avoid having to relink
<tt>bugpoint</tt> every time you change your optimization however, have
<tt>bugpoint</tt> dynamically load your optimization with the
<tt>-load</tt> option.
<li><p><tt>bugpoint</tt> can generate a lot of output and run for a long period
of time. It is often useful to capture the output of the program to file.
For example, in the C shell, you can run:</p>
<div class="doc_code">
<p><tt>bugpoint ... |&amp; tee bugpoint.log</tt></p>
</div>
<p>to get a copy of <tt>bugpoint</tt>'s output in the file
<tt>bugpoint.log</tt>, as well as on your terminal.</p>
<li><tt>bugpoint</tt> cannot debug problems with the LLVM linker. If
<tt>bugpoint</tt> crashes before you see its "All input ok" message,
you might try <tt>llvm-link -v</tt> on the same set of input files. If
that also crashes, you may be experiencing a linker bug.
<li>If your program is <b>supposed</b> to crash, <tt>bugpoint</tt> will be
confused. One way to deal with this is to cause bugpoint to ignore the exit
code from your program, by giving it the <tt>-check-exit-code=false</tt>
option.
</ol>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="llvm.css" type="text/css" media="screen">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="llvm.css" type="text/css" media="screen" />
<title>Bootstrapping the LLVM C/C++ Front-End</title>
</head>
<body>
@@ -14,18 +13,12 @@
<ol>
<li><a href="#cautionarynote">A Cautionary Note</a>
<ul>
<li><a href="#cygwin">Building under Cygwin</a></li>
<li><a href="#aix">Building under AIX</a></li>
</ul>
</li>
<li><a href="#instructions">Instructions</a></li>
<li><a href="#license">License Information</a></li>
<li><a href="#instructions">Instructions</a>
<li><a href="#license">License Information</a>
</ol>
<div class="doc_author">
<p>Written by Brian R. Gaeke and
<a href="http://nondot.org/sabre">Chris Lattner</a></p>
<div class="doc_text">
<p><b>Written by Brian R. Gaeke</b></p>
</div>
<!-- *********************************************************************** -->
@@ -45,53 +38,13 @@ process, and you should <b>only</b> try to do it if:</p>
<ol>
<li>you really, really, really can't use the binaries we distribute</li>
<li>you need GCC to fix some of the header files on your system</li>
<li>you are an elite GCC hacker.</li>
<li>you want to use the latest bits from CVS.</li>
</ol>
<p>We welcome patches to help make this process simpler.</p>
</div>
<!--=========================================================================-->
<div class="doc_subsection">
<a name="cygwin">Building under Cygwin</a>
</div>
<!--=========================================================================-->
<div class="doc_text">
<p>If you are building LLVM and the GCC front-end under Cygwin, please note that
the LLVM and GCC makefiles do not correctly handle spaces in paths. To deal
with this issue, make sure that your LLVM and GCC source and build trees are
located in a top-level directory (like <tt>/cygdrive/c/llvm</tt> and
<tt>/cygdrive/c/llvm-cfrontend</tt>), not in a directory that contains a space
(which includes your "home directory", because it lives under the "Documents
and Settings" directory). We welcome patches to fix this issue.
</p>
<p>It has been found that the GCC 3.3.3 compiler provided with recent Cygwin
versions is incapable of compiling the LLVM GCC front-end correctly. If your
Cygwin
installation includes GCC 3.3.3, we <i>strongly</i> recommend that you download
GCC 3.4.3, build it separately, and use it for compiling the LLVM GCC front-end. This has been
shown to work correctly.</p>
<p>Some versions of Cygwin utilize an experimental version of GNU binutils that
will cause the GNU <tt>ld</tt> linker to fail an assertion when linking
components of the libstdc++. It is recommended that you replace the entire
binutils package with version 2.15 such that "<tt>ld --version</tt>" responds
with</p>
<pre>GNU ld version 2.15</pre>
not with:<br/>
<pre>GNU ld version 2.15.91 20040725</pre>
</div>
<!--=========================================================================-->
<div class="doc_subsection"><a name="aix">Building under AIX</a></div>
<div class="doc_text">
<p>If you are building LLVM and the GCC front-end under AIX, do NOT use GNU
Binutils. They are not stable under AIX and may produce incorrect and/or
invalid code. Instead, use the system assembler and linker.
</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="instructions">Instructions</a>
@@ -101,40 +54,29 @@ invalid code. Instead, use the system assembler and linker.
<div class="doc_text">
<p>
<ol>
<li><p>Configure and build the LLVM libraries and tools. There are two ways to
do this: either with <i>objdir</i> == <i>srcdir</i> or
<i>objdir</i> != <i>srcdir</i>. It is recommended
that <i>srcdir</i> be the same as <i>objdir</i> for your LLVM tree (but note
that you should always use <i>srcdir</i> != <i>objdir</i> for llvm-gcc):</p>
<ul>
<li>With <i>objdir</i> != <i>srcdir</i>:<pre>
% cd <i>objdir</i>
% <i>srcdir</i>/configure --prefix=/some/path/you/can/install/to [options...]
% gmake tools-only
</pre></li>
<li>With <i>objdir</i> == <i>srcdir</i>:<pre>
<li><p>Configure and build the LLVM libraries and tools using:</p>
<pre>
% cd llvm
% ./configure --prefix=/some/path/you/can/install/to [options...]
% ./configure [options...]
% gmake tools-only
</pre></li>
</ul>
<p>This will build all of the LLVM tools and libraries. The <tt>--prefix</tt>
option defaults to /usr/local (per configure standards) but unless you are a
system administrator, you probably won't be able to install LLVM there because
of permissions. Specify a path into which LLVM can be installed (e.g.
<tt>--prefix=/home/user/llvm</tt>).</p>
</li>
</pre>
<p>The use of the non-default target "tools-only" means that the
LLVM tools and libraries will build, and the binaries will be
deposited in llvm/tools/Debug, but the runtime (bytecode)
libraries will not build.</p></li>
<li><p>Add the directory containing the tools to your PATH.</p>
<pre>
% set path = ( `cd llvm/Debug/bin &amp;&amp; pwd` $path )
% set path = ( `cd llvm/tools/Debug &amp;&amp; pwd` $path )
</pre></li>
<li><p>Unpack the C/C++ front-end source into cfrontend/src, either by
untar'ing a cfrontend.source.tar.gz file or checking out CVS into this
directory.</p></li>
<li><p>Unpack the C/C++ front-end source into cfrontend/src.</p></li>
<li><p>Make "build" and "install" directories as siblings of the "src" tree:</p>
<li><p>Edit src/configure. Change the first line (starting w/ #!) to
contain the correct full pathname of sh.</p></li>
<li><p>Make "build" and "install" directories as siblings of the "src"
tree.</p>
<pre>
% pwd
/usr/local/example/cfrontend/src
@@ -143,56 +85,53 @@ of permissions. Specify a path into which LLVM can be installed (e.g.
% set CFEINSTALL = `pwd`/install
</pre></li>
<li><p>Configure, build, and install the GCC front-end:</p>
<li><p>Configure, build, and install the C front-end:</p>
<p>
<b>Linux/x86:</b><br>
<b>Linux/IA-64:</b><br>
<b>MacOS X/PowerPC</b> (requires dlcompat library):<br>
<b>AIX/PowerPC:</b>
<b>Linux/x86:</b>
</p>
<pre>
% cd build
% ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls \
--disable-shared --enable-languages=c,c++ --program-prefix=llvm-
% ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls --disable-shared \
--enable-languages=c,c++
% gmake all-gcc
% setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
% gmake all; gmake install
</pre>
<p><b>Cygwin/x86:</b></p>
<p>
<b>Solaris/Sparc:</b>
</p>
<p>
For Solaris/Sparc, LLVM only supports SparcV9. Therefore, the configure
command line should like something like this:
</p>
<pre>
% cd build
% ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls \
--disable-shared --enable-languages=c,c++ --disable-c-mbchar \
--program-prefix=llvm-
% gmake all; gmake install
% ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls --disable-shared \
--enable-languages=c,c++ --host=sparcv9-sun-solaris2.8
% gmake all-gcc
% setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
% gmake all
</pre>
<p><b>Solaris/SPARC:</b></p>
<p>
The GCC front-end can be configured for either SPARC V8 (32 bit) or SPARC V9 (64
bit). This changes, among other things, the sizes of integer types and the
macros defined for conditional compilation.
At this point, libstdc++ may fail to build because of wchar errors (look for
errors that reference <tt>vfwscanf</tt> or <tt>wcstof</tt>). If that happens,
edit <tt>sparcv9-sun-solaris2.8/libstdc++-v3/config.h</tt> and comment out the
line that defines <tt>_GLIBCXX_USE_WCHAR_T</tt>.
</p>
<p>
The SPARC V8 backend is still beta quality software. Unless you are working on
the SPARC V8 backend, you should specify sparcv9 on the configure command line,
as shown below. Also,
note that Solaris has trouble with various wide (multibyte) character
functions from C as referenced from C++, so we typically configure with
--disable-c-mbchar (cf. <a href="http://llvm.cs.uiuc.edu/PR206">Bug 206</a>).
Then, continue as below:
</p>
<pre>
% cd build
% ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls \
--disable-shared --enable-languages=c,c++ --host=sparcv9-sun-solaris2.8 \
--disable-c-mbchar --program-prefix=llvm-
% gmake all; gmake install
% gmake all
% gmake install
</pre>
<p><b>Common Problem:</b> You may get error messages regarding the fact
@@ -202,23 +141,23 @@ functions from C as referenced from C++, so we typically configure with
<ul>
<li><p><b>Fix 1:</b> If you have system header files that include
inline assembly, you may have to modify them to remove the inline
assembly and install the modified versions in
<code>$CFEINSTALL/lib/gcc/<i>target-triplet</i>/3.4-llvm/include</code>.</li>
assembly, and install the modified versions in
<code>$CFEINSTALL/<i>target-triplet</i>/sys-include</code>.</p></li>
<li><b>Fix 2:</b> If you are building the C++ front-end on a CPU we
haven't tried yet, you will probably have to edit the appropriate
version of atomicity.h under
<code>src/libstdc++-v3/config/cpu/<i>name-of-cpu</i>/atomicity.h</code>
and apply a patch so that it does not use inline assembly.</li>
and apply a patch so that it does not use inline assembly.</p></li>
</ul>
<p><b>Porting to a new architecture:</b> If you are porting the front-end
to a new architecture or compiling in a configuration that we have
not tried previously, there are probably several changes you will have to make
to the GCC target to get it to work correctly. These include:<p>
<p><b>Porting to a new architecture:</b> If you are porting the new front-end
to a new architecture, or compiling in a different configuration that we have
previously, there are probably several changes you will have to make to the GCC
target to get it to work correctly. These include:<p>
<ul>
<li>Often targets include special assembler or linker flags which
<li>Often targets include special or assembler linker flags which
<tt>gccas</tt>/<tt>gccld</tt> does not understand. In general, these can
just be removed.</li>
<li>LLVM currently does not support any floating point values other than
@@ -240,48 +179,37 @@ functions from C as referenced from C++, so we typically configure with
</ul>
</li>
<li><p>Put <tt>$CFEINSTALL/bin</tt> into your <tt>PATH</tt> environment
variable.</p>
<ul>
<li>sh: <tt>export PATH=$CFEINSTALL/bin:$PATH</tt></li>
<li>csh: <tt>setenv PATH $CFEINSTALL/bin:$PATH</tt></li>
</ul>
</li>
<li><p>Go back into the LLVM source tree proper. Edit Makefile.config
to redefine <code>LLVMGCCDIR</code> to the full pathname of the
<code>$CFEINSTALL</code> directory, which is the directory you just
installed the C front-end into. (The ./configure script is likely to
have set this to a directory which does not exist on your system.)</p></li>
<li><p>Go back into the LLVM source tree proper. Rerun configure, using
the same options as the last time. This will cause the configuration to now find
the newly built llvm-gcc and llvm-g++ executables. </p></li>
<li><p>If you edited header files during the C/C++ front-end build as
described in "Fix 1" above, you must now copy those header files from
<code>$CFEINSTALL/<i>target-triplet</i>/sys-include</code> to
<code>$CFEINSTALL/lib/gcc/<i>target-triplet</i>/3.4-llvm/include</code>.
(This should be the "include" directory in the same directory as the
libgcc.a library, which you can find by running
<code>$CFEINSTALL/bin/gcc --print-libgcc-file-name</code>.)</p></li>
<li><p>Rebuild your CVS tree. This shouldn't cause the whole thing to be
rebuilt, but it should build the runtime libraries. After the tree is
built, install the runtime libraries into your GCC front-end build tree.
These are the commands you need:</p>
<li><p>Build and install the runtime (bytecode) libraries by running:</p>
<pre>
% gmake
% gmake -C runtime install-bytecode
% gmake -C runtime
% mkdir $CFEINSTALL/bytecode-libs
% gmake -C runtime install
% setenv LLVM_LIB_SEARCH_PATH $CFEINSTALL/bytecode-libs
</pre></li>
<li><p>Optionally, build a symbol table for the newly installed runtime
libraries. Although this step is optional, you are strongly encouraged to
do this as the symbol tables will make a significant difference in your
link times. Use the <tt>llvm-ranlib</tt> tool to do this, as follows:</p>
<pre>
% cd $CFEINSTALL/lib
% llvm-ranlib libiberty.a
% llvm-ranlib libstdc++.a
% llvm-ranlib libsupc++.a
% cd $CFEINSTALL/lib/gcc/<i>target-triplet</i>/3.4-llvm
% llvm-ranlib libgcc.a
% llvm-ranlib libgcov.a
</pre>
<li><p>Test the newly-installed C frontend by one or more of the
following means:</p>
<ul>
<li> running the feature &amp; regression tests via <tt>make check</tt></li>
<li> compiling and running a "hello, LLVM" program in C and C++.</li>
<li> running the tests found in the <tt>llvm-test</tt> CVS module</li>
</ul></li>
<li> running the tests under <tt>test/Programs</tt> using <code>gmake -C
test/Programs</code></li>
</ul>
</p>
</li>
</ol>
</div>
@@ -302,26 +230,6 @@ The software also has the following additional copyrights:
</p>
<pre>
Copyright (c) 2003, 2004, 2005 University of Illinois at Urbana-Champaign.
All rights reserved.
Developed by:
LLVM Team
University of Illinois at Urbana-Champaign
http://llvm.cs.uiuc.edu
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
Copyright (c) 1994
Hewlett-Packard Company
@@ -346,19 +254,16 @@ purpose. It is provided "as is" without express or implied warranty.
</pre>
</div>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
Brian Gaeke<br>
<a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
<div class="doc_footer">
<address>Brian Gaeke</address>
<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
<br>
Last modified: $Date$
</address>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@
<ol>
<li><a href="#scf_commenting">Commenting</a></li>
<li><a href="#scf_commentformat">Comment Formatting</a></li>
<li><a href="#scf_includes"><tt>#include</tt> Style</a></li>
<li><a href="#scf_includes">#include Style</a></li>
<li><a href="#scf_codewidth">Source Code Width</a></li>
<li><a href="#scf_spacestabs">Use Spaces Instead of Tabs</a></li>
<li><a href="#scf_indentation">Indent Code Consistently</a></li>
@@ -28,8 +28,8 @@
<ol>
<li><a href="#ci_warningerrors">Treat Compiler Warnings Like
Errors</a></li>
<li><a href="#ci_cpp_features">Which C++ features can I use?</a></li>
<li><a href="#ci_portable_code">Write Portable Code</a></li>
<li><a href="#ci_class_struct">Use of class/struct Keywords</a></li>
</ol></li>
</ol></li>
<li><a href="#styleissues">Style Issues</a>
@@ -46,17 +46,14 @@
<ol>
<li><a href="#hl_assert">Assert Liberally</a></li>
<li><a href="#hl_preincrement">Prefer Preincrement</a></li>
<li><a href="#hl_avoidendl">Avoid <tt>std::endl</tt></a></li>
<li><a href="#hl_avoidendl">Avoid endl</a></li>
<li><a href="#hl_exploitcpp">Exploit C++ to its Fullest</a></li>
</ol></li>
<li><a href="#iterators">Writing Iterators</a></li>
</ol></li>
<li><a href="#seealso">See Also</a></li>
</ol>
<div class="doc_author">
<p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
@@ -111,11 +108,12 @@ href="mailto:sabre@nondot.org">Chris</a>.</p>
<div class="doc_text">
<p>Comments are one critical part of readability and maintainability. Everyone
knows they should comment, so should you. Although we all should probably
knows they should comment, so should you. :) Although we all should probably
comment our code more than we do, there are a few very critical places that
documentation is very useful:</p>
<b>File Headers</b>
<ol>
<li><h4>File Headers</h4>
<p>Every source file should have a header on it that
describes the basic purpose of the file. If a file does not have a header, it
@@ -123,51 +121,40 @@ should not be checked into CVS. Most source trees will probably have a standard
file header format. The standard format for the LLVM source tree looks like
this:</p>
<div class="doc_code">
<pre>
//===-- llvm/Instruction.h - Instruction class definition -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains the declaration of the Instruction class, which is the
// base class for all of the VM instructions.
//
//===----------------------------------------------------------------------===//
</pre>
</div>
<p>A few things to note about this particular format: The "<tt>-*- C++
<p>A few things to note about this particular format. The "<tt>-*- C++
-*-</tt>" string on the first line is there to tell Emacs that the source file
is a C++ file, not a C file (Emacs assumes .h files are C files by default).
Note that this tag is not necessary in .cpp files. The name of the file is also
on the first line, along with a very short description of the purpose of the
file. This is important when printing out code and flipping though lots of
pages.</p>
<p>The next section in the file is a concise note that defines the license that
the file is released under. This makes it perfectly clear what terms the source
code can be distributed under.</p>
is a C++ file, not a C file (Emacs assumes .h files are C files by default [Note
that tag this is not necessary in .cpp files]). The name of the file is also on
the first line, along with a very short description of the purpose of the file.
This is important when printing out code and flipping though lots of pages.</p>
<p>The main body of the description does not have to be very long in most cases.
Here it's only two lines. If an algorithm is being implemented or something
tricky is going on, a reference to the paper where it is published should be
included, as well as any notes or "gotchas" in the code to watch out for.</p>
<b>Class overviews</b>
</li>
<li><h4>Class overviews</h4>
<p>Classes are one fundemental part of a good object oriented design. As such,
a class definition should have a comment block that explains what the class is
used for... if it's not obvious. If it's so completely obvious your grandma
could figure it out, it's probably safe to leave it out. Naming classes
something sane goes a long ways towards avoiding writing documentation.</p>
something sane goes a long ways towards avoiding writing documentation. :)</p>
</li>
<b>Method information</b>
<li><h4>Method information</h4>
<p>Methods defined in a class (as well as any global functions) should also be
documented properly. A quick note about what it does any a description of the
@@ -179,6 +166,9 @@ the goal metric.</p>
<p>Good things to talk about here are what happens when something unexpected
happens: does the method return null? Abort? Format your hard disk?</p>
</li>
</ol>
</div>
<!-- _______________________________________________________________________ -->
@@ -194,9 +184,8 @@ when it is useful to use C style (<tt>/* */</tt>) comments however:</p>
<ol>
<li>When writing a C code: Obviously if you are writing C code, use C style
comments.</li>
<li>When writing a header file that may be <tt>#include</tt>d by a C source
file.</li>
comments. :)</li>
<li>When writing a header file that may be #included by a C source file.</li>
<li>When writing a source file that is used by a tool that only accepts C
style comments.</li>
</ol>
@@ -208,41 +197,40 @@ These nest properly and are better behaved in general than C style comments.</p>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="scf_includes"><tt>#include</tt> Style</a>
<a name="scf_includes">#include Style</a>
</div>
<div class="doc_text">
<p>Immediately after the <a href="#scf_commenting">header file comment</a> (and
include guards if working on a header file), the <a
href="#hl_dontinclude">minimal</a> list of <tt>#include</tt>s required by the
file should be listed. We prefer these <tt>#include</tt>s to be listed in this
order:</p>
href="hl_dontinclude">minimal</a> list of #includes required by the file should
be listed. We prefer these #includes to be listed in this order:</p>
<ol>
<li><a href="#mmheader">Main Module header</a></li>
<li><a href="#hl_privateheaders">Local/Private Headers</a></li>
<li><tt>llvm/*</tt></li>
<li><tt>llvm/Analysis/*</tt></li>
<li><tt>llvm/Assembly/*</tt></li>
<li><tt>llvm/Bytecode/*</tt></li>
<li><tt>llvm/CodeGen/*</tt></li>
<li>llvm/*</li>
<li>llvm/Analysis/*</li>
<li>llvm/Assembly/*</li>
<li>llvm/Bytecode/*</li>
<li>llvm/CodeGen/*</li>
<li>...</li>
<li><tt>Support/*</tt></li>
<li><tt>Config/*</tt></li>
<li>System <tt>#includes</tt></li>
<li>Support/*</li>
<li>Config/*</li>
<li>System #includes</li>
</ol>
<p>... and each catagory should be sorted by name.</p>
<p><a name="mmheader">The "Main Module Header"</a> file applies to .cpp file
which implement an interface defined by a .h file. This <tt>#include</tt>
should always be included <b>first</b> regardless of where it lives on the file
system. By including a header file first in the .cpp files that implement the
interfaces, we ensure that the header does not have any hidden dependencies
which are not explicitly #included in the header, but should be. It is also a
form of documentation in the .cpp file to indicate where the interfaces it
implements are defined.</p>
which implement an interface defined by a .h file. This #include should always
be included <b>first</b> regardless of where it lives on the file system. By
including a header file first in the .cpp files that implement the interfaces,
we ensure that the header does not have any hidden dependencies which are not
explicitly #included in the header, but should be. It is also a form of
documentation in the .cpp file to indicate where the interfaces it implements
are defined.</p>
</div>
@@ -320,26 +308,22 @@ a good thorough set of warnings, and stick to them. At least in the case of
syntax of the code slightly. For example, an warning that annoys me occurs when
I write code like this:</p>
<div class="doc_code">
<pre>
if (V = getValue()) {
...
}
if (V = getValue()) {
..
}
</pre>
</div>
<p><tt>gcc</tt> will warn me that I probably want to use the <tt>==</tt>
operator, and that I probably mistyped it. In most cases, I haven't, and I
really don't want the spurious errors. To fix this particular problem, I
rewrite the code like this:</p>
<div class="doc_code">
<pre>
if ((V = getValue())) {
...
}
if ((V = getValue())) {
..
}
</pre>
</div>
<p>...which shuts <tt>gcc</tt> up. Any <tt>gcc</tt> warning that annoys you can
be fixed by massaging the code appropriately.</p>
@@ -349,6 +333,40 @@ be fixed by massaging the code appropriately.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="ci_cpp_features">Which C++ features can I use?</a>
</div>
<div class="doc_text">
<p>Compilers are finally catching up to the C++ standard. Most compilers
implement most features, so you can use just about any features that you would
like. In the LLVM source tree, I have chosen to not use these features:</p>
<ol>
<li><p>Exceptions: Exceptions are very useful for error reporting and handling
exceptional conditions. I do not use them in LLVM because they do have an
associated performance impact (by restricting restructuring of code), and parts
of LLVM are designed for performance critical purposes.</p>
<p>Just like most of the rules in this document, this isn't a hard and fast
requirement. Exceptions are used in the Parser, because it simplifies error
reporting <b>significantly</b>, and the LLVM parser is not at all in the
critical path.</p>
</li>
<li>RTTI: RTTI has a large cost in terms of executable size, and compilers are
not yet very good at stomping out "dead" class information blocks. Because of
this, typeinfo and dynamic cast are not used.</li>
</ol>
<p>Other features, such as templates (without partial specialization) can be
used freely. The general goal is to have clear, consise, performant code... if
a technique assists with that then use it.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="ci_portable_code">Write Portable Code</a>
@@ -368,26 +386,6 @@ to support it.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="ci_class_struct">Use of <tt>class</tt> and <tt>struct</tt> Keywords</a>
</div>
<div class="doc_text">
<p>In C++, the <tt>class</tt> and <tt>struct</tt> keywords can be used almost
interchangeably. The only difference is when they are used to declare a class:
<tt>class</tt> makes all members private by default while <tt>struct</tt> makes
all members public by default.</p>
<p>Unfortunately, not all compilers follow the rules and some will generate
different symbols based on whether <tt>class</tt> or <tt>struct</tt> was used to
declare the symbol. This can lead to problems at link time.</p>
<p>So, the rule for LLVM is to always use the <tt>class</tt> keyword, unless
<b>all</b> members are public, in which case <tt>struct</tt> is allowed.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="styleissues">Style Issues</a>
@@ -433,7 +431,7 @@ translation unit.</p>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="hl_dontinclude"><tt>#include</tt> as Little as Possible</a>
<a name="hl_dontinclude">#include as Little as Possible</a>
</div>
<div class="doc_text">
@@ -442,13 +440,13 @@ translation unit.</p>
have to, especially in header files.</p>
<p>But wait, sometimes you need to have the definition of a class to use it, or
to inherit from it. In these cases go ahead and <tt>#include</tt> that header
file. Be aware however that there are many cases where you don't need to have
the full definition of a class. If you are using a pointer or reference to a
class, you don't need the header file. If you are simply returning a class
instance from a prototyped function or method, you don't need it. In fact, for
most cases, you simply don't need the definition of a class... and not
<tt>#include</tt>'ing speeds up compilation.</p>
to inherit from it. In these cases go ahead and #include that header file. Be
aware however that there are many cases where you don't need to have the full
definition of a class. If you are using a pointer or reference to a class, you
don't need the header file. If you are simply returning a class instance from a
prototyped function or method, you don't need it. In fact, for most cases, you
simply don't need the definition of a class... and not <tt>#include</tt>'ing
speeds up compilation.</p>
<p>It is easy to try to go too overboard on this recommendation, however. You
<b>must</b> include all of the header files that you are using, either directly
@@ -470,7 +468,7 @@ about later...</p>
<p>Many modules have a complex implementation that causes them to use more than
one implementation (<tt>.cpp</tt>) file. It is often tempting to put the
internal communication interface (helper classes, extra functions, etc) in the
public module header file. Don't do this.</p>
public module header file. Don't do this. :)</p>
<p>If you really need to do something like this, put a private header file in
the same directory as the source files, and include it locally. This ensures
@@ -482,7 +480,7 @@ class itself... just make them private (or protected), and all is well.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<div class="doc_text">
<a name="micro">The Low Level Issues</a>
</div>
@@ -506,30 +504,26 @@ in the assertion statement (which is printed if the assertion is tripped). This
helps the poor debugging make sense of why an assertion is being made and
enforced, and hopefully what to do about it. Here is one complete example:</p>
<div class="doc_code">
<pre>
inline Value *getOperand(unsigned i) {
assert(i &lt; Operands.size() &amp;&amp; "getOperand() out of range!");
return Operands[i];
}
inline Value *getOperand(unsigned i) {
assert(i &lt; Operands.size() &amp;&amp; "getOperand() out of range!");
return Operands[i];
}
</pre>
</div>
<p>Here are some examples:</p>
<div class="doc_code">
<pre>
assert(Ty-&gt;isPointerType() &amp;&amp; "Can't allocate a non pointer type!");
assert(Ty-&gt;isPointerType() &amp;&amp; "Can't allocate a non pointer type!");
assert((Opcode == Shl || Opcode == Shr) &amp;&amp; "ShiftInst Opcode invalid!");
assert((Opcode == Shl || Opcode == Shr) &amp;&amp; "ShiftInst Opcode invalid!");
assert(idx &lt; getNumSuccessors() &amp;&amp; "Successor # out of range!");
assert(idx &lt; getNumSuccessors() &amp;&amp; "Successor # out of range!");
assert(V1.getType() == V2.getType() &amp;&amp; "Constant types must be identical!");
assert(V1.getType() == V2.getType() &amp;&amp; "Constant types must be identical!");
assert(isa&lt;PHINode&gt;(Succ-&gt;front()) &amp;&amp; "Only works on PHId BBs!");
assert(isa&lt;PHINode&gt;(Succ-&gt;front()) &amp;&amp; "Only works on PHId BBs!");
</pre>
</div>
<p>You get the idea...</p>
@@ -543,9 +537,9 @@ assert(isa&lt;PHINode&gt;(Succ-&gt;front()) &amp;&amp; "Only works on PHId BBs!"
<div class="doc_text">
<p>Hard fast rule: Preincrement (<tt>++X</tt>) may be no slower than
postincrement (<tt>X++</tt>) and could very well be a lot faster than it. Use
preincrementation whenever possible.</p>
<p>Hard fast rule: Preincrement (++X) may be no slower than postincrement (X++)
and could very well be a lot faster than it. Use preincrementation whenever
possible.</p>
<p>The semantics of postincrement include making a copy of the value being
incremented, returning it, and then preincrementing the "work value". For
@@ -556,26 +550,25 @@ get in the habit of always using preincrement, and you won't have a problem.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="hl_avoidendl">Avoid <tt>std::endl</tt></a>
<a name="hl_avoidendl">Avoid endl</a>
</div>
<div class="doc_text">
<p>The <tt>std::endl</tt> modifier, when used with iostreams outputs a newline
to the output stream specified. In addition to doing this, however, it also
flushes the output stream. In other words, these are equivalent:</p>
<p>The <tt>endl</tt> modifier, when used with iostreams outputs a newline to the
output stream specified. In addition to doing this, however, it also flushes
the output stream. In other words, these are equivalent:</p>
<div class="doc_code">
<pre>
std::cout &lt;&lt; std::endl;
std::cout &lt;&lt; '\n' &lt;&lt; std::flush;
cout &lt;&lt; endl;
cout &lt;&lt; "\n" &lt;&lt; flush;
</pre>
</div>
<p>Most of the time, you probably have no reason to flush the output stream, so
it's better to use a literal <tt>'\n'</tt>.</p>
it's better to use a literal <tt>"\n"</tt>.</p>
</div>
@@ -586,15 +579,340 @@ it's better to use a literal <tt>'\n'</tt>.</p>
<div class="doc_text">
<p>C++ is a powerful language. With a firm grasp on its capabilities, you can
make write effective, consise, readable and maintainable code all at the same
time. By staying consistent, you reduce the amount of special cases that need
to be remembered. Reducing the total number of lines of code you write is a
good way to avoid documentation, and avoid giving bugs a place to hide.</p>
<p>C++ is a powerful language. With a firm grasp on its capabilities, you can make
write effective, consise, readable and maintainable code all at the same time.
By staying consistent, you reduce the amount of special cases that need to be
remembered. Reducing the total number of lines of code you write is a good way
to avoid documentation, and avoid giving bugs a place to hide.</p>
<p>For these reasons, come to know and love the contents of your local
<tt>&lt;algorithm&gt;</tt> header file. Know about <tt>&lt;functional&gt;</tt>
and what it can do for you. C++ is just a tool that wants you to master it.</p>
&lt;algorithm&gt; header file. Know about &lt;functional&gt; and what it can do
for you. C++ is just a tool that wants you to master it. :)</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="iterators">Writing Iterators</a>
</div>
<div class="doc_text">
<p>Here's a pretty good summary of how to write your own data structure iterators
in a way that is compatible with the STL, and with a lot of other code out there
(slightly edited by Chris):</p>
<pre>
From: Ross Smith &lt;ross.s@ihug.co.nz&gt;
Newsgroups: comp.lang.c++.moderated
Subject: Writing iterators (was: Re: Non-template functions that take iterators)
Date: 28 Jun 2001 12:07:10 -0400
Andre Majorel wrote:
&gt; Any pointers handy on "writing STL-compatible iterators for
&gt; dummies ?"
I'll give it a try...
The usual situation requiring user-defined iterators is that you have
a type that bears some resemblance to an STL container, and you want
to provide iterators so it can be used with STL algorithms. You need
to ask three questions:
First, is this simply a wrapper for an underlying collection of
objects that's held somewhere as a real STL container, or is it a
"virtual container" for which iteration is (under the hood) more
complicated than simply incrementing some underlying iterator (or
pointer or index or whatever)? In the former case you can frequently
get away with making your container's iterators simply typedefs for
those of the underlying container; your begin() function would call
member_container.begin(), and so on.
Second, do you only need read-only iterators, or do you need separate
read-only (const) and read-write (non-const) iterators?
Third, which kind of iterator (input, output, forward, bidirectional,
or random access) is appropriate? If you're familiar with the
properties of the iterator types (if not, visit
<a href="http://www.sgi.com/tech/stl/">http://www.sgi.com/tech/stl/</a>), the appropriate choice should be
obvious from the semantics of the container.
I'll start with forward iterators, as the simplest case that's likely
to come up in normal code. Input and output iterators have some odd
properties and rarely need to be implemented in user code; I'll leave
them out of discussion. Bidirectional and random access iterators are
covered below.
The exact behaviour of a forward iterator is spelled out in the
Standard in terms of a set of expressions with specified behaviour,
rather than a set of member functions, which leaves some leeway in how
you actually implement it. Typically it looks something like this
(I'll start with the const-iterator-only situation):
#include &lt;iterator&gt;
class container {
public:
typedef something_or_other value_type;
class const_iterator:
public std::iterator&lt;std::forward_iterator_tag, value_type&gt; {
friend class container;
public:
const value_type&amp; operator*() const;
const value_type* operator-&gt;() const;
const_iterator&amp; operator++();
const_iterator operator++(int);
friend bool operator==(const_iterator lhs,
const_iterator rhs);
friend bool operator!=(const_iterator lhs,
const_iterator rhs);
private:
//...
};
//...
};
An iterator should always be derived from an instantiation of the
std::iterator template. The iterator's life cycle functions
(constructors, destructor, and assignment operator) aren't declared
here; in most cases the compiler-generated ones are sufficient. The
container needs to be a friend of the iterator so that the container's
begin() and end() functions can fill in the iterator's private members
with the appropriate values.
<i>[Chris's Note: I prefer to not make my iterators friends. Instead, two
ctor's are provided for the iterator class: one to start at the end of the
container, and one at the beginning. Typically this is done by providing
two constructors with different signatures.]</i>
There are normally only three member functions that need nontrivial
implementations; the rest are just boilerplate.
const container::value_type&amp;
container::const_iterator::operator*() const {
// find the element and return a reference to it
}
const container::value_type*
container::const_iterator::operator-&gt;() const {
return &amp;**this;
}
If there's an underlying real container, operator*() can just return a
reference to the appropriate element. If there's no actual container
and the elements need to be generated on the fly -- what I think of as
a "virtual container" -- things get a bit more complicated; you'll
probably need to give the iterator a value_type member object, and
fill it in when you need to. This might be done as part of the
increment operator (below), or if the operation is nontrivial, you
might choose the "lazy" approach and only generate the actual value
when one of the dereferencing operators is called.
The operator-&gt;() function is just boilerplate around a call to
operator*().
container::const_iterator&amp;
container::const_iterator::operator++() {
// the incrementing logic goes here
return *this;
}
container::const_iterator
container::const_iterator::operator++(int) {
const_iterator old(*this);
++*this;
return old;
}
Again, the incrementing logic will usually be trivial if there's a
real container involved, more complicated if you're working with a
virtual container. In particular, watch out for what happens when you
increment past the last valid item -- this needs to produce an
iterator that will compare equal to container.end(), and making this
work is often nontrivial for virtual containers.
The post-increment function is just boilerplate again (and
incidentally makes it obvious why all the experts recommend using
pre-increment wherever possible).
bool operator==(container::const_iterator lhs,
container::const_iterator rhs) {
// equality comparison goes here
}
bool operator!=(container::const_iterator lhs,
container::const_iterator rhs) {
return !(lhs == rhs);
}
For a real container, the equality comparison will usually just
compare the underlying iterators (or pointers or indices or whatever).
The semantics of comparisons for virtual container iterators are often
tricky. Remember that iterator comparison only needs to be defined for
iterators into the same container, so you can often simplify things by
taking for granted that lhs and rhs both point into the same container
object. Again, the second function is just boilerplate.
It's a matter of taste whether iterator arguments are passed by value
or reference; I've shown tham passed by value to reduce clutter, but
if the iterator contains several data members, passing by reference
may be better.
That convers the const-iterator-only situation. When we need separate
const and mutable iterators, one small complication is added beyond
the simple addition of a second class.
class container {
public:
typedef something_or_other value_type;
class const_iterator;
class iterator:
public std::iterator&lt;std::forward_iterator_tag, value_type&gt; {
friend class container;
friend class container::const_iterator;
public:
value_type&amp; operator*() const;
value_type* operator-&gt;() const;
iterator&amp; operator++();
iterator operator++(int);
friend bool operator==(iterator lhs, iterator rhs);
friend bool operator!=(iterator lhs, iterator rhs);
private:
//...
};
class const_iterator:
public std::iterator&lt;std::forward_iterator_tag, value_type&gt; {
friend class container;
public:
const_iterator();
const_iterator(const iterator&amp; i);
const value_type&amp; operator*() const;
const value_type* operator-&gt;() const;
const_iterator&amp; operator++();
const_iterator operator++(int);
friend bool operator==(const_iterator lhs,
const_iterator rhs);
friend bool operator!=(const_iterator lhs,
const_iterator rhs);
private:
//...
};
//...
};
There needs to be a conversion from iterator to const_iterator (so
that mixed-type operations, such as comparison between an iterator and
a const_iterator, will work). This is done here by giving
const_iterator a conversion constructor from iterator (equivalently,
we could have given iterator an operator const_iterator()), which
requires const_iterator to be a friend of iterator, so it can copy its
data members. (It also requires the addition of an explicit default
constructor to const_iterator, since the existence of another
user-defined constructor inhibits the compiler-defined one.)
Bidirectional iterators add just two member functions to forward
iterators:
class iterator:
public std::iterator&lt;std::bidirectional_iterator_tag, value_type&gt; {
public:
//...
iterator&amp; operator--();
iterator operator--(int);
//...
};
I won't detail the implementations, they're obvious variations on
operator++().
Random access iterators add several more member and friend functions:
class iterator:
public std::iterator&lt;std::random_access_iterator_tag, value_type&gt; {
public:
//...
iterator&amp; operator+=(difference_type rhs);
iterator&amp; operator-=(difference_type rhs);
friend iterator operator+(iterator lhs, difference_type rhs);
friend iterator operator+(difference_type lhs, iterator rhs);
friend iterator operator-(iterator lhs, difference_type rhs);
friend difference_type operator-(iterator lhs, iterator rhs);
friend bool operator&lt;(iterator lhs, iterator rhs);
friend bool operator&gt;(iterator lhs, iterator rhs);
friend bool operator&lt;=(iterator lhs, iterator rhs);
friend bool operator&gt;=(iterator lhs, iterator rhs);
//...
};
container::iterator&amp;
container::iterator::operator+=(container::difference_type rhs) {
// add rhs to iterator position
return *this;
}
container::iterator&amp;
container::iterator::operator-=(container::difference_type rhs) {
// subtract rhs from iterator position
return *this;
}
container::iterator operator+(container::iterator lhs,
container::difference_type rhs) {
return iterator(lhs) += rhs;
}
container::iterator operator+(container::difference_type lhs,
container::iterator rhs) {
return iterator(rhs) += lhs;
}
container::iterator operator-(container::iterator lhs,
container::difference_type rhs) {
return iterator(lhs) -= rhs;
}
container::difference_type operator-(container::iterator lhs,
container::iterator rhs) {
// calculate distance between iterators
}
bool operator&lt;(container::iterator lhs, container::iterator rhs) {
// perform less-than comparison
}
bool operator&gt;(container::iterator lhs, container::iterator rhs) {
return rhs &lt; lhs;
}
bool operator&lt;=(container::iterator lhs, container::iterator rhs) {
return !(rhs &lt; lhs);
}
bool operator&gt;=(container::iterator lhs, container::iterator rhs) {
return !(lhs &lt; rhs);
}
Four of the functions (operator+=(), operator-=(), the second
operator-(), and operator&lt;()) are nontrivial; the rest are
boilerplate.
One feature of the above code that some experts may disapprove of is
the declaration of all the free functions as friends, when in fact
only a few of them need direct access to the iterator's private data.
I originally got into the habit of doing this simply to keep the
declarations together; declaring some functions inside the class and
some outside seemed awkward. Since then, though, I've been told that
there's a subtle difference in the way name lookup works for functions
declared inside a class (as friends) and outside, so keeping them
together in the class is probably a good idea for practical as well as
aesthetic reasons.
I hope all this is some help to anyone who needs to write their own
STL-like containers and iterators.
--
Ross Smith &lt;ross.s@ihug.co.nz&gt; The Internet Group, Auckland, New Zealand
</pre>
</div>
@@ -611,12 +929,10 @@ sources. Two particularly important books for our work are:</p>
<ol>
<li><a href="http://www.aw-bc.com/catalog/academic/product/0,1144,0201310155,00.html">Effective
<li><a href="http://www.aw.com/product/0,2627,0201924889,00.html">Effective
C++</a> by Scott Meyers. There is an online version of the book (only some
chapters though) <a
href="http://www.awlonline.com/cseng/meyerscddemo/">available as well</a>. Also
interesting and useful are "More Effective C++" and "Effective STL" by the same
author.</li>
href="http://www.awlonline.com/cseng/meyerscddemo/">available as well</a>.</li>
<li><a href="http://cseng.aw.com/book/0,3828,0201633620,00.html">Large-Scale C++
Software Design</a> by John Lakos</li>
@@ -624,23 +940,20 @@ Software Design</a> by John Lakos</li>
</ol>
<p>If you get some free time, and you haven't read them: do so, you might learn
something.</p>
something. :)</p>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
<div class="doc_footer">
<address><a href="mailto:sabre@nondot.org">Chris Lattner</a></address>
<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
<br>
Last modified: $Date$
</address>
</div>
</body>
</html>

View File

@@ -1,4 +0,0 @@
pod2htm?.tmp
*.html
*.1
*.ps

View File

@@ -1,101 +0,0 @@
##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
ifdef BUILD_FOR_WEBSITE
# This special case is for keeping the CommandGuide on the LLVM web site
# up to date automatically as the documents are checked in. It must build
# the POD files to HTML only and keep them in the src directories. It must also
# build in an unconfigured tree, hence the ifdef. To use this, run
# make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
POD := $(wildcard *.pod)
HTML := $(patsubst %.pod, html/%.html, $(POD))
MAN := $(patsubst %.pod, man/man1/%.1, $(POD))
PS := $(patsubst %.pod, ps/%.ps, $(POD))
all: $(HTML) $(MAN) $(PS)
.SUFFIXES:
.SUFFIXES: .html .pod .1 .ps
html/%.html: %.pod
pod2html --css=manpage.css --htmlroot=. \
--podpath=. --noindex --infile=$< --outfile=$@ --title=$*
man/man1/%.1: %.pod
pod2man --release=1.5 --center="LLVM Command Guide" $< $@
ps/%.ps: man/man1/%.1
groff -Tps -man $< > $@
clean:
rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
else
LEVEL := ../..
include $(LEVEL)/Makefile.common
POD := $(wildcard $(PROJ_SRC_DIR)/*.pod)
EXTRA_DIST := $(POD) index.html
HTML = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.html, $(POD))
MAN = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.1, $(POD))
PS = $(patsubst $(PROJ_SRC_DIR)/%.pod, $(PROJ_OBJ_DIR)/%.ps, $(POD))
.SUFFIXES:
.SUFFIXES: .html .pod .1 .ps
$(HTML) : html/.dir man/.dir man/man1/.dir ps/.dir
html: $(HTML)
$(PROJ_OBJ_DIR)/%.html: %.pod
$(POD2HTML) --css=manpage.css --htmlroot=. --podpath=. \
--noindex --infile=$< --outfile=$@ --title=$*
$(PROJ_OBJ_DIR)/%.1: %.pod
$(POD2MAN) --release=$(LLVMVersion) \
--center="LLVM Command Guide" $< $@
$(PROJ_OBJ_DIR)/%.ps: $(PROJ_OBJ_DIR)/%.1
$(GROFF) -Tps -man $< > $@
clean-local::
$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
HTML_DIR := $(PROJ_docsdir)/html/CommandGuide
MAN_DIR := $(PROJ_mandir)/man1
PS_DIR := $(PROJ_docsdir)/ps
install-local:: $(HTML) $(MAN) $(PS)
$(Echo) Installing HTML CommandGuide Documentation
$(Verb) $(MKDIR) $(HTML_DIR)
$(Verb) $(DataInstall) $(HTML) $(HTML_DIR)
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/index.html $(HTML_DIR)
$(Verb) $(DataInstall) $(PROJ_SRC_DIR)/manpage.css $(HTML_DIR)
$(Echo) Installing MAN CommandGuide Documentation
$(Verb) $(MKDIR) $(MAN_DIR)
$(Verb) $(DataInstall) $(MAN) $(MAN_DIR)
$(Echo) Installing PS CommandGuide Documentation
$(Verb) $(MKDIR) $(PS_DIR)
$(Verb) $(DataInstall) $(PS) $(PS_DIR)
uninstall-local::
$(Echo) Uninstalling Documentation
$(Verb) $(RM) -rf $(LLVM_DOCSDIR)
printvars::
$(Echo) "POD : " '$(POD)'
$(Echo) "HTML : " '$(HTML)'
endif

View File

@@ -0,0 +1,81 @@
<html>
<title>
LLVM: analyze tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>analyze</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>analyze</tt>
<h3>SYNOPSIS</h3>
<tt>analyze [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>analyze</tt> command performs various analysis of LLVM assembly code or
bytecode. It will usually print the results on standard output, but in a few
cases, it will print output to standard error or generate a file with the
analysis output (which is usually done when the output is meant for another
program).
<p>
If filename is omitted or is -, <tt>analyze</tt> reads its input from standard
input. It first attempts to interpret its input as LLVM bytecode. If it
encounters an error, it then attempts to parse the input as LLVM assembly
language.
<h3>OPTIONS</h3>
<ul>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -q
<br>
Quiet mode. With this option, analysis pass names are not printed.
<p>
<li> -load &lt;plugin.so&gt;
<br>
Load the specified dynamic object with name plugin.so. This file
should contain additional analysis passes that register themselves with
the <tt>analyze</tt> program after being loaded.
<p>
After being loaded, additional command line options are made available
for running the passes made available by plugin.so. Use
'<tt><tt>analyze</tt> -load &lt;plugin.so&gt; -help</tt>' to see the new
list of available analysis passes.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>analyze</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="opt.html"><tt>opt</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,75 +0,0 @@
=pod
=head1 NAME
analyze - LLVM program analyzer
=head1 SYNOPSIS
B<analyze> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<analyze> command performs various analysis of LLVM assembly
code or bytecode. It will usually print the results on standard
output, but in a few cases, it will print output to standard error
or generate a file with the analysis output, which is usually done
when the output is meant for another program.
If filename is omitted or is I<->, B<analyze> reads its input from
standard input. It first attempts to interpret its input as LLVM
bytecode. If it encounters an error, it then attempts to parse the
input as LLVM assembly language.
=head1 OPTIONS
=over
=item B<-help>
Print a summary of command line options.
=item B<-q>
Quiet mode. With this option, analysis pass names are not printed.
=item B<-load> I<plugin>
Load the specified dynamic object with name I<plugin>. This file
should contain additional analysis passes that register themselves
with the B<analyze> program after being loaded.
After being loaded, additional command line options are made
available for running the passes made available by I<plugin>. Use
B<analyze -load> I<plugin> B<-help> to see the new list of available
analysis passes.
=item B<-profile-info-file> I<filename>
Specify the name of the file loaded by the -profile-loader option.
=item B<-stats>
Print statistics.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=back
=head1 EXIT STATUS
If B<analyze> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<opt|opt>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,228 @@
<html>
<title>LLVM: bugpoint tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>bugpoint</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>bugpoint</tt>
<h3>SYNOPSIS</h3>
<tt>bugpoint [options] [input LLVM ll/bc files] [LLVM passes] --args &lt;program arguments&gt;...</tt>
<img src="../Debugging.gif" width=444 height=314 align=right>
<h3>DESCRIPTION</h3>
The <tt>bugpoint</tt> tool narrows down the source of
problems in LLVM tools and passes. It can be used to debug three types of
failures: optimizer crashes, miscompilations by optimizers, or invalid native
code generation. It aims to reduce large test cases to small, useful ones.
For example,
if <tt><a href="gccas.html">gccas</a></tt> crashes while optimizing a file, it
will identify the optimization (or combination of optimizations) that causes the
crash, and reduce the file down to a small example which triggers the crash.<p>
<a name="designphilosophy">
<h4>Design Philosophy</h4>
<tt>bugpoint</tt> is designed to be a useful tool without requiring any
hooks into the LLVM infrastructure at all. It works with any and all LLVM
passes and code generators, and does not need to "know" how they work. Because
of this, it may appear to do a lot of stupid things or miss obvious
simplifications. <tt>bugpoint</tt> is also designed to trade off programmer
time for computer time in the compiler-debugging process; consequently, it may
take a long period of (unattended) time to reduce a test case, but we feel it
is still worth it. :-) <p>
<a name="automaticdebuggerselection">
<h4>Automatic Debugger Selection</h4>
<tt>bugpoint</tt> reads each <tt>.bc</tt> or <tt>.ll</tt> file
specified on the command line and links them together into a single module,
called the test program. If any LLVM passes are
specified on the command line, it runs these passes on the test program. If
any of the passes crash, or if they produce malformed output,
<tt>bugpoint</tt> starts the <a href="#crashdebug">crash debugger</a>.<p>
Otherwise, if the <a href="#opt_output"><tt>-output</tt></a> option was not
specified, <tt>bugpoint</tt> runs the test program with the C backend (which
is assumed to generate good code) to generate a reference output. Once
<tt>bugpoint</tt> has a reference output for the test program, it tries
executing it
with the <a href="#opt_run-">selected</a> code generator. If
the resulting output differs from the reference output, it assumes the
difference resulted from a code generator failure, and starts the
<a href="#codegendebug">code generator debugger</a>.<p>
Otherwise, <tt>bugpoint</tt> runs the test program after all of the LLVM passes
have been applied to it. If its output differs from the reference output,
it assumes the difference resulted from a failure in one of the LLVM passes,
and enters the
<a href="#miscompilationdebug">miscompilation debugger</a>. Otherwise,
there is no problem <tt>bugpoint</tt> can debug.<p>
<a name="crashdebug">
<h4>Crash debugger</h4>
If an optimizer crashes, <tt>bugpoint</tt> will try as hard as it can to
reduce the list of passes and the size of the test program. First,
<tt>bugpoint</tt> figures out which combination of passes triggers the bug. This
is useful when debugging a problem exposed by <tt>gccas</tt>, for example,
because it runs over 25 optimizations.<p>
Next, <tt>bugpoint</tt> tries removing functions from the test program, to
reduce its
size. Usually it is able to reduce a test program
to a single function, when debugging intraprocedural optimizations. Once the
number of
functions has been reduced, it attempts to delete various edges in the control
flow graph, to reduce the size of the function as much as possible. Finally,
<tt>bugpoint</tt> deletes any individual LLVM instructions whose absence does
not eliminate the failure. At the end, <tt>bugpoint</tt> should tell you what
passes crash, give you a bytecode file, and give you instructions on how to
reproduce the failure with <tt><a href="opt.html">opt</a></tt> or
<tt><a href="analyze.html">analyze</a></tt>.<p>
<a name="codegendebug">
<h4>Code generator debugger</h4>
The code generator debugger attempts to narrow down the amount of code that is
being miscompiled by the <a href="#opt_run-">selected</a> code generator. To do
this, it takes the test program and partitions it into two pieces: one piece
which it compiles with the C backend (into a shared object), and one piece which
it runs with either the JIT or the static LLC compiler. It uses several
techniques to reduce the amount of code pushed through the LLVM code generator,
to reduce the potential scope of the problem. After it is finished, it emits
two bytecode files (called "test" [to be compiled with the code generator] and
"safe" [to be compiled with the C backend] respectively), and instructions for
reproducing the problem. The code generator debugger assumes that the C
backend produces good code.<p>
If you are using the code generator debugger and get an error message that
says "UNSUPPORTED: external function used as a global initializer!", try using
the <tt>-run-llc</tt> option instead of the <tt>-run-jit</tt> option. This is
due to an unimplemented feature in the code generator debugger.<p>
<a name="miscompilationdebug">
<h4>Miscompilation debugger</h4>
The miscompilation debugger works similarly to the code generator
debugger. It works by splitting the test program into two pieces, running the
optimizations specified on one piece, linking the two pieces back together,
and then executing the result.
It attempts to narrow down the list of passes to the one (or few) which are
causing the miscompilation, then reduce the portion of the test program which is
being miscompiled. The miscompilation debugger assumes that the selected
code generator is working properly.<p>
<a name="bugpoint notes">
<h4>Advice for using <tt>bugpoint</tt></h4>
<tt>bugpoint</tt> can be a remarkably useful tool, but it sometimes works in
non-obvious ways. Here are some hints and tips:<p>
<ol>
<li>In the code generator and miscompilation debuggers, <tt>bugpoint</tt> only
works with programs that have deterministic output. Thus, if the program
outputs the date, time, or any other "random" data, <tt>bugpoint</tt> may
misinterpret differences in these data, when output, as the result of a
miscompilation. Programs should be temporarily modified to disable
outputs that are likely to vary from run to run.
<li>In the code generator and miscompilation debuggers, debugging will go
faster if you manually modify the program or its inputs to reduce the
runtime, but still exhibit the problem.
<li><tt>bugpoint</tt> is extremely useful when working on a new optimization:
it helps track down regressions quickly. To avoid having to relink
<tt>bugpoint</tt> every time you change your optimization however, have
<tt>bugpoint</tt> dynamically load your optimization with the <a
href="#opt_load"><tt>-load</tt></a> option.
<li><tt>bugpoint</tt> can generate a lot of output and run for a long period of
time. It is often useful to capture the output of the program to file. For
example, in the C shell, you can type:<br>
<tt>bugpoint ..... |&amp; tee bugpoint.log</tt>
<br>to get a copy of <tt>bugpoint</tt>'s output in the file
<tt>bugpoint.log</tt>, as well as on your terminal.
<li><tt>bugpoint</tt> cannot debug problems with the linker. If
<tt>bugpoint</tt> crashes before you see its "All input ok" message,
you might try <tt>llvm-link -v</tt> on the same set of input files. If
that also crashes, you may be experiencing a linker bug.
</ol>
<h3>OPTIONS</h3>
<ul>
<li><tt>-additional-so &lt;library.so&gt;</tt><br>
Load <tt>&lt;library.so&gt;</tt> into the test program whenever it is run.
This is useful if you are debugging programs which depend on non-LLVM
libraries (such as the X or curses libraries) to run.<p>
<li><tt>-args &lt;program args&gt;</tt><br>
Pass all arguments specified after <tt>-args</tt> to the
test program whenever it runs. Note that if any of
the <tt>&lt;program args&gt;</tt> start with a '-', you should use:
<p>
<tt>bugpoint &lt;bugpoint args&gt; -args -- &lt;program args&gt;</tt>
<p>
The "<tt>--</tt>" right after the <tt>-args</tt> option tells
<tt>bugpoint</tt> to consider any options starting with <tt>-</tt> to be
part of the <tt>-args</tt> option, not as options to <tt>bugpoint</tt>
itself.<p>
<li><tt>-disable-{adce,dce,simplifycfg}</tt><br>
Do not run the specified passes to clean up and reduce the size of the
test program. By default, <tt>bugpoint</tt> uses these passes internally
when attempting to reduce test programs. If you're trying to find
a bug in one of these passes, <tt>bugpoint</tt> may crash.<p>
<li> <tt>-help</tt><br>
Print a summary of command line options.<p>
<a name="opt_input"><li><tt>-input &lt;filename&gt;</tt><br>
Open <tt>&lt;filename&gt;</tt> and redirect the standard input of the
test program, whenever it runs, to come from that file.
<p>
<a name="opt_load"><li> <tt>-load &lt;plugin.so&gt;</tt><br>
Load the dynamic object <tt>&lt;plugin.so&gt;</tt> into <tt>bugpoint</tt>
itself. This object should register new
optimization passes. Once loaded, the object will add new command line
options to enable various optimizations. To see the new complete list
of optimizations, use the -help and -load options together:
<p>
<tt>bugpoint -load &lt;plugin.so&gt; -help</tt>
<p>
<a name="opt_output"><li><tt>-output &lt;filename&gt;</tt><br>
Whenever the test program produces output on its standard output
stream, it should match the contents of <tt>&lt;filename&gt;</tt>
(the "reference output"). If you do not use this option,
<tt>bugpoint</tt> will attempt to generate a reference output by
compiling the program with the C backend and running it.<p>
<a name="opt_run-"><li><tt>-run-{int,jit,llc,cbe}</tt><br>
Whenever the test program is compiled, <tt>bugpoint</tt> should generate
code for it using the specified code generator. These options allow
you to choose the interpreter, the JIT compiler, the static native
code compiler, or the C backend, respectively.<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>bugpoint</tt> succeeds in finding a problem, it will exit with 0.
Otherwise, if an error occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="opt.html"><tt>opt</tt></a>,
<a href="analyze.html"><tt>analyze</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,118 +0,0 @@
=pod
=head1 NAME
bugpoint - automatic test case reduction tool
=head1 SYNOPSIS
B<bugpoint> [I<options>] [I<input LLVM ll/bc files>] [I<LLVM passes>] B<--args>
I<program arguments>
=head1 DESCRIPTION
B<bugpoint> narrows down the source of problems in LLVM tools and passes. It
can be used to debug three types of failures: optimizer crashes, miscompilations
by optimizers, or bad native code generation (including problems in the static
and JIT compilers). It aims to reduce large test cases to small, useful ones.
For more information on the design and inner workings of B<bugpoint>, as well as
advice for using bugpoint, see F<llvm/docs/Bugpoint.html> in the LLVM
distribution.
=head1 OPTIONS
=over
=item B<--additional-so> F<library>
Load the dynamic shared object F<library> into the test program whenever it is
run. This is useful if you are debugging programs which depend on non-LLVM
libraries (such as the X or curses libraries) to run.
=item B<--args> I<program args>
Pass all arguments specified after -args to the test program whenever it runs.
Note that if any of the I<program args> start with a '-', you should use:
bugpoint [bugpoint args] --args -- [program args]
The "--" right after the B<--args> option tells B<bugpoint> to consider any
options starting with C<-> to be part of the B<--args> option, not as options to
B<bugpoint> itself.
=item B<--tool-args> I<tool args>
Pass all arguments specified after --tool-args to the LLVM tool under test
(B<llc>, B<lli>, etc.) whenever it runs. You should use this option in the
following way:
bugpoint [bugpoint args] --tool-args -- [tool args]
The "--" right after the B<--tool-args> option tells B<bugpoint> to consider any
options starting with C<-> to be part of the B<--tool-args> option, not as
options to B<bugpoint> itself. (See B<--args>, above.)
=item B<--check-exit-code>=I<{true,false}>
Assume a non-zero exit code or core dump from the test program is a failure.
Defaults to true.
=item B<--disable-{dce,simplifycfg}>
Do not run the specified passes to clean up and reduce the size of the test
program. By default, B<bugpoint> uses these passes internally when attempting to
reduce test programs. If you're trying to find a bug in one of these passes,
B<bugpoint> may crash.
=item B<--help>
Print a summary of command line options.
=item B<--input> F<filename>
Open F<filename> and redirect the standard input of the test program, whenever
it runs, to come from that file.
=item B<--load> F<plugin>
Load the dynamic object F<plugin> into B<bugpoint> itself. This object should
register new optimization passes. Once loaded, the object will add new command
line options to enable various optimizations. To see the new complete list of
optimizations, use the B<--help> and B<--load> options together; for example:
bugpoint --load myNewPass.so --help
=item B<--output> F<filename>
Whenever the test program produces output on its standard output stream, it
should match the contents of F<filename> (the "reference output"). If you
do not use this option, B<bugpoint> will attempt to generate a reference output
by compiling the program with the C backend and running it.
=item B<--profile-info-file> F<filename>
Profile file loaded by B<--profile-loader>.
=item B<--run-{int,jit,llc,cbe}>
Whenever the test program is compiled, B<bugpoint> should generate code for it
using the specified code generator. These options allow you to choose the
interpreter, the JIT compiler, the static native code compiler, or the C
backend, respectively.
=back
=head1 EXIT STATUS
If B<bugpoint> succeeds in finding a problem, it will exit with 0. Otherwise,
if an error occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<opt|opt>, L<analyze|analyze>
=head1 AUTHOR
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,70 @@
<html>
<title>
LLVM: extract tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>extract</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>extract</tt>
<h3>
SYNOPSIS
</h3>
<tt>extract [options] [filename]</tt>
<h3>
DESCRIPTION
</h3>
The <tt>extract</tt> command takes the name of a function and extracts it from
the specified LLVM bytecode file. It is primarily used as a debugging tool to
reduce test cases from larger programs that are triggering a bug.
<p>
In addition to extracting the bytecode of the specified function,
<tt>extract</tt> will also remove unreachable global variables, prototypes, and
unused types.
<p>
The <tt>extract</tt> command reads its input from standard input if filename is
omitted or if filename is -. The output is always written to standard output.
<h3>
OPTIONS
</h3>
<ul>
<li>-func &lt;function&gt;
<br>
Extract the specified function from the LLVM bytecode.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>extract</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<a href="bugpoint.html"><tt>bugpoint</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -0,0 +1,79 @@
<html>
<title>LLVM: gccas tool</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>gccas</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>gccas</tt>
<h3>SYNOPSIS</h3>
<tt>gccas [options] &lt; filename&gt;</tt>
<h3>DESCRIPTION</h3>
The <tt>gccas</tt> utility takes an LLVM assembly file generated by the <a
href="llvmgcc.html">C</a> or <a href="llvmgxx.html">C++</a> frontends and
converts it into an LLVM bytecode file. It is primarily used by the GCC front
end, and as such, attempts to mimic the interface provided by the default system
assembler so that it can act as a "drop-in" replacement.<p>
<tt>gccas</tt> performs a number of optimizations on the input program.<p>
<h3>
OPTIONS
</h3>
<ul>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename which will hold the assembled bytecode.
<p>
<li>-disable-inlining
<br>
Disable the inlining pass. By default, it is enabled.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -verify
<br>
Verify each pass result.
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>gccas</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-as.html"><tt>llvm-as</tt></a>
<a href="gccld.html"><tt>gccld</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,76 +0,0 @@
=pod
=head1 NAME
gccas - optimizing LLVM assembler
=head1 SYNOPSIS
B<gccas> [I<options>] I<filename>
=head1 DESCRIPTION
The B<gccas> utility takes an LLVM assembly file generated by the
L<llvmgcc|llvmgcc> or L<llvmg++|llvmgxx> front-ends and converts
it into an LLVM bytecode file. It is primarily used by the GCC
front end, and as such, attempts to mimic the interface provided
by the default system assembler so that it can act as a "drop-in"
replacement.
B<gccas> performs a number of optimizations on the input program,
including but not limited to: promotion of stack values to SSA
registers; elimination of dead globals, function arguments, code,
and types; tail-call elimination; loop-invariant code motion; global
common-subexpression elimination; and sparse conditional constant
propagation.
=head1 OPTIONS
=over
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the name of the output file which will hold the assembled bytecode.
=item B<--disable-inlining>
Disable the inlining pass. By default, it is enabled.
=item B<--disable-opt>
Disable all assembler-time optimization passes.
=item B<--stats>
Print statistics.
=item B<--time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=item B<--verify>
Verify each pass result.
=back
=head1 EXIT STATUS
If B<gccas> succeeds, it will exit with an exit status of 0.
Otherwise, if an error occurs, it will exit with a non-zero exit
status.
=head1 SEE ALSO
L<llvm-as|llvm-as>, L<gccld|gccld>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,185 @@
<html>
<title>LLVM: gccld tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>gccld</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>gccld</tt>
<h3>SYNOPSIS</h3>
<tt>gccld [options] &lt; filename&gt; [ filename ...]</tt>
<h3>DESCRIPTION</h3>
The <tt>gccld</tt> utility takes a set of LLVM bytecode files and links them
together into a single LLVM bytecode file. The output bytecode file can be
another bytecode library or an executable bytecode program. Using additional
options, <tt>gccld</tt> is able to produce native code executables.
<p>
The <tt>gccld</tt> utility is primarily used by the <a href="llvmgcc.html">C</a>
and <a href="llvmgxx.html">C++</a> front-ends, and as such, attempts to mimic
the interface provided by the default system linker so that it can act as a
"drop-in" replacement.
<p>
The <tt>gccld</tt> tool performs a small set of interprocedural, post-link,
optimizations on the program.
<h4>Search Order</h4>
When looking for objects specified on the command line, <tt>gccld</tt> will
search for the object first in the current directory and then in the directory
specified by the <tt>LLVM_LIB_SEARCH_PATH</tt> environment variable. If it
cannot find the object, it fails.
<p>
When looking for a library specified with the -l option, <tt>gccld</tt> first
attempts to load a file with that name from the current directory. If that
fails, it looks for lib&lt;library&gt;.bc, lib&lt;library&gt;.a, or
lib&lt;library&gt;.so, in that order, in each directory added to the library
search path with the -L option. These directories are searched in order they
were specified. If the library cannot be located, then <tt>gccld</tt> looks in
the directory specified by the <tt>LLVM_LIB_SEARCH_PATH</tt> environment
variable. If it does not find lib&lt;library&gt;.[bc | a | so] there, it fails.
The -L option is global. It does not matter where it is specified in the list
of command line arguments; the directory is simply added to the search path and
is applied to all libraries, preceding or succeeding, in the command line.
<h4>Link order</h4>
All object files are linked first in the order they were specified on the
command line. All library files are linked next. Some libraries may not be
linked into the object program; see below.
<h4>Library Linkage</h4>
Object files and static bytecode objects are always linked into the output
file. Library archives (.a files) load only the objects within the archive
that define symbols needed by the output file. Hence, libraries should be
listed after the object files and libraries which need them; otherwise, the
library may not be linked in, and the dependent library will not have its
undefined symbols defined.
<h4>Native code generation</h4>
The <tt>gccld</tt> program has limited support for native code generation, when
using the -native option.
<h3>OPTIONS</h3>
<ul>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename which will hold the linked bytecode.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -verify
<br>
Verify each pass result.
<p>
<li> -disable-opt
<br>
Disable all link-time optimization passes.
<p>
<li> -L=&lt;directory&gt;
<br>
Add directory to the list of directories to search when looking for
libraries.
<p>
<li> -disable-internalize
<br>
Do not mark all symbols as internal.
<p>
<li> -internalize-public-api-file &lt;filename&gt;
<br>
Preserve the list of symbol names in the file filename.
<p>
<li> -internalize-public-api-list &lt;list&gt;
<br>
Preserve the symbol names in list.
<p>
<li> -l=&lt;library&gt;
<br>
Specify libraries to include when linking the output file. When
linking, <tt>gccld</tt> will first attempt to load a file with the
pathname library. If that fails, it will then attempt to load
lib&lt;library&gt;.bc, lib&lt;library&gt;.a, and lib&lt;library&gt;.so,
in that order.
<p>
<li> -link-as-library
<br>
Link the .bc files together as a library, not an executable.
<p>
<li> -native
<br>
Generate a native, machine code executable.
<p>
When generating native executables, <tt>gccld</tt> first checks for a bytecode
version of the library and links it in, if necessary. If the library is
missing, <tt>gccld</tt> skips it. Then, <tt>gccld</tt> links in the same
libraries as native code.
<p>
In this way, <tt>gccld</tt> should be able to link in optimized bytecode
subsets of common libraries and then link in any part of the library that
hasn't been converted to bytecode.
<p>
<li> -s
<br>
Strip symbol information from the generated executable.
<p>
<li> -v
<br>
Print information about actions taken.
</ul>
<h3>EXIT STATUS</h3>
If <tt>gccld</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-link.html"><tt>llvm-link</tt></a>
<a href="gccas.html"><tt>gccas</tt></a>
<h3>BUGS</h3>
The -L option cannot be used for find native code libraries when using the
-native option.
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,175 +0,0 @@
=pod
=head1 NAME
gccld - optimizing LLVM linker
=head1 SYNOPSIS
B<gccld> [I<options>] I<filename ...>
=head1 DESCRIPTION
The B<gccld> utility takes a set of LLVM bytecode files and links them
together into a single LLVM bytecode file. The output bytecode file can be
another bytecode library or an executable bytecode program. Using additional
options, B<gccld> is able to produce native code executables.
The B<gccld> utility is primarily used by the L<llvmgcc> and
L<llvmg++|llvmgxx> front-ends, and as such, attempts to mimic the interface
provided by the default system linker so that it can act as a ``drop-in''
replacement.
The B<gccld> tool performs a small set of interprocedural, post-link
optimizations on the program.
=head2 Search Order
When looking for objects specified on the command line, B<gccld> will search for
the object first in the current directory and then in the directory specified by
the B<LLVM_LIB_SEARCH_PATH> environment variable. If it cannot find the object,
it fails.
When looking for a library specified with the B<-l> option, B<gccld> first
attempts to load a file with that name from the current directory. If that
fails, it looks for libI<library>.bc, libI<library>.a, or libI<library>.I<shared
library extension>, in that order, in each directory added to the library search
path with the B<-L> option. These directories are searched in the order they
were specified. If the library cannot be located, then B<gccld> looks in the
directory specified by the B<LLVM_LIB_SEARCH_PATH> environment variable. If it
does not find a library there, it fails.
The shared library extension may be I<.so>, I<.dyld>, I<.dll>, or something
different, depending upon the system.
The B<-L> option is global. It does not matter where it is specified in the
list of command line arguments; the directory is simply added to the search path
and is applied to all libraries, preceding or succeeding, in the command line.
=head2 Link order
All object files are linked first in the order they were specified on the
command line. All library files are linked next. Some libraries may not be
linked into the object program; see below.
=head2 Library Linkage
Object files and static bytecode objects are always linked into the output
file. Library archives (.a files) load only the objects within the archive
that define symbols needed by the output file. Hence, libraries should be
listed after the object files and libraries which need them; otherwise, the
library may not be linked in, and the dependent library will not have its
undefined symbols defined.
=head2 Native code generation
The B<gccld> program has limited support for native code generation, when
using the B<-native> or B<-native-cbe> options.
=head1 OPTIONS
=over
=item B<-help>
Print a summary of command line options.
=item B<-o> I<filename>
Specify the output filename which will hold the linked bytecode.
=item B<-stats>
Print statistics.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=item B<-verify>
Verify each pass result.
=item B<-disable-opt>
Disable all link-time optimization passes.
=item B<-disable-inlining>
Do not run the inliner pass.
=item B<-L>I<directory>
Add directory to the list of directories to search when looking for
libraries.
=item B<-disable-internalize>
Do not mark all symbols as internal.
=item B<-internalize-public-api-file> I<filename>
Preserve the list of symbol names in the file filename.
=item B<-internalize-public-api-list> I<list>
Preserve the symbol names in list.
=item B<-l>I<library>
Specify libraries to include when linking the output file. When linking,
B<gccld> will first attempt to load a file with the pathname B<library>. If
that fails, it will then attempt to load libI<library>.bc, libI<library>.a, and
libI<library>.I<shared library extension>, in that order.
=item B<-link-as-library>
Link the .bc files together as a library, not an executable.
=item B<-native>
Generate a native machine code executable.
When generating native executables, B<gccld> first checks for a bytecode
version of the library and links it in, if necessary. If the library is
missing, B<gccld> skips it. Then, B<gccld> links in the same
libraries as native code.
In this way, B<gccld> should be able to link in optimized bytecode
subsets of common libraries and then link in any part of the library that
hasn't been converted to bytecode.
=item B<-native-cbe>
Generate a native machine code executable with the LLVM C backend.
This option is identical to the B<-native> option, but uses the
C backend to generate code for the program instead of an LLVM native
code generator.
=item B<-s>
Strip symbol information from the generated executable.
=item B<-v>
Print information about actions taken.
=back
=head1 EXIT STATUS
If B<gccld> succeeds, it will exit with an exit status of 0.
Otherwise, if an error occurs, it will exit with a non-zero exit
status.
=head1 SEE ALSO
L<llvm-link|llvm-link>, L<gccas|gccas>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,2 +0,0 @@
*html
.dir

View File

@@ -1,256 +0,0 @@
/* Based on http://www.perldoc.com/css/perldoc.css */
@import url("../llvm.css");
body { font-family: Arial,Helvetica; }
blockquote { margin: 10pt; }
h1, a { color: #336699; }
/*** Top menu style ****/
.mmenuon {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ff6600; font-size: 10pt;
}
.mmenuoff {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: 10pt;
}
.cpyright {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.cpyrightText {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.sections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 11pt;
}
.dsections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 12pt;
}
.slink {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #000000; font-size: 9pt;
}
.slink2 { font-family: Arial,Helvetica; text-decoration: none; color: #336699; }
.maintitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 18pt;
}
.dblArrow {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.menuSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.newstext {
font-family: Arial,Helvetica; font-size: small;
}
.linkmenu {
font-family: Arial,Helvetica; color: #000000; font-weight: bold;
text-decoration: none;
}
P {
font-family: Arial,Helvetica;
}
PRE {
font-size: 10pt;
}
.quote {
font-family: Times; text-decoration: none;
color: #000000; font-size: 9pt; font-style: italic;
}
.smstd { font-family: Arial,Helvetica; color: #000000; font-size: x-small; }
.std { font-family: Arial,Helvetica; color: #000000; }
.meerkatTitle {
font-family: sans-serif; font-size: x-small; color: black; }
.meerkatDescription { font-family: sans-serif; font-size: 10pt; color: black }
.meerkatCategory {
font-family: sans-serif; font-size: 9pt; font-weight: bold; font-style: italic;
color: brown; }
.meerkatChannel {
font-family: sans-serif; font-size: 9pt; font-style: italic; color: brown; }
.meerkatDate { font-family: sans-serif; font-size: xx-small; color: #336699; }
.tocTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 10pt;
}
.toc-item {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: underline;
}
.perlVersion {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: none;
}
.podTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000;
}
.docTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000; font-size: 10pt;
}
.dotDot {
font-family: Arial,Helvetica; font-weight: bold;
color: #000000; font-size: 9pt;
}
.docSec {
font-family: Arial,Helvetica; font-weight: normal;
color: #333333; font-size: 9pt;
}
.docVersion {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.docSecs-on {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #ff0000; font-size: 10pt;
}
.docSecs-off {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
h2 {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: medium;
}
h1 {
font-family: Verdana,Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: large;
}
DL {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
UL > LI > A {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt;
}
.moduleInfo {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 11pt;
}
.moduleInfoSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.moduleInfoVal {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: underline;
color: #000000; font-size: 10pt;
}
.cpanNavTitle {
font-family: Arial,Helvetica; font-weight: bold;
color: #ffffff; font-size: 10pt;
}
.cpanNavLetter {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 9pt;
}
.cpanCat {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 9pt;
}
.bttndrkblue-bkgd-top {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgtop.gif);
}
.bttndrkblue-bkgd-left {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgleft.gif);
}
.bttndrkblue-bkgd {
padding-top: 0px;
padding-bottom: 0px;
margin-bottom: 0px;
margin-top: 0px;
background-repeat: no-repeat;
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgmiddle.gif);
vertical-align: top;
}
.bttndrkblue-bkgd-right {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgright.gif);
}
.bttndrkblue-bkgd-bottom {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgbottom.gif);
}
.bttndrkblue-text a {
color: #ffffff;
text-decoration: none;
}
a.bttndrkblue-text:hover {
color: #ffDD3C;
text-decoration: none;
}
.bg-ltblue {
background-color: #f0f5fa;
}
.border-left-b {
background: #f0f5fa url(/i/corner-leftline.gif) repeat-y;
}
.border-right-b {
background: #f0f5fa url(/i/corner-rightline.gif) repeat-y;
}
.border-top-b {
background: #f0f5fa url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-b {
background: #f0f5fa url(/i/corner-botline.gif) repeat-x;
}
.border-right-w {
background: #ffffff url(/i/corner-rightline.gif) repeat-y;
}
.border-top-w {
background: #ffffff url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-w {
background: #ffffff url(/i/corner-botline.gif) repeat-x;
}
.bg-white {
background-color: #ffffff;
}
.border-left-w {
background: #ffffff url(/i/corner-leftline.gif) repeat-y;
}

View File

@@ -1,147 +1,123 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>LLVM Command Guide</title>
<link rel="stylesheet" href="../llvm.css" type="text/css">
</head>
<body>
<div class="doc_title">
LLVM Command Guide
</div>
<body bgcolor=white>
<div class="doc_text">
<center><h1>LLVM Command Guide<br></h1></center>
<p>These documents are HTML versions of the <a href="man/man1/">man pages</a>
for all of the LLVM tools. These pages describe how to use the LLVM commands
and what their options are. Note that these pages do not describe all of the
options available for all tools. To get a complete listing, pass the
<tt>--help</tt> (general options) or <tt>--help-hidden</tt> (general+debugging
options) arguments to the tool you are interested in.</p>
This document is the reference manual for the LLVM utilities. It will
show you how to use the LLVM commands and what all of their options
are.
</div>
<table width=100% border=0>
<tr><td valign=top width=50%>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="basic">Basic Commands</a>
</div>
<!-- *********************************************************************** -->
<!--===============================================================-->
<center><h2><a name="llvmcmds">Basic Commands</a><hr></h2></center>
<!--===============================================================-->
<div class="doc_text">
<dl compact>
<dt><A href="llvm-as.html"><b>llvm-as</b></A>
<dd>
Assemble a human-readable LLVM program into LLVM bytecode.
<p>
<ul>
<dt><A href="llvm-dis.html"><b>llvm-dis</b></A>
<dd>
Disassemble an LLVM bytecode file into human-readable form.
<p>
<li><a href="html/llvm-as.html"><b>llvm-as</b></a> -
assemble a human-readable .ll file into bytecode</li>
<dt><A href="analyze.html"><b>analyze</b></A>
<dd>
Analyze an LLVM bytecode file.
<p>
<li><a href="html/llvm-dis.html"><b>llvm-dis</b></a> -
disassemble a bytecode file into a human-readable .ll file</li>
<dt><A href="opt.html"><b>opt</b></A>
<dd>
Optimize an LLVM bytecode file.
<p>
<li><a href="html/opt.html"><b>opt</b></a> -
run a series of LLVM-to-LLVM optimizations on a bytecode file</li>
<dt><A href="llc.html"><b>llc</b></A>
<dd>
Compile an LLVM bytecode program into native machine code.
<p>
<li><a href="html/llc.html"><b>llc</b></a> -
generate native machine code for a bytecode file</li>
<dt><A href="lli.html"><b>lli</b></A>
<dd>
Run an LLVM bytecode program using either an interpreter or a
JIT compiler.
<p>
<li><a href="html/lli.html"><b>lli</b></a> -
directly run a program compiled to bytecode using a JIT compiler or
interpreter</li>
<dt><A href="llvm-link.html"><b>llvm-link</b></A>
<dd>
Link several LLVM bytecode files together into one LLVM
bytecode file.
<p>
<li><a href="html/llvm-link.html"><b>llvm-link</b></a> -
link several bytecode files into one</li>
<dt><A href="llvm-nm.html"><b>llvm-nm</b></A>
<dd>
Print out the names and types of symbols in an LLVM bytecode file.
<p>
<li><a href="html/analyze.html"><b>analyze</b></a> -
run LLVM analyses on a bytecode file and print the results</li>
<dt><A href="llvm-prof.html"><b>llvm-prof</b></A>
<dd>
Transform raw '<tt>llvmprof.out</tt>' data into a human readable report.
<p>
</dl>
<li><a href="html/llvm-ar.html"><b>llvm-ar</b></a> -
archive bytecode files</li>
</td><td valign=top width=50%>
<li><a href="html/llvm-ranlib.html"><b>llvm-ranlib</b></a> -
create an index for archives made with llvm-ar</li>
<!--===============================================================-->
<center><h2><a name="llvmcmds">C and C++ Front-end Commands</a><hr></h2></center>
<!--===============================================================-->
<li><a href="html/llvm-nm.html"><b>llvm-nm</b></a> -
print out the names and types of symbols in a bytecode file</li>
<dl compact>
<dt><A href="llvmgcc.html"><b>llvmgcc</b></A>
<dd>
GCC-based C front end for LLVM.
<p>
<li><a href="html/llvm-prof.html"><b>llvm-prof</b></a> -
format raw `<tt>llvmprof.out</tt>' data into a human-readable report</li>
<dt><A href="llvmgxx.html"><b>llvmg++</b></A>
<dd>
GCC-based C++ front end for LLVM.
<p>
<li><a href="html/llvmc.html"><b>llvmc</b></a> -
generic and configurable compiler driver</li>
<dt><A href="gccas.html"><b>gccas</b></A>
<dd>
LLVM assembler used by GCC and other native compiler tools.
<p>
<li><a href="html/llvm-ld.html"><b>llvm-ld</b></a> -
general purpose linker with loadable runtime optimization support</li>
<dt><A href="gccld.html"><b>gccld</b></A>
<dd>
LLVM linker used by GCC and other native compiler tools.
</dl>
</ul>
<!--===============================================================-->
<center><h2><a name="llvmcmds">Debugging Tools</a><hr></h2></center>
<!--===============================================================-->
</div>
<dl compact>
<dt><A href="bugpoint.html"><b>bugpoint</b></A>
<dd>
Trace an LLVM bytecode program and reduce its failure to a
simple testcase.
<p>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="frontend">C, C++, and Stacker Front-end Commands</a>
</div>
<!-- *********************************************************************** -->
<div class="doc_text">
<ul>
<li><a href="html/llvmgcc.html"><b>llvmgcc</b></a> -
GCC-based C front-end for LLVM
<li><a href="html/llvmgxx.html"><b>llvmg++</b></a> -
GCC-based C++ front-end for LLVM</li>
<li><a href="html/gccas.html"><b>gccas</b></a> -
compile-time optimizer used by llvm-g++ and llvm-gcc</li>
<li><a href="html/gccld.html"><b>gccld</b></a> -
linker and link-time optimizer used by llvm-g++ and llvm-gcc</li>
<li><a href="html/stkrc.html"><b>stkrc</b></a> -
front-end compiler for the <a href="../Stacker.html">Stacker</a>
language</li>
</ul>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="debug">Debugging Tools</a>
</div>
<!-- *********************************************************************** -->
<dt><A href="extract.html"><b>extract</b></A>
<dd>
Extract a function from an LLVM bytecode file.
</dl>
</td></tr></table>
<div class="doc_text">
<ul>
<li><a href="html/bugpoint.html"><b>bugpoint</b></a> -
automatic test-case reducer</li>
<li><a href="html/llvm-extract.html"><b>llvm-extract</b></a> -
extract a function from an LLVM bytecode file</li>
<li><a href="html/llvm-bcanalyzer.html"><b>llvm-bcanalyzer</b></a> -
bytecode analyzer (analyzes the binary encoding itself, not the program it
represents)</li>
</ul>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
<hr><font size=-1>
Maintained by the
<a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.<br>
Last modified: $Date$
</font>
</body>
</html>

View File

@@ -0,0 +1,198 @@
<html>
<title>LLVM: llc tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llc</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llc</tt>
<h3>SYNOPSIS</h3>
<tt>llc [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>llc</tt> command compiles LLVM bytecode into assembly language for a
specified architecture. The assembly language output can then be passed through
a native assembler and linker to generate native code.
<p>
The choice of architecture for the output assembly code is determined as
follows:
<ul>
<li>
If the user has specified an architecture with the -m option, use that
architecture.
<p>
<li>
Examine the input LLVM bytecode file:
<ul>
<li>
If it specifies little endian and a pointer size of 32 bits, select the
x86 architecture.
<p>
<li>
If it specifies big endian and a pointer size of 64 bit pointers,
select the SparcV9 architecture.
</ul>
<p>
<li>
If <tt>llc</tt> was compiled on an architecture for which it can
generate code, select the architecture upon which <tt>llc</tt> was
compiled.
<p>
<li>
Print a message to the user asking him or her to specify the output
architecture explicitly.
</ul>
<p>
If filename is not specified, or if filename is -, <tt>llc</tt> reads its input
from standard input. Otherwise, it will read its input from filename.
<p>
If the -o option is left unspecified, then <tt>llc</tt> will send its output to standard
output if the input is from standard input. If the -o option specifies -, then
the output will also be sent to standard output.
<p>
If no -o option is specified and an input file other than - is specified, then
<tt>llc</tt> creates the output filename as follows:
<ul>
<li>
If the file ends in .bc, then the .bc suffix is removed, and the .s suffix
is appended.
<p>
<li>
Otherwise, the .s suffix is appended to the input filename.
</ul>
<h3>
OPTIONS
</h3>
<ul>
<li>-f
<br>
Overwrite output files
<p>
<li>-m&lt;arch&gt;
<br>
Specify the architecture for which to generate assembly. Valid
architectures are:
<dl compact>
<di> x86
<dd>IA-32 (Pentium and above)</dd>
<di> sparc
<dd>SPARC V9</dd>
</dl>
<p>
<li>-o &lt;filename&gt;
<br>
Specify the output filename.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
</ul>
<h4>X86 Specific Options</h4>
<ul>
<li>-disable-fp-elim
<br>
Disable frame pointer elimination optimization.
<p>
<li>-disable-pattern-isel
<br>
Use the 'simple' X86 instruction selector (the default).
<p>
<li>-print-machineinstrs
<br>
Print generated machine code.
<p>
<li>-regalloc=&lt;ra&gt;
<br>
Specify the register allocator to use. The default is <i>simple</i>.
Valid register allocators are:
<dl compact>
<di> simple
<dd>Very simple register allocator</dd>
<di> local
<dd>Local register allocator</dd>
</dl>
<p>
</ul>
<h4>Sparc Specific Options</h4>
<ul>
<li>-disable-peephole
<br>
Disable peephole optimization pass.
<p>
<li>-disable-preopt
<br>
Disable optimizations prior to instruction selection.
<p>
<li>-disable-sched
<br>
Disable local scheduling pass.
<p>
<li>-disable-strip
<br>
Do not strip the LLVM bytecode included in executable.
<p>
<li>-enable-maps
<br>
Emit LLVM-to-MachineCode mapping info to assembly.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>llc</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<a href="lli.html"><tt>lli</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,185 +0,0 @@
=pod
=head1 NAME
llc - LLVM static compiler
=head1 SYNOPSIS
B<llc> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<llc> command compiles LLVM bytecode into assembly language for a
specified architecture. The assembly language output can then be passed through
a native assembler and linker to generate a native executable.
The choice of architecture for the output assembly code is automatically
determined from the input bytecode file, unless the B<-march> option is used to
override the default.
=head1 OPTIONS
If I<filename> is - or omitted, B<llc> reads LLVM bytecode from standard input.
Otherwise, it will read LLVM bytecode from I<filename>.
If the B<-o> option is omitted, then B<llc> will send its output to standard
output if the input is from standard input. If the B<-o> option specifies -,
then the output will also be sent to standard output.
If no B<-o> option is specified and an input file other than - is specified,
then B<llc> creates the output filename by taking the input filename,
removing any existing F<.bc> extension, and adding a F<.s> suffix.
Other B<llc> options are as follows:
=head2 End-user Options
=over
=item B<--help>
Print a summary of command line options.
=item B<-f>
Overwrite output files. By default, B<llc> will refuse to overwrite
an output file which already exists.
=item B<-march>=I<arch>
Specify the architecture for which to generate assembly, overriding the target
encoded in the bytecode file. See the output of B<llc --help> for a list of
valid architectures.
=item B<--disable-fp-elim>
Disable frame pointer elimination optimization.
=item B<--disable-excess-fp-precision>
Disable optimizations that may produce excess precision for floating point.
Note that this option can dramatically slow down code on some systems
(e.g. X86).
=item B<--enable-unsafe-fp-math>
Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
addition is associative) or may not work for all input ranges. These
optimizations allow the code generator to make use of some instructions which
would otherwise not be usable (such as fsin on X86).
=item B<--enable-correct-eh-support>
Instruct the B<lowerinvoke> pass to insert code for correct exception handling
support. This is expensive and is by default omitted for efficiency.
=item B<--stats>
Print statistics recorded by code-generation passes.
=item B<--time-passes>
Record the amount of time needed for each pass and print a report to standard
error.
=item B<--load>=F<dso_path>
Dynamically load F<dso_path> (a path to a dynamically shared object) that
implements an LLVM target. This will permit the target name to be used with the
B<-march> option so that code can be generated for that target.
=back
=head2 Tuning/Configuration Options
=over
=item B<--print-machineinstrs>
Print generated machine code between compilation phases (useful for debugging).
=item B<--regalloc>=I<allocator>
Specify the register allocator to use. The default I<allocator> is I<local>.
Valid register allocators are:
=over
=item I<simple>
Very simple "always spill" register allocator
=item I<local>
Local register allocator
=item I<linearscan>
Linear scan global register allocator
=item I<iterativescan>
Iterative scan global register allocator
=back
=item B<--spiller>=I<spiller>
Specify the spiller to use for register allocators that support it. Currently
this option is used only by the linear scan register allocator. The default
I<spiller> is I<local>. Valid spillers are:
=over
=item I<simple>
Simple spiller
=item I<local>
Local spiller
=back
=back
=head2 Intel IA-32-specific Options
=over
=item B<--x86-asm-syntax=att|intel>
Specify whether to emit assembly code in AT&T syntax (the default) or intel
syntax.
=back
=head2 SPARCV9-specific Options
=over
=item B<--disable-peephole>
Disable peephole optimization pass.
=item B<--disable-sched>
Disable local scheduling pass.
=back
=head1 EXIT STATUS
If B<llc> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
=head1 SEE ALSO
L<lli|lli>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,107 @@
<html>
<title>
LLVM: lli tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>lli</tt> tool</h1>
</center>
<HR>
<h3>
NAME
</h3>
<tt>lli</tt>
<h3>
SYNOPSIS
</h3>
<tt>lli [options] [filename] [args ...]</tt>
<h3>
DESCRIPTION
</h3>
<tt>lli</tt> directly executes programs in LLVM format.
It takes a program in LLVM
bytecode format and executes it using a just-in-time
compiler, if one is available for the current architecture, or an interpreter.
<tt>lli</tt> takes all of the same code generator options as the
<tt><a href="llc.html">llc</a></tt> tool, but they are only applicable when
the just-in-time compiler is being used.
<p>
If filename is not specified, then <tt>lli</tt> reads the LLVM bytecode for
the program from standard input.
<p>
The optional "args" specified on the command line are passed to the
program as arguments.
<p>
<h3>
OPTIONS
</h3>
<ul>
<li> <tt>-help</tt>
<br>
Print a summary of command line options.
<p>
<li> <tt>-stats</tt>
<br>
Print statistics from the code-generation passes. This is only meaningful
for the just-in-time compiler, at present.
<p>
<li> <tt>-time-passes</tt>
<br>
Record the amount of time needed for each code-generation pass and print
it to standard error.
<p>
<li> <tt>-march=&lt;arch&gt;</tt>
<br>
Use the specified non-default architecture when selecting a code generator
for the just-in-time compiler. This may result in a crash if you pick an
architecture which is not compatible with the hardware you are running
<tt>lli</tt> on.
<p>
<li> <tt>-force-interpreter={false,true}</tt>
<br>
If set to true, use the interpreter even if a just-in-time compiler is
available for this architecture. Defaults to false.
<p>
<li> <tt>-f=&lt;name&gt;</tt>
<br>
Call the function named <tt>&lt;name&gt;</tt> to start the program.
Note: The function is assumed to have the C signature <tt>int
<tt>&lt;name&gt;</tt> (int, char **, char **)</tt>.
If you try to use this option to call a function of incompatible type,
undefined behavior may result. Defaults to "main".
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>lli</tt> fails to load the program, it will exit with an exit code of 1.
Otherwise, it will return the exit code of the program it executes.
<h3>
SEE ALSO
</h3>
<a href="llc.html"><tt>llc</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,76 +0,0 @@
=pod
=head1 NAME
lli - directly execute programs from LLVM bytecode
=head1 SYNOPSIS
B<lli> [I<options>] [I<filename>] [I<program args>]
=head1 DESCRIPTION
B<lli> directly executes programs in LLVM bytecode format. It takes a program
in LLVM bytecode format and executes it using a just-in-time compiler, if one is
available for the current architecture, or an interpreter. B<lli> takes all of
the same code generator options as L<llc|llc>, but they are only effective when
B<lli> is using the just-in-time compiler.
If I<filename> is not specified, then B<lli> reads the LLVM bytecode for the
program from standard input.
The optional I<args> specified on the command line are passed to the program as
arguments.
=head1 OPTIONS
=over
=item B<-help>
Print a summary of command line options.
=item B<-stats>
Print statistics from the code-generation passes. This is only meaningful for
the just-in-time compiler, at present.
=item B<-time-passes>
Record the amount of time needed for each code-generation pass and print it to
standard error.
=item B<-march>=I<arch>
Use the specified non-default architecture arch when selecting a code generator
for the just-in-time compiler. This may result in a crash if you pick an
architecture which is not compatible with the hardware you are running B<lli> on.
=item B<-force-interpreter>=I<{false,true}>
If set to true, use the interpreter even if a just-in-time compiler is available
for this architecture. Defaults to false.
=item B<-f>=I<name>
Call the function named I<name> to start the program. Note: The
function is assumed to have the C signature C<int> I<name> C<(int,
char **, char **)>. If you try to use this option to call a function of
incompatible type, undefined behavior may result. Defaults to C<main>.
=back
=head1 EXIT STATUS
If B<lli> fails to load the program, it will exit with an exit code of 1.
Otherwise, it will return the exit code of the program it executes.
=head1 SEE ALSO
L<llc|llc>
=head1 AUTHOR
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,406 +0,0 @@
=pod
=head1 NAME
llvm-ar - LLVM archiver
=head1 SYNOPSIS
B<llvm-ar> [-]{dmpqrtx}[Rabfikouz] [relpos] [count] <archive> [files...]
=head1 DESCRIPTION
The B<llvm-ar> command is similar to the common Unix utility, C<ar>. It
archives several files together into a single file. The intent for this is
to produce archive libraries by LLVM bytecode that can be linked into an
LLVM program. However, the archive can contain any kind of file. By default,
B<llvm-ar> generates a symbol table that makes linking faster because
only the symbol table needs to be consulted, not each individual file member
of the archive.
The B<llvm-ar> command can be used to I<read> both SVR4 and BSD style archive
files. However, it cannot be used to write them. While the B<llvm-ar> command
produces files that are I<almost> identical to the format used by other C<ar>
implementations, it has two significant departures in order to make the
archive appropriate for LLVM. The first departure is that B<llvm-ar> only
uses BSD4.4 style long path names (stored immediately after the header) and
never contains a string table for long names. The second departure is that the
symbol table is formated for efficient construction of an in-memory data
structure that permits rapid (red-black tree) lookups. Consequently, archives
produced with B<llvm-ar> usually won't be readable or editable with any
C<ar> implementation or useful for linking. Using the C<f> modifier to flatten
file names will make the archive readable by other C<ar> implementations
but not for linking because the symbol table format for LLVM is unique. If an
SVR4 or BSD style archive is used with the C<r> (replace) or C<q> (quick
update) operations, the archive will be reconstructed in LLVM format. This
means that the string table will be dropped (in deference to BSD 4.4 long names)
and an LLVM symbol table will be added (by default). The system symbol table
will be retained.
Here's where B<llvm-ar> departs from previous C<ar> implementations:
=over
=item I<Symbol Table>
Since B<llvm-ar> is intended to archive bytecode files, the symbol table
won't make much sense to anything but LLVM. Consequently, the symbol table's
format has been simplified. It consists simply of a sequence of pairs
of a file member index number as an LSB 4byte integer and a null-terminated
string.
=item I<Long Paths>
Some C<ar> implementations (SVR4) use a separate file member to record long
path names (> 15 characters). B<llvm-ar> takes the BSD 4.4 and Mac OS X
approach which is to simply store the full path name immediately preceding
the data for the file. The path name is null terminated and may contain the
slash (/) character.
=item I<Compression>
B<llvm-ar> can compress the members of an archive to save space. The
compression used depends on what's available on the platform and what choices
the LLVM Compressor utility makes. It generally favors bzip2 but will select
between "no compression" or bzip2 depending on what makes sense for the
file's content.
=item I<Directory Recursion>
Most C<ar> implementations do not recurse through directories but simply
ignore directories if they are presented to the program in the F<files>
option. B<llvm-ar>, however, can recurse through directory structures and
add all the files under a directory, if requested.
=item I<TOC Verbose Output>
When B<llvm-ar> prints out the verbose table of contents (C<tv> option), it
precedes the usual output with a character indicating the basic kind of
content in the file. A blank means the file is a regular file. A 'Z' means
the file is compressed. A 'B' means the file is an LLVM bytecode file. An
'S' means the file is the symbol table.
=back
=head1 OPTIONS
The options to B<llvm-ar> are compatible with other C<ar> implementations.
However, there are a few modifiers (F<zR>) that are not found in other
C<ar>s. The options to B<llvm-ar> specify a single basic operation to
perform on the archive, a variety of modifiers for that operation, the
name of the archive file, and an optional list of file names. These options
are used to determine how B<llvm-ar> should process the archive file.
The Operations and Modifiers are explained in the sections below. The minimal
set of options is at least one operator and the name of the archive. Typically
archive files end with a C<.a> suffix, but this is not required. Following
the F<archive-name> comes a list of F<files> that indicate the specific members
of the archive to operate on. If the F<files> option is not specified, it
generally means either "none" or "all" members, depending on the operation.
=head2 Operations
=over
=item d
Delete files from the archive. No modifiers are applicable to this operation.
The F<files> options specify which members should be removed from the
archive. It is not an error if a specified file does not appear in the archive.
If no F<files> are specified, the archive is not modified.
=item m[abi]
Move files from one location in the archive to another. The F<a>, F<b>, and
F<i> modifiers apply to this operation. The F<files> will all be moved
to the location given by the modifiers. If no modifiers are used, the files
will be moved to the end of the archive. If no F<files> are specified, the
archive is not modified.
=item p[k]
Print files to the standard output. The F<k> modifier applies to this
operation. This operation simply prints the F<files> indicated to the
standard output. If no F<files> are specified, the entire archive is printed.
Printing bytecode files is ill-advised as they might confuse your terminal
settings. The F<p> operation never modifies the archive.
=item q[Rfz]
Quickly append files to the end of the archive. The F<R>, F<f>, and F<z>
modifiers apply to this operation. This operation quickly adds the
F<files> to the archive without checking for duplicates that should be
removed first. If no F<files> are specified, the archive is not modified.
Because of the way that B<llvm-ar> constructs the archive file, its dubious
whether the F<q> operation is any faster than the F<r> operation.
=item r[Rabfuz]
Replace or insert file members. The F<R>, F<a>, F<b>, F<f>, F<u>, and F<z>
modifiers apply to this operation. This operation will replace existing
F<files> or insert them at the end of the archive if they do not exist. If no
F<files> are specified, the archive is not modified.
=item t[v]
Print the table of contents. Without any modifiers, this operation just prints
the names of the members to the standard output. With the F<v> modifier,
B<llvm-ar> also prints out the file type (B=bytecode, Z=compressed, S=symbol
table, blank=regular file), the permission mode, the owner and group, the
size, and the date. If any F<files> are specified, the listing is only for
those files. If no F<files> are specified, the table of contents for the
whole archive is printed.
=item x[oP]
Extract archive members back to files. The F<o> modifier applies to this
operation. This operation retrieves the indicated F<files> from the archive
and writes them back to the operating system's file system. If no
F<files> are specified, the entire archive is extract.
=back
=head2 Modifiers (operation specific)
The modifiers below are specific to certain operations. See the Operations
section (above) to determine which modifiers are applicable to which operations.
=over
=item [a]
When inserting or moving member files, this option specifies the destination of
the new files as being C<a>fter the F<relpos> member. If F<relpos> is not found,
the files are placed at the end of the archive.
=item [b]
When inserting or moving member files, this option specifies the destination of
the new files as being C<b>efore the F<relpos> member. If F<relpos> is not
found, the files are placed at the end of the archive. This modifier is
identical to the the F<i> modifier.
=item [f]
Normally, B<llvm-ar> stores the full path name to a file as presented to it on
the command line. With this option, truncated (15 characters max) names are
used. This ensures name compatibility with older versions of C<ar> but may also
thwart correct extraction of the files (duplicates may overwrite). If used with
the F<R> option, the directory recursion will be performed but the file names
will all be C<f>lattened to simple file names.
=item [i]
A synonym for the F<b> option.
=item [k]
Normally, B<llvm-ar> will not print the contents of bytecode files when the
F<p> operation is used. This modifier defeats the default and allows the
bytecode members to be printed.
=item [N]
This option is ignored by B<llvm-ar> but provided for compatibility.
=item [o]
When extracting files, this option will cause B<llvm-ar> to preserve the
original modification times of the files it writes.
=item [P]
use full path names when matching
=item [R]
This modifier instructions the F<r> option to recursively process directories.
Without F<R>, directories are ignored and only those F<files> that refer to
files will be added to the archive. When F<R> is used, any directories specified
with F<files> will be scanned (recursively) to find files to be added to the
archive. Any file whose name begins with a dot will not be added.
=item [u]
When replacing existing files in the archive, only replace those files that have
a time stamp than the time stamp of the member in the archive.
=item [z]
When inserting or replacing any file in the archive, compress the file first.
This
modifier is safe to use when (previously) compressed bytecode files are added to
the archive; the compressed bytecode files will not be doubly compressed.
=back
=head2 Modifiers (generic)
The modifiers below may be applied to any operation.
=over
=item [c]
For all operations, B<llvm-ar> will always create the archive if it doesn't
exist. Normally, B<llvm-ar> will print a warning message indicating that the
archive is being created. Using this modifier turns off that warning.
=item [s]
This modifier requests that an archive index (or symbol table) be added to the
archive. This is the default mode of operation. The symbol table will contain
all the externally visible functions and global variables defined by all the
bytecode files in the archive. Using this modifier is more efficient that using
L<llvm-ranlib|llvm-ranlib> which also creates the symbol table.
=item [S]
This modifier is the opposite of the F<s> modifier. It instructs B<llvm-ar> to
not build the symbol table. If both F<s> and F<S> are used, the last modifier to
occur in the options will prevail.
=item [v]
This modifier instructs B<llvm-ar> to be verbose about what it is doing. Each
editing operation taken against the archive will produce a line of output saying
what is being done.
=back
=head1 STANDARDS
The B<llvm-ar> utility is intended to provide a superset of the IEEE Std 1003.2
(POSIX.2) functionality for C<ar>. B<llvm-ar> can read both SVR4 and BSD4.4 (or
Mac OS X) archives. If the C<f> modifier is given to the C<x> or C<r> operations
then B<llvm-ar> will write SVR4 compatible archives. Without this modifier,
B<llvm-ar> will write BSD4.4 compatible archives that have long names
immediately after the header and indicated using the "#1/ddd" notation for the
name in the header.
=head1 FILE FORMAT
The file format for LLVM Archive files is similar to that of BSD 4.4 or Mac OSX
archive files. In fact, except for the symbol table, the C<ar> commands on those
operating systems should be able to read LLVM archive files. The details of the
file format follow.
Each archive begins with the archive magic number which is the eight printable
characters "!<arch>\n" where \n represents the newline character (0x0A).
Following the magic number, the file is composed of even length members that
begin with an archive header and end with a \n padding character if necessary
(to make the length even). Each file member is composed of a header (defined
below), an optional newline-terminated "long file name" and the contents of
the file.
The fields of the header are described in the items below. All fields of the
header contain only ASCII characters, are left justified and are right padded
with space characters.
=over
=item name - char[16]
This field of the header provides the name of the archive member. If the name is
longer than 15 characters or contains a slash (/) character, then this field
contains C<#1/nnn> where C<nnn> provides the length of the name and the C<#1/>
is literal. In this case, the actual name of the file is provided in the C<nnn>
bytes immediately following the header. If the name is 15 characters or less, it
is contained directly in this field and terminated with a slash (/) character.
=item date - char[12]
This field provides the date of modification of the file in the form of a
decimal encoded number that provides the number of seconds since the epoch
(since 00:00:00 Jan 1, 1970) per Posix specifications.
=item uid - char[6]
This field provides the user id of the file encoded as a decimal ASCII string.
This field might not make much sense on non-Unix systems. On Unix, it is the
same value as the st_uid field of the stat structure returned by the stat(2)
operating system call.
=item gid - char[6]
This field provides the group id of the file encoded as a decimal ASCII string.
This field might not make much sense on non-Unix systems. On Unix, it is the
same value as the st_gid field of the stat structure returned by the stat(2)
operating system call.
=item mode - char[8]
This field provides the access mode of the file encoded as an octal ASCII
string. This field might not make much sense on non-Unix systems. On Unix, it
is the same value as the st_mode field of the stat structure returned by the
stat(2) operating system call.
=item size - char[10]
This field provides the size of the file, in bytes, encoded as a decimal ASCII
string. If the size field is negative (starts with a minus sign, 0x02D), then
the archive member is stored in compressed form. The first byte of the archive
member's data indicates the compression type used. A value of 0 (0x30) indicates
that no compression was used. A value of 2 (0x32) indicates that bzip2
compression was used.
=item fmag - char[2]
This field is the archive file member magic number. Its content is always the
two characters back tick (0x60) and newline (0x0A). This provides some measure
utility in identifying archive files that have been corrupted.
=back
The LLVM symbol table has the special name "#_LLVM_SYM_TAB_#". It is presumed
that no regular archive member file will want this name. The LLVM symbol table
is simply composed of a sequence of triplets: byte offset, length of symbol,
and the symbol itself. Symbols are not null or newline terminated. Here are
the details on each of these items:
=over
=item offset - vbr encoded 32-bit integer
The offset item provides the offset into the archive file where the bytecode
member is stored that is associated with the symbol. The offset value is 0
based at the start of the first "normal" file member. To derive the actual
file offset of the member, you must add the number of bytes occupied by the file
signature (8 bytes) and the symbol tables. The value of this item is encoded
using variable bit rate encoding to reduce the size of the symbol table.
Variable bit rate encoding uses the high bit (0x80) of each byte to indicate
if there are more bytes to follow. The remaining 7 bits in each byte carry bits
from the value. The final byte does not have the high bit set.
=item length - vbr encoded 32-bit integer
The length item provides the length of the symbol that follows. Like this
I<offset> item, the length is variable bit rate encoded.
=item symbol - character array
The symbol item provides the text of the symbol that is associated with the
I<offset>. The symbol is not terminated by any character. Its length is provided
by the I<length> field. Note that is allowed (but unwise) to use non-printing
characters (even 0x00) in the symbol. This allows for multiple encodings of
symbol names.
=back
=head1 EXIT STATUS
If B<llvm-ar> succeeds, it will exit with 0. A usage error, results
in an exit code of 1. A hard (file system typically) error results in an
exit code of 2. Miscellaneous or unknown errors result in an
exit code of 3.
=head1 SEE ALSO
L<llvm-ranlib|llvm-ranlib>, L<ar(1)>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,97 @@
<html>
<title>
LLVM: llvm-as tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-as</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-as</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-as [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-as</tt> command is the LLVM assembler. It reads a file containing
human readable LLVM assembly language, translates it to LLVM bytecode, and
writes the result into a file or to standard output.
<p>
If filename is omitted or is -, then <tt>llvm-as</tt> reads its input from
standard input.
<p>
If an output file is not specified with the <tt>-o</tt> option, then
<tt>llvm-as</tt> sends its output to a file or standard output by the following
logic:
<ul>
<li>
If the input is standard input, then the output is standard output.
<p>
<li>
If the input is a file that ends with .ll, then the output file is of
the same name, except that the suffix is changed to .bc.
<p>
<li>
If the input is a file that does not end with the .ll suffix, then the
output file has the same name as the input file, except that the .bc
suffix is appended.
<p>
</ul>
<h3>OPTIONS</h3>
<ul>
<li> -f
<br>
Force overwrite. Normally, <tt>llvm-as</tt> will refuse to overwrite an
output file that already exists. With this option, <tt>llvm-as</tt>
will overwrite the output file and replace it with new bytecode.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename. If filename is -, then <tt>llvm-as</tt>
sends its output to standard output.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>llvm-as</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-dis.html"><tt>llvm-dis</tt></a>
<a href="gccas.html"><tt>gccas</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,77 +0,0 @@
=pod
=head1 NAME
llvm-as - LLVM assembler
=head1 SYNOPSIS
B<llvm-as> [I<options>] [I<filename>]
=head1 DESCRIPTION
B<llvm-as> is the LLVM assembler. It reads a file containing human-readable
LLVM assembly language, translates it to LLVM bytecode, and writes the result
into a file or to standard output.
If F<filename> is omitted or is C<->, then B<llvm-as> reads its input from
standard input.
If an output file is not specified with the B<-o> option, then
B<llvm-as> sends its output to a file or standard output by following
these rules:
=over
=item *
If the input is standard input, then the output is standard output.
=item *
If the input is a file that ends with C<.ll>, then the output file is of
the same name, except that the suffix is changed to C<.bc>.
=item *
If the input is a file that does not end with the C<.ll> suffix, then the
output file has the same name as the input file, except that the C<.bc>
suffix is appended.
=back
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-as> will refuse to overwrite an
output file that already exists. With this option, B<llvm-as>
will overwrite the output file and replace it with new bytecode.
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-as>
sends its output to standard output.
=back
=head1 EXIT STATUS
If B<llvm-as> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-dis|llvm-dis>, L<gccas|gccas>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,315 +0,0 @@
=pod
=head1 NAME
llvm-bcanalyzer - LLVM bytecode analyzer
=head1 SYNOPSIS
B<llvm-bcanalyzer> [I<options>] [F<filename>]
=head1 DESCRIPTION
The B<llvm-bcanalyzer> command is a small utility for analyzing bytecode files.
The tool reads a bytecode file (such as generated with the B<llvm-as> tool) and
produces a statistical report on the contents of the byteocde file. The tool
can also dump a low level but human readable version of the bytecode file.
This tool is probably not of much interest or utility except for those working
directly with the bytecode file format. Most LLVM users can just ignore
this tool.
If F<filename> is omitted or is C<->, then B<llvm-bcanalyzer> reads its input
from standard input. This is useful for combining the tool into a pipeline.
Output is written to the standard output.
=head1 OPTIONS
=over
=item B<-nodetails>
Causes B<llvm-bcanalyzer> to abbreviate its output by writing out only a module
level summary. The details for individual functions are not displayed.
=item B<-dump>
Causes B<llvm-bcanalyzer> to dump the bytecode in a human readable format. This
format is significantly different from LLVM assembly and provides details about
the encoding of the bytecode file.
=item B<-verify>
Causes B<llvm-bcanalyzer> to verify the module produced by reading the
bytecode. This ensures that the statistics generated are based on a consistent
module.
=item B<--help>
Print a summary of command line options.
=back
=head1 EXIT STATUS
If B<llvm-bcanalyzer> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value, usually 1.
=head1 SUMMARY OUTPUT DEFINITIONS
The following items are always printed by llvm-bcanalyzer. They comprize the
summary output.
=over
=item B<Bytecode Analysis Of Module>
This just provides the name of the module for which bytecode analysis is being
generated.
=item B<Bytecode Version Number>
The bytecode version (not LLVM version) of the file read by the analyzer.
=item B<File Size>
The size, in bytes, of the entire bytecode file.
=item B<Module Bytes>
The size, in bytes, of the module block. Percentage is relative to File Size.
=item B<Function Bytes>
The size, in bytes, of all the function blocks. Percentage is relative to File
Size.
=item B<Global Types Bytes>
The size, in bytes, of the Global Types Pool. Percentage is relative to File
Size. This is the size of the definitions of all types in the bytecode file.
=item B<Constant Pool Bytes>
The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
Size.
=item B<Module Globals Bytes>
Ths size, in bytes, of the Global Variable Definitions and their initializers.
Percentage is relative to File Size.
=item B<Instruction List Bytes>
The size, in bytes, of all the instruction lists in all the functions.
Percentage is relative to File Size. Note that this value is also included in
the Function Bytes.
=item B<Compaction Table Bytes>
The size, in bytes, of all the compaction tables in all the functions.
Percentage is relative to File Size. Note that this value is also included in
the Function Bytes.
=item B<Symbol Table Bytes>
The size, in bytes, of all the symbol tables in all the functions. Percentage is
relative to File Size. Note that this value is also included in the Function
Bytes.
=item B<Dependent Libraries Bytes>
The size, in bytes, of the list of dependent libraries in the module. Percentage
is relative to File Size. Note that this value is also included in the Module
Global Bytes.
=item B<Number Of Bytecode Blocks>
The total number of blocks of any kind in the bytecode file.
=item B<Number Of Functions>
The total number of function definitions in the bytecode file.
=item B<Number Of Types>
The total number of types defined in the Global Types Pool.
=item B<Number Of Constants>
The total number of constants (of any type) defined in the Constant Pool.
=item B<Number Of Basic Blocks>
The total number of basic blocks defined in all functions in the bytecode file.
=item B<Number Of Instructions>
The total number of instructions defined in all functions in the bytecode file.
=item B<Number Of Long Instructions>
The total number of long instructions defined in all functions in the bytecode
file. Long instructions are those taking greater than 4 bytes. Typically long
instructions are GetElementPtr with several indices, PHI nodes, and calls to
functions with large numbers of arguments.
=item B<Number Of Operands>
The total number of operands used in all instructions in the bytecode file.
=item B<Number Of Compaction Tables>
The total number of compaction tables in all functions in the bytecode file.
=item B<Number Of Symbol Tables>
The total number of symbol tables in all functions in the bytecode file.
=item B<Number Of Dependent Libs>
The total number of dependent libraries found in the bytecode file.
=item B<Total Instruction Size>
The total size of the instructions in all functions in the bytecode file.
=item B<Average Instruction Size>
The average number of bytes per instruction across all functions in the bytecode
file. This value is computed by dividing Total Instruction Size by Number Of
Instructions.
=item B<Maximum Type Slot Number>
The maximum value used for a type's slot number. Larger slot number values take
more bytes to encode.
=item B<Maximum Value Slot Number>
The maximum value used for a value's slot number. Larger slot number values take
more bytes to encode.
=item B<Bytes Per Value>
The average size of a Value definition (of any type). This is computed by
dividing File Size by the total number of values of any type.
=item B<Bytes Per Global>
The average size of a global definition (constants and global variables).
=item B<Bytes Per Function>
The average number of bytes per function definition. This is computed by
dividing Function Bytes by Number Of Functions.
=item B<# of VBR 32-bit Integers>
The total number of 32-bit integers encoded using the Variable Bit Rate
encoding scheme.
=item B<# of VBR 64-bit Integers>
The total number of 64-bit integers encoded using the Variable Bit Rate encoding
scheme.
=item B<# of VBR Compressed Bytes>
The total number of bytes consumed by the 32-bit and 64-bit integers that use
the Variable Bit Rate encoding scheme.
=item B<# of VBR Expanded Bytes>
The total number of bytes that would have been consumed by the 32-bit and 64-bit
integers had they not been compressed with the Variable Bit Rage encoding
scheme.
=item B<Bytes Saved With VBR>
The total number of bytes saved by using the Variable Bit Rate encoding scheme.
The percentage is relative to # of VBR Expanded Bytes.
=back
=head1 DETAILED OUTPUT DEFINITIONS
The following definitions occur only if the -nodetails option was not given.
The detailed output provides additional information on a per-function basis.
=over
=item B<Type>
The type signature of the function.
=item B<Byte Size>
The total number of bytes in the function's block.
=item B<Basic Blocks>
The number of basic blocks defined by the function.
=item B<Instructions>
The number of instructions defined by the function.
=item B<Long Instructions>
The number of instructions using the long instruction format in the function.
=item B<Operands>
The number of operands used by all instructions in the function.
=item B<Instruction Size>
The number of bytes consumed by instructions in the function.
=item B<Average Instruction Size>
The average number of bytes consumed by the instructions in the funtion. This
value is computed by dividing Instruction Size by Instructions.
=item B<Bytes Per Instruction>
The average number of bytes used by the function per instruction. This value is
computed by dividing Byte Size by Instructions. Note that this is not the same
as Average Instruction Size. It computes a number relative to the total function
size not just the size of the instruction list.
=item B<Number of VBR 32-bit Integers>
The total number of 32-bit integers found in this function (for any use).
=item B<Number of VBR 64-bit Integers>
The total number of 64-bit integers found in this function (for any use).
=item B<Number of VBR Compressed Bytes>
The total number of bytes in this function consumed by the 32-bit and 64-bit
integers that use the Variable Bit Rate encoding scheme.
=item B<Number of VBR Expanded Bytes>
The total number of bytes in this function that would have been consumed by
the 32-bit and 64-bit integers had they not been compressed with the Variable
Bit Rate encoding scheme.
=item B<Bytes Saved With VBR>
The total number of bytes saved in this function by using the Variable Bit
Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes.
=back
=head1 SEE ALSO
L<llvm-dis|llvm-dis>, L<http://llvm.cs.uiuc.edu/docs/BytecodeFormat.html>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,16 +0,0 @@
=pod
=head1 NAME
llvm-db - LLVM debugger (alpha)
=head1 SYNOPSIS
Details coming soon. Please see
L<http://llvm.cs.uiuc.edu/docs/SourceLevelDebugging.html> in the meantime.
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,99 @@
<html>
<title>
LLVM: llvm-dis tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-dis</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-dis</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-dis [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-dis</tt> command is the LLVM disassembler. It takes an LLVM
bytecode file and converts it into LLVM assembly language or C source code with
equivalent functionality.
<p>
If filename is omitted, <tt>llvm-dis</tt> reads its input from standard input.
<p>
The default output file for <tt>llvm-dis</tt> is determined by the following logic:
<ul>
<li>
If the input is standard input or the file -, then the output is
standard output.
<p>
<li>
If the input filename ends in .bc, then the output filename will be
identical, except that the .bc suffix will be replaced by the .ll or .c
suffix (for LLVM assembly language and C code, respectively).
<p>
<li>
If the input filename does not end in .bc, then the output filename will
be identical to the input filename, except that the .ll or .c suffix
will be appended to the filename (for LLVM assembly language and C code,
respectively).
</ul>
<h3>OPTIONS</h3>
<ul>
<li> -llvm
<br>
Instruct <tt>llvm-dis</tt> to generate LLVM assembly code in human
readable format. This is the default behavior.
<p>
<li> -c
<br>
Instruct <tt>llvm-dis</tt> to generate C source code.
<p>
<li> -f
<br>
Force overwrite. Normally, <tt>llvm-dis</tt> will refuse to overwrite
an output file that already exists. With this option, <tt>llvm-dis</tt>
will overwrite the output file.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename. If filename is -, then the output is sent
to standard output.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>llvm-dis</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="llvm-as.html"><tt>llvm-as</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,60 +0,0 @@
=pod
=head1 NAME
llvm-dis - LLVM disassembler
=head1 SYNOPSIS
B<llvm-dis> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<llvm-dis> command is the LLVM disassembler. It takes an LLVM
bytecode file and converts it into human-readable LLVM assembly language.
If filename is omitted or specified as C<->, B<llvm-dis> reads its
input from standard input.
If the input is being read from standard input, then B<llvm-dis>
will send its output to standard output by default. Otherwise, the
output will be written to a file named after the input file, with
a C<.ll> suffix added (any existing C<.bc> suffix will first be
removed). You can override the choice of output file using the
B<-o> option.
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-dis> will refuse to overwrite
an output file that already exists. With this option, B<llvm-dis>
will overwrite the output file.
=item B<--help>
Print a summary of command line options.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is -, then the output is sent
to standard output.
=back
=head1 EXIT STATUS
If B<llvm-dis> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-as|llvm-as>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,63 +0,0 @@
=pod
=head1 NAME
llvm-extract - extract a function from an LLVM module
=head1 SYNOPSIS
B<llvm-extract> [I<options>] B<--func> I<function-name> [I<filename>]
=head1 DESCRIPTION
The B<llvm-extract> command takes the name of a function and extracts it from
the specified LLVM bytecode file. It is primarily used as a debugging tool to
reduce test cases from larger programs that are triggering a bug.
In addition to extracting the bytecode of the specified function,
B<llvm-extract> will also remove unreachable global variables, prototypes, and
unused types.
The B<llvm-extract> command reads its input from standard input if filename is
omitted or if filename is -. The output is always written to standard output,
unless the B<-o> option is specified (see below).
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<llvm-extract> will refuse to overwrite an
output file that already exists. With this option, B<llvm-extract>
will overwrite the output file and replace it with new bytecode.
=item B<--func> I<function-name>
Extract the function named I<function-name> from the LLVM bytecode.
=item B<--help>
Print a summary of command line options.
=item B<-o> I<filename>
Specify the output filename. If filename is "-" (the default), then
B<llvm-extract> sends its output to standard output.
=back
=head1 EXIT STATUS
If B<llvm-extract> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<bugpoint|bugpoint>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,171 +0,0 @@
=pod
=head1 NAME
llvm-ld - LLVM linker
=head1 SYNOPSIS
B<llvm-ld> <options> <files>
=head1 DESCRIPTION
The B<llvm-ld> command is similar to the common Unix utility, C<ld>. It
links together bytecode modules to produce an executable program.
=head1 OPTIONS
=head2 Input/Output Options
=over
=item B<-o> F<filename>
This overrides the default output file and specifies the name of the file that
should be generated by the linker. By default, B<llvm-ld> generates a file named
F<a.out> for compatibility with B<ld>. The output will be written to
F<filename>.
=item B<-l>F<name>
This option specifies the F<name> of a library to search when resolving symbols
for the program. Only the base name should be specified as F<name>, without a
F<lib> prefix or any suffix.
=item B<-L>F<Path>
This option tells B<llvm-ld> to look in F<Path> to find any library subsequently
specified with the B<-l> option. The paths will be searched in the order in
which they are specified on the command line. If the library is still not found,
a small set of system specific directories will also be searched. Note that
libraries specified with the B<-l> option that occur I<before> any B<-L> options
will not search the paths given by the B<-L> options following it.
=item B<-link-as-library>
Link the bytecode files together as a library, not an executable. In this mode,
undefined symbols will be permitted.
=item B<-r>
An alias for -link-as-library.
=item B<-march=>C<target>
Specifies the kind of machine for which code or assembly should be generated.
=item B<-native>
Generate a native binary instead of a shell script that runs the JIT from
bytecode.
=item B<-native-cbe>
Generate a native binary with the C back end and compilation with GCC.
=item B<-disable-compression>
Do not compress bytecode files.
=back
=head2 Optimization Options
=over
=item B<-O0>
An alias for the -O1 option.
=item B<-O1>
Optimize for linking speed, not execution speed. The optimizer will attempt to
reduce the size of the linked program to reduce I/O but will not otherwise
perform any link-time optimizations.
=item B<-O2>
Perform only the minimal or required set of scalar optimizations.
=item B<-03>
An alias for the -O2 option.
=item B<-04>
Perform the standard link time inter-procedural optimizations. This will
attempt to optimize the program taking the entire program into consideration.
=item B<-O5>
Perform aggressive link time optimizations. This is the same as -O4 but works
more aggressively to optimize the program.
=item B<-disable-inlining>
Do not run the inlining pass. Functions will not be inlined into other
functions.
=item B<-disable-opt>
Completely disable optimization. The various B<-On> options will be ignored and
no link time optimization passes will be run.
=item B<-disable-internalize>
Do not mark all symbols as internal.
=item B<-verify>
Run the verification pass after each of the passes to verify intermediate
results.
=item B<-s>
Strip symbol info from the executable to make it smaller.
=item B<-export-dynamic>
An alias for -disable-internalize
=item B<-load> F<module>
Load an optimization module, F<module>, which is expected to be a dynamic
library that provides the function name C<RunOptimizations>. This function will
be passed the PassManager, and the optimization level (values 0-5 based on the
B<-On> option). This function may add passes to the PassManager that should be
run. This feature allows the optimization passes of B<llvm-ld> to be extended.
=back
=head2 Miscellaneous Options
=over
=item B<-v>
Specifies verbose mode. In this mode the linker will print additional
information about the actions it takes, programs it executes, etc.
=back
=head1 EXIT STATUS
If B<llvm-ld> succeeds, it will exit with 0 return code. If an error occurs,
it will exit with a non-zero return code.
=head1 ENVIRONMENT
The C<LLVM_LIB_SEARCH_PATH> environment variable is used to find bytecode
libraries. Any paths specified in this variable will be searched after the C<-L>
options.
=head1 SEE ALSO
L<llvm-ar|llvm-ar>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,88 @@
<html>
<title>
LLVM: llvm-link tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-link</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-link</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-link [options] &lt;filename&gt; [filename ...]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-link</tt> command takes several LLVM bytecode files and links them
together into a single LLVM bytecode file. It writes the output file to
standard output, unless the -o option is used to specify a filename.
<p>
The <tt>llvm-link</tt> command attempts to load the input files from the current
directory. If that fails, it looks for each file in each of the
directories specified by the -L options on the command line. The library search
paths are global; each one is searched for every input file if necessary. The
directories are searched in the order they were specified on the command line.
<h3>
OPTIONS
</h3>
<ul>
<li>-L &lt;directory&gt;
<br>
Add the specified directory to the library search path. When looking
for libraries, <tt>llvm-link</tt> will look in pathname for libraries.
This option can be specified multiple times; <tt>llvm-link</tt> will
search inside these directories in the order in which they were
specified on the command line.
<p>
<li>-f
<br>
Overwrite output files. By default, <tt>llvm-link</tt> will not
overwrite an output file if it alreadys exists.
<p>
<li>-o &lt;filename&gt;
<br>
Output filename. If filename is -, then <tt>llvm-link</tt> will write
its output to standard output.
<p>
<li>-d
<br>
If specified, <tt>llvm-link</tt> prints a human-readable version of the
output bytecode file to standard error.
<p>
<li>-help
<br>
Print a summary of command line options.
<p>
<li>-v
<br>
Verbose mode. Print information about what <tt>llvm-link</tt> is doing.
This typically includes a message for each bytecode file linked in
and for each library found.
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>llvm-link</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="gccld.html"><tt>gccld</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,74 +0,0 @@
=pod
=head1 NAME
llvm-link - LLVM linker
=head1 SYNOPSIS
B<llvm-link> [I<options>] I<filename ...>
=head1 DESCRIPTION
B<llvm-link> takes several LLVM bytecode files and links them together into a
single LLVM bytecode file. It writes the output file to standard output, unless
the B<-o> option is used to specify a filename.
B<llvm-link> attempts to load the input files from the current directory. If
that fails, it looks for each file in each of the directories specified by the
B<-L> options on the command line. The library search paths are global; each
one is searched for every input file if necessary. The directories are searched
in the order they were specified on the command line.
=head1 OPTIONS
=over
=item B<-L> F<directory>
Add the specified F<directory> to the library search path. When looking for
libraries, B<llvm-link> will look in pathname for libraries. This option can be
specified multiple times; B<llvm-link> will search inside these directories in
the order in which they were specified on the command line.
=item B<-f>
Overwrite output files. By default, B<llvm-link> will not overwrite an output
file if it alreadys exists.
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-link> will
write its output to standard output.
=item B<-d>
If specified, B<llvm-link> prints a human-readable version of the output
bytecode file to standard error.
=item B<--help>
Print a summary of command line options.
=item B<-v>
Verbose mode. Print information about what B<llvm-link> is doing. This
typically includes a message for each bytecode file linked in and for each
library found.
=back
=head1 EXIT STATUS
If B<llvm-link> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<gccld|gccld>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,118 @@
<html>
<title>
LLVM: llvm-nm tool
</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-nm</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-nm</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-nm [options] [filenames...]</tt>
<h3>DESCRIPTION</h3>
<p>The <tt>llvm-nm</tt> utility lists the names of symbols from the
LLVM bytecode files, or <tt>ar(1)</tt> archives containing LLVM
bytecode files, named on the command line. Each symbol is listed along
with some simple information about its provenance. If no filename is specified,
or - is used as a filename, <tt>llvm-nm</tt> will process a bytecode file
on its standard input stream.</p>
<p><tt>llvm-nm</tt>'s default output format is the traditional BSD
<tt>nm(1)</tt> output format. Each such output record consists of an
(optional) 8-digit hexadecimal address, followed by a type code
character, followed by a name, for each symbol. One record is printed
per line; fields are separated by spaces. When the address is omitted,
it is replaced by 8 spaces.</p>
<p>Type code characters currently supported, and their meanings, are
as follows:</p>
<table border>
<tr><td>U</td><td>Named object is referenced but undefined in this
bytecode file</td></tr>
<tr><td>C</td><td>Common (multiple defs link together into one
def)</td></tr>
<tr><td>W</td><td>Weak reference (multiple defs link together into zero or
one defs)</td></tr>
<tr><td>t</td><td>Local function (text) object</td></tr>
<tr><td>T</td><td>Global function (text) object</td></tr>
<tr><td>d</td><td>Local data object</td></tr>
<tr><td>D</td><td>Global data object</td></tr>
<tr><td>?</td><td>Something unrecognizable</td></tr>
</table>
<p>Because LLVM bytecode files typically contain objects that are not
considered to have addresses until they are linked into an executable
image or dynamically compiled "just-in-time", <tt>llvm-nm</tt> does
not print an address for any symbol, even symbols which are defined in
the bytecode file.</p>
<h3>OPTIONS</h3>
<ul>
<li> -P
<br>
Use POSIX.2 output format. Alias for --format=posix.
<p>
<li> -B (default)
<br>
Use BSD output format. Alias for --format=bsd.
<p>
<li> -help
<br>
Print a summary of command-line options and their meanings.
<p>
<li> -defined-only
<br>
Print only symbols defined in this bytecode file (as opposed
to symbols which may be referenced by objects in this file,
but not defined in this file.)
<p>
<li> -extern-only, -g
<br>
Print only symbols whose definitions are external; that is,
accessible from other bytecode files.
<p>
<li> -undefined-only, -u
<br>
Print only symbols referenced but not defined in this bytecode
file.
<p>
<li> -format=<i>fmt</i>, -f
<br>
Select an output format; <i>fmt</i> may be sysv, posix, or
bsd. The default is bsd.
<p>
</ul>
<h3>BUGS</h3>
<tt>llvm-nm</tt> cannot demangle C++ mangled
names, like GNU <tt>nm(1)</tt> can.
<h3>EXIT STATUS</h3>
<tt>llvm-nm</tt> exits with an exit code of zero.
<h3>SEE ALSO</h3>
<a href="llvm-dis.html"><tt>llvm-dis</tt></a>,
<tt>ar(1)</tt>,
<tt>nm(1)</tt>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,122 +0,0 @@
=pod
=head1 NAME
llvm-nm - list LLVM bytecode file's symbol table
=head1 SYNOPSIS
B<llvm-nm> [I<options>] [I<filenames...>]
=head1 DESCRIPTION
The B<llvm-nm> utility lists the names of symbols from the LLVM bytecode files,
or B<ar> archives containing LLVM bytecode files, named on the command line.
Each symbol is listed along with some simple information about its provenance.
If no filename is specified, or I<-> is used as a filename, B<llvm-nm> will
process a bytecode file on its standard input stream.
B<llvm-nm>'s default output format is the traditional BSD B<nm> output format.
Each such output record consists of an (optional) 8-digit hexadecimal address,
followed by a type code character, followed by a name, for each symbol. One
record is printed per line; fields are separated by spaces. When the address is
omitted, it is replaced by 8 spaces.
Type code characters currently supported, and their meanings, are as follows:
=over
=item U
Named object is referenced but undefined in this bytecode file
=item C
Common (multiple defs link together into one def)
=item W
Weak reference (multiple defs link together into zero or one defs)
=item t
Local function (text) object
=item T
Global function (text) object
=item d
Local data object
=item D
Global data object
=item ?
Something unrecognizable
=back
Because LLVM bytecode files typically contain objects that are not considered to
have addresses until they are linked into an executable image or dynamically
compiled "just-in-time", B<llvm-nm> does not print an address for any symbol,
even symbols which are defined in the bytecode file.
=head1 OPTIONS
=over
=item B<-P>
Use POSIX.2 output format. Alias for B<--format=posix>.
=item B<-B> (default)
Use BSD output format. Alias for B<--format=bsd>.
=item B<--help>
Print a summary of command-line options and their meanings.
=item B<--defined-only>
Print only symbols defined in this bytecode file (as opposed to
symbols which may be referenced by objects in this file, but not
defined in this file.)
=item B<--extern-only>, B<-g>
Print only symbols whose definitions are external; that is, accessible
from other bytecode files.
=item B<--undefined-only>, B<-u>
Print only symbols referenced but not defined in this bytecode file.
=item B<--format=>I<fmt>, B<-f>
Select an output format; I<fmt> may be I<sysv>, I<posix>, or I<bsd>. The
default is I<bsd>.
=back
=head1 BUGS
B<llvm-nm> cannot demangle C++ mangled names, like GNU B<nm> can.
=head1 EXIT STATUS
B<llvm-nm> exits with an exit code of zero.
=head1 SEE ALSO
L<llvm-dis|llvm-dis>, L<ar(1)>, L<nm(1)>
=head1 AUTHOR
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,52 @@
<html>
<title>LLVM: llvm-prof tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>llvm-prof</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>llvm-prof</tt>
<h3>SYNOPSIS</h3>
<tt>llvm-prof [options] [bytecode file] [LLVM passes]</tt>
<h3>DESCRIPTION</h3>
The <tt>llvm-prof</tt> tool reads in an '<tt>llvmprof.out</tt>' file, a bytecode
file for the program, and produces a human readable report, suitable for
determining where the program hotspots are.<p>
This program is often used in conjunction with the <tt>utils/profile.sh</tt>
script. This script automatically instruments a program, runs it with the JIT,
then runs <tt>llvm-prof</tt> to format a report. To get more information about
<tt>utils/profile.sh</tt>, execute it with the <tt>--help</tt> option.<p>
<h3>OPTIONS</h3>
<ul>
<li><tt>--annotated-llvm</tt> or <tt>-A</tt><br>
In addition to the normal report printed, print out the code for the
program, annotated we execution frequency information. This can be
particularly useful when trying to visualize how frequently basic blocks
are executed. This is most useful with basic block profiling
information or better.<p>
<li><tt>--print-all-code</tt><br>
Using this option enables the <tt>--annotated-llvm</tt> option, but it
prints the entire module, instead of just the most commonly executed
functions.<p>
</ul>
<h3>EXIT STATUS</h3>
<tt>llvm-prof</tt> returns 1 if it cannot load the bytecode file or the profile
information, otherwise it exits with zero.
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,57 +0,0 @@
=pod
=head1 NAME
llvm-prof - print execution profile of LLVM program
=head1 SYNOPSIS
B<llvm-prof> [I<options>] [I<bytecode file>] [I<llvmprof.out>]
=head1 DESCRIPTION
The B<llvm-prof> tool reads in an F<llvmprof.out> file (which can
optionally use a specific file with the third program argument), a bytecode file
for the program, and produces a human readable report, suitable for determining
where the program hotspots are.
This program is often used in conjunction with the F<utils/profile.pl>
script. This script automatically instruments a program, runs it with the JIT,
then runs B<llvm-prof> to format a report. To get more information about
F<utils/profile.pl>, execute it with the B<--help> option.
=head1 OPTIONS
=over
=item B<--annotated-llvm> or B<-A>
In addition to the normal report printed, print out the code for the
program, annotated with execution frequency information. This can be
particularly useful when trying to visualize how frequently basic blocks
are executed. This is most useful with basic block profiling
information or better.
=item B<--print-all-code>
Using this option enables the B<--annotated-llvm> option, but it
prints the entire module, instead of just the most commonly executed
functions.
=item B<--time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=back
=head1 EXIT STATUS
B<llvm-prof> returns 1 if it cannot load the bytecode file or the profile
information. Otherwise, it exits with zero.
=head1 AUTHOR
B<llvm-prof> is maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,52 +0,0 @@
=pod
=head1 NAME
llvm-ranlib - Generate index for LLVM archive
=head1 SYNOPSIS
B<llvm-ranlib> [--version] [--help] <archive-file>
=head1 DESCRIPTION
The B<llvm-ranlib> command is similar to the common Unix utility, C<ranlib>. It
adds or updates the symbol table in an LLVM archive file. Note that using the
B<llvm-ar> modifier F<s> is usually more efficient than running B<llvm-ranlib>
which is only provided only for completness and compatibility. Unlike other
implementations of C<ranlib>, B<llvm-ranlib> indexes LLVM bytecode files, not
native object modules. You can list the contents of the symbol table with the
C<llvm-nm -s> command.
=head1 OPTIONS
=over
=item F<archive-file>
Specifies the archive-file to which the symbol table is added or updated.
=item F<--version>
Print the version of B<llvm-ranlib> and exit without building a symbol table.
=item F<--help>
Print usage help for B<llvm-ranlib> and exit without building a symbol table.
=back
=head1 EXIT STATUS
If B<llvm-ranlib> succeeds, it will exit with 0. If an error occurs, a non-zero
exit code will be returned.
=head1 SEE ALSO
L<llvm-ar|llvm-ar>, ranlib(1)
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,405 +0,0 @@
=pod
=head1 NAME
llvmc - The LLVM Compiler Driver
=head1 SYNOPSIS
B<llvmc> [I<options>] [I<filenames>...]
=head1 DESCRIPTION
B<llvmc> is a configurable driver for invoking other LLVM (and non-LLVM) tools
in order to compile, optimize and link software for multiple languages. For
those familiar with FSF's B<gcc> tool, it is very similar. B<llvmc> has the
following goals:
=over
=item * provide a single point of access to the LLVM tool set,
=item * hide the complexities of the LLVM tools through a single interface,
=item * make integration of existing non-LLVM tools simple,
=item * extend the capabilities of minimal front ends, and
=item * make the interface for compiling consistent for all languages.
=back
The tool itself does nothing with a user's program. It merely invokes other
tools to get the compilation tasks done.
The options supported by B<llvmc> generalize the compilation process and
provide a consistent and simple interface for multiple programming languages.
This makes it easier for developers to get their software compiled with LLVM.
Without B<llvmc>, developers would need to understand how to invoke the
front-end compiler, optimizer, assembler, and linker in order to compile their
programs. B<llvmc>'s sole mission is to trivialize that process.
=head2 Basic Operation
B<llvmc> always takes the following basic actions:
=over
=item * Command line options and filenames are collected.
The command line options provide the marching orders to B<llvmc> on what actions
it should perform. This is the I<request> the user is making of B<llvmc> and it
is interpreted first.
=item * Configuration files are read.
Based on the options and the suffixes of the filenames presented, a set of
configuration files are read to configure the actions B<llvmc> will take.
Configuration files are provided by either LLVM or the front end compiler tools
that B<llvmc> invokes. Users generally don't need to be concerned with the
contents of the configuration files.
=item * Determine actions to take.
The tool chain needed to complete the task is determined. This is the primary
work of B<llvmc>. It breaks the request specified by the command line options
into a set of basic actions to be done:
=over
=item * Pre-processing: gathering/filtering compiler input (optional).
=item * Translation: source language to bytecode conversion.
=item * Assembly: bytecode to native code conversion.
=item * Optimization: conversion of bytecode to something that runs faster.
=item * Linking: combining multiple bytecodes to produce executable program.
=back
=item * Execute actions.
The actions determined previously are executed sequentially and then
B<llvmc> terminates.
=back
=head1 OPTIONS
=head2 Control Options
Control options tell B<llvmc> what to do at a high level. The
following control options are defined:
=over
=item B<-c> or B<--compile>
This option specifies that the linking phase is not to be run. All
previous phases, if applicable will run. This is generally how a given
bytecode file is compiled and optimized for a source language module.
=item B<-k> or B<--link> or default
This option (or the lack of any control option) specifies that all stages
of compilation, optimization, and linking should be attempted. Source files
specified on the command line will be compiled and linked with objects and
libraries also specified.
=item B<-S>
This option specifies that compilation should end in the creation of
an LLVM assembly file that can be later converted to an LLVM object
file.
=item B<-E>
This option specifies that no compilation or linking should be
performed. Only pre-processing, if applicable to the language being
compiled, is performed. For languages that support it, this will
result in the output containing the raw input to the compiler.
=back
=head2 Optimization Options
Optimization with B<llvmc> is based on goals and specified with
the following -O options. The specific details of which
optimizations run is controlled by the configuration files because
each source language will have different needs.
=over
=item B<-O1> or B<-O0> (default, fast compilation)
Only those optimizations that will hasten the compilation (mostly by reducing
the output) are applied. In general these are extremely fast and simple
optimizations that reduce emitted code size. The goal here is not to make the
resulting program fast but to make the compilation fast. If not specified,
this is the default level of optimization.
=item B<-O2> (basic optimization)
This level of optimization specifies a balance between generating good code
that will execute reasonably quickly and not spending too much time optimizing
the code to get there. For example, this level of optimization may include
things like global common subexpression elimination, aggressive dead code
elimination, and scalar replication.
=item B<-O3> (aggressive optimization)
This level of optimization aggressively optimizes each set of files compiled
together. However, no link-time inter-procedural optimization is performed.
This level implies all the optimizations of the B<-O1> and B<-O2> optimization
levels, and should also provide loop optimizations and compile time
inter-procedural optimizations. Essentially, this level tries to do as much
as it can with the input it is given but doesn't do any link time IPO.
=item B<-O4> (link time optimization)
In addition to the previous three levels of optimization, this level of
optimization aggressively optimizes each program at link time. It employs
basic analysis and basic link-time inter-procedural optimizations,
considering the program as a whole.
=item B<-O5> (aggressive link time optimization)
This is the same as B<-O4> except it employs aggressive analyses and
aggressive inter-procedural optimization.
=item B<-O6> (profile guided optimization: not implemented)
This is the same as B<-O5> except that it employs profile-guided
re-optimization of the program after it has executed. Note that this implies
a single level of re-optimization based on runtime profile analysis. Once
the re-optimization has completed, the profiling instrumentation is
removed and final optimizations are employed.
=item B<-O7> (lifelong optimization: not implemented)
This is the same as B<-O5> and similar to B<-O6> except that re-optimization
is performed through the life of the program. That is, each run will update
the profile by which future re-optimizations are directed.
=back
=head2 Input Options
=over
=item B<-l> I<LIBRARY>
This option instructs B<llvmc> to locate a library named I<LIBRARY> and search
it for unresolved symbols when linking the program.
=item B<-L> F<path>
This option instructs B<llvmc> to add F<path> to the list of places in which
the linker will
=item B<-x> I<LANGUAGE>
This option instructs B<llvmc> to regard the following input files as
containing programs in the language I<LANGUAGE>. Normally, input file languages
are identified by their suffix but this option will override that default
behavior. The B<-x> option stays in effect until the end of the options or
a new B<-x> option is encountered.
=back
=head2 Output Options
=over
=item B<-m>I<arch>
This option selects the back end code generator to use. The I<arch> portion
of the option names the back end to use.
=item B<--native>
Normally, B<llvmc> produces bytecode files at most stages of compilation.
With this option, B<llvmc> will arrange for native object files to be
generated with the B<-c> option, native assembly files to be generated
with the B<-S> option, and native executables to be generated with the
B<--link> option. In the case of the B<-E> option, the output will not
differ as there is no I<native> version of pre-processed output.
=item B<-o> F<filename>
Specify the output file name. The contents of the file depend on other
options.
=back
=head2 Information Options
=over
=item B<-n> or B<--no-op>
This option tells B<llvmc> to do everything but actually execute the
resulting tools. In combination with the B<-v> option, this causes B<llvmc>
to merely print out what it would have done.
=item B<-v> or B<--verbose>
This option will cause B<llvmc> to print out (on standard output) each of the
actions it takes to accomplish the objective. The output will immediately
precede the invocation of other tools.
=item B<--stats>
Print all statistics gathered during the compilation to the standard error.
Note that this option is merely passed through to the sub-tools to do with
as they please.
=item B<--time-passes>
Record the amount of time needed for each optimization pass and print it
to standard error. Like B<--stats> this option is just passed through to
the sub-tools to do with as they please.
=item B<--time-programs>
Record the amount of time each program (compilation tool) takes and print
it to the standard error.
=back
=head2 Language Specific Options
=over
=item B<-T,pre>=I<options>
Pass an arbitrary option to the pre-processor.
=item B<-T,opt>=I<options>
Pass an arbitrary option to the optimizer.
=item B<-T,lnk>=I<options>
Pass an arbitrary option to the linker.
=item B<-T,asm>=I<options>
Pass an arbitrary option to the code generator.
=back
=head2 C/C++ Specific Options
=over
=item B<-I>F<path>
This option is just passed through to a C or C++ front end compiler to tell it
where include files can be found.
=item B<-D>F<symbol>
This option is just passed through to a C or C++ front end compiler to tell it
to define a symbol.
=back
=head2 Miscellaneous Options
=over
=item B<--help>
Print a summary of command line options.
=item B<--version>
This option will cause B<llvmc> to print out its version number and terminate.
=back
=head2 Advanced Options
You better know what you're doing if you use these options. Improper use
of these options can produce drastically wrong results.
=over
=item B<--config-dir> F<dirname>
This option tells B<llvmc> to read configuration data from the I<directory>
named F<dirname>. Data from such directories will be read in the order
specified on the command line after all other standard configuration files have
been read. This allows users or groups of users to conveniently create
their own configuration directories in addition to the standard ones to which
they may not have write access.
=head2 Unimplemented Options
The options below are not currently implemented in B<llvmc> but will be
eventually. They are documented here as "future design".
=over
=item B<--show-config> I<[suffixes...]>
When this option is given, the only action taken by B<llvmc> is to show its
final configuration state in the form of a configuration file. No compilation
tasks will be conducted when this option is given; processing will stop once
the configuration has been printed. The optional (comma separated) list of
suffixes controls what is printed. Without any suffixes, the configuration
for all languages is printed. With suffixes, only the languages pertaining
to those file suffixes will be printed. The configuration information is
printed after all command line options and configuration files have been
read and processed. This allows the user to verify that the correct
configuration data has been read by B<llvmc>.
=item B<--config> :I<section>:I<name>=I<value>
This option instructs B<llvmc> to accept I<value> as the value for configuration
item I<name> in the section named I<section>. This is a quick way to override
a configuration item on the command line without resorting to changing the
configuration files.
=item B<--config-only-from> F<dirname>
This option tells B<llvmc> to skip the normal processing of configuration
files and only configure from the contents of the F<dirname> directory. Multiple
B<--config-only-from> options may be given in which case the directories are
read in the order given on the command line.
=item B<--emit-raw-code>
No optimization is done whatsoever. The compilers invoked by B<llvmc> with
this option given will be instructed to produce raw, unoptimized code. This
option is useful only to front end language developers and therefore does not
participate in the list of B<-O> options. This is distinctly different from
the B<-O0> option (a synonym for B<-O1>) because those optimizations will
reduce code size to make compilation faster. With B<--emit-raw-code>, only
the full raw code produced by the compiler will be generated.
=back
=head1 EXIT STATUS
If B<llvmc> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value and no compilation actions
will be taken. If one of the compilation tools returns a non-zero
status, pending actions will be discarded and B<llvmc> will return the
same result code as the failing compilation tool.
=head1 SEE ALSO
L<gccas|gccas>, L<gccld|gccld>, L<llvm-as|llvm-as>, L<llvm-dis|llvm-dis>,
L<llc|llc>, L<llvm-link|llvm-link>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,113 @@
<html>
<title>
LLVM: llvmgcc tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>llvmgcc</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>llvmgcc</tt>
<h3>
SYNOPSIS
</h3>
<tt>llvmgcc [options] filename</tt>
<h3>
DESCRIPTION
</h3>
The <tt>llvmgcc</tt> command is the LLVM C front end. It is a modified version
of the <a href="http://gcc.gnu.org">GNU Compiler Collection</a> (GCC) that takes
C programs and compiles them into LLVM bytecode or assembly language, depending
upon the options.
<p>
Unless the <tt>-S</tt> option is specified, <tt>llvmgcc</tt> will use the
<a href="gccas.html"><tt>gccas</tt></a> program to perform some optimizations
and create an LLVM bytecode file. Unless the <tt>-c</tt> option is specified,
<tt>llvmgcc</tt> will also use the <a href="gccld.html"><tt>gccld</tt></a>
program to perform further optimizations and link the resulting bytecode
file(s) with support libraries to create an executable program.
<p>
Being derived from GCC, llvmgcc has many of GCC's features and accepts most of
GCC's options. It handles a number of GCC's extensions to the C programming
language.
<p>
Below you will find several commonly used options:
<h3>
OPTIONS
</h3>
<ul>
<li> -S
<br>
Do not generate an LLVM bytecode file. Rather, compile the source file
into an LLVM assembly language file.
<p>
<li> -c
<br>
Do not generate a linked bytecode executable. Rather, compile the source
file into an LLVM bytecode file. This bytecode file can then be linked
with other bytecode files later to generate a full LLVM executable.
<p>
<li> -o <i>filename</i>
<br>
Specify the output file to be <i>filename</i>.
<p>
<li> -I <i>directory</i>
<br>
Add a directory to the header file search path. This option can be
repeated.
<p>
<li> -L <i>directory</i>
<br>
Add <i>directory</i> to the library search path. This option can be
repeated.
<p>
<li> -l<i>name</i>
<br>
Link in the library lib<i>name</i>.[bc | a | so]. This library should
be a bytecode library.
<p>
<li>-Wl,<i>option</i>
<br>
Pass <i>option</i> to the linker program, <a
href="gccld.html"><tt>gccld</tt></a>.
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>llvmgcc</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<A HREF="llvmgxx.html"><tt>llvmg++</tt></A>,
<A HREF="gccas.html"><tt>gccas</tt></A>,
<A HREF="gccld.html"><tt>gccld</tt></A>,
and the Info documentation for <tt>gcc</tt>.
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,95 +0,0 @@
=pod
=head1 NAME
llvm-gcc - LLVM C front-end
=head1 SYNOPSIS
B<llvm-gcc> [I<options>] I<filename>
=head1 DESCRIPTION
The B<llvm-gcc> command is the LLVM C front end. It is a modified
version of gcc that takes C programs and compiles them into LLVM
bytecode or assembly language, depending upon the options.
Unless the B<-S> option is specified, B<llvm-gcc> will use the
L<gccas|gccas> program to perform some optimizations and create an
LLVM bytecode file. Unless the B<-c> option is specified, B<llvm-gcc>
will also use the L<gccld|gccld> program to perform further
optimizations and link the resulting bytecode file(s) with support
libraries to create an executable program.
Being derived from the GNU Compiler Collection, B<llvm-gcc> has many
of gcc's features and accepts most of gcc's options. It handles a
number of gcc's extensions to the C programming language.
=head1 OPTIONS
=over
=item B<--help>
Print a summary of command line options.
=item B<-S>
Do not generate an LLVM bytecode file. Rather, compile the source
file into an LLVM assembly language file.
=item B<-c>
Do not generate a linked executable. Rather, compile the source
file into an LLVM bytecode file. This bytecode file can then be
linked with other bytecode files later on to generate a full LLVM
executable.
=item B<-o> I<filename>
Specify the output file to be I<filename>.
=item B<-I> I<directory>
Add a directory to the header file search path. This option can be
repeated.
=item B<-L> I<directory>
Add I<directory> to the library search path. This option can be
repeated.
=item B<-l>I<name>
Link in the library libI<name>.[bc | a | so]. This library should
be a bytecode library.
=item B<-Wa,>I<option>
Pass I<option> to gccas
=item B<-Wl,>I<option>
Pass I<option> to gccld
=item B<-Wa,-disable-inlining -Wl,-disable-inlining>
Fully disable all inlining
=back
=head1 EXIT STATUS
If B<llvm-gcc> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-g++|llvmgxx>, L<gccas|gccas>, L<gccld|gccld>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -0,0 +1,107 @@
<html>
<title>
LLVM: llvmg++ tool
</title>
<body bgcolor=white>
<center>
<h1>LLVM: <tt>llvmg++</tt> tool</h1>
</center>
<HR>
<h3>NAME</h3>
<tt>llvmg++</tt>
<h3>SYNOPSIS</h3>
<tt>llvmg++ [options] filename</tt>
<h3>DESCRIPTION</h3>
The <tt>llvmg++</tt> command is the LLVM C++ front end. It is a modified
version of g++ that takes C++ programs and compiles them into LLVM bytecode or
assembly language, depending upon the options.
<p>
Unless the <tt>-S</tt> option is specified, <tt>llvmg++</tt> will use the
<a href="gccas.html"><tt>gccas</tt></a> program to perform some optimizations
and create an LLVM bytecode file. Unless the <tt>-c</tt> option is specified,
<tt>llvmg++</tt> will also use the <a href="gccld.html"><tt>gccld</tt></a>
program to perform further optimizations and link the resulting bytecode
file(s) with support libraries to create an executable program.
<p>
Being derived from the <a href="http://gcc.gnu.org">GNU Compiler Collection</a>,
<tt>llvmg++</tt> has many of g++'s features and accepts most of g++'s options.
It handles a number of g++'s extensions to the C++ programming language.
<p>
Below you will find several commonly used options:
<h3>
OPTIONS
</h3>
<ul>
<li> -S
<br>
Do not generate an LLVM bytecode file. Rather, compile the source file
into an LLVM assembly language file.
<p>
<li> -c
<br>
Do not generate a linked executable. Rather, compile the source file
into an LLVM bytecode file. This bytecode file can then be linked with
other bytecode files later on to generate a full LLVM executable.
<p>
<li> -o <i>filename</i>
<br>
Specify the output file to be <i>filename</i>.
<p>
<li> -I <i>directory</i>
<br>
Add a directory to the header file search path. This option can be
repeated.
<p>
<li> -L <i>directory</i>
<br>
Add <i>directory</i> to the library search path. This option can be
repeated.
<p>
<li> -l<i>name</i>
<br>
Link in the library lib<i>name</i>.[bc | a | so]. This library should
be a bytecode library.
<p>
<li>-Wl,<i>option</i>
<br>
Pass <i>option</i> to the linker (usually gccld).
<p>
</ul>
<h3>
EXIT STATUS
</h3>
If <tt>llvmg++</tt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
<h3>
SEE ALSO
</h3>
<A HREF="llvmgcc.html"><tt>llvmg++</tt></A>,
<A HREF="gccas.html"><tt>gccas</tt></A>,
<A HREF="gccld.html"><tt>gccld</tt></A>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,95 +0,0 @@
=pod
=head1 NAME
llvm-g++ - LLVM C++ front-end
=head1 SYNOPSIS
B<llvm-g++> [I<options>] I<filename>
=head1 DESCRIPTION
The B<llvm-g++> command is the LLVM C++ front end. It is a modified
version of g++ that takes C++ programs and compiles them into LLVM
bytecode or assembly language, depending upon the options.
Unless the B<-S> option is specified, B<llvm-g++> will use the
L<gccas|gccas> program to perform some optimizations and create an
LLVM bytecode file. Unless the B<-c> option is specified, B<llvm-g++>
will also use the L<gccld|gccld> program to perform further
optimizations and link the resulting bytecode file(s) with support
libraries to create an executable program.
Being derived from the GNU Compiler Collection, B<llvm-g++> has many
of g++'s features and accepts most of g++'s options. It handles a
number of g++'s extensions to the C++ programming language.
=head1 OPTIONS
=over
=item B<--help>
Print a summary of command line options.
=item B<-S>
Do not generate an LLVM bytecode file. Rather, compile the source
file into an LLVM assembly language file.
=item B<-c>
Do not generate a linked executable. Rather, compile the source
file into an LLVM bytecode file. This bytecode file can then be
linked with other bytecode files later on to generate a full LLVM
executable.
=item B<-o> I<filename>
Specify the output file to be I<filename>.
=item B<-I> I<directory>
Add a directory to the header file search path. This option can be
repeated.
=item B<-L> I<directory>
Add I<directory> to the library search path. This option can be
repeated.
=item B<-l>I<name>
Link in the library libI<name>.[bc | a | so]. This library should
be a bytecode library.
=item B<-Wa,>I<option>
Pass I<option> to gccas
=item B<-Wl,>I<option>
Pass I<option> to gccld
=item B<-Wa,-disable-inlining -Wl,-disable-inlining>
Fully disable all inlining
=back
=head1 EXIT STATUS
If B<llvm-g++> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<llvm-gcc|llvmgcc>, L<gccas>, L<gccld>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1 +0,0 @@
.dir

View File

@@ -1,2 +0,0 @@
*.1
.dir

View File

@@ -1,256 +0,0 @@
/* Based on http://www.perldoc.com/css/perldoc.css */
@import url("../llvm.css");
body { font-family: Arial,Helvetica; }
blockquote { margin: 10pt; }
h1, a { color: #336699; }
/*** Top menu style ****/
.mmenuon {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ff6600; font-size: 10pt;
}
.mmenuoff {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: 10pt;
}
.cpyright {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.cpyrightText {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #ffffff; font-size: xx-small;
}
.sections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 11pt;
}
.dsections {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 12pt;
}
.slink {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #000000; font-size: 9pt;
}
.slink2 { font-family: Arial,Helvetica; text-decoration: none; color: #336699; }
.maintitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 18pt;
}
.dblArrow {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.menuSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: small;
}
.newstext {
font-family: Arial,Helvetica; font-size: small;
}
.linkmenu {
font-family: Arial,Helvetica; color: #000000; font-weight: bold;
text-decoration: none;
}
P {
font-family: Arial,Helvetica;
}
PRE {
font-size: 10pt;
}
.quote {
font-family: Times; text-decoration: none;
color: #000000; font-size: 9pt; font-style: italic;
}
.smstd { font-family: Arial,Helvetica; color: #000000; font-size: x-small; }
.std { font-family: Arial,Helvetica; color: #000000; }
.meerkatTitle {
font-family: sans-serif; font-size: x-small; color: black; }
.meerkatDescription { font-family: sans-serif; font-size: 10pt; color: black }
.meerkatCategory {
font-family: sans-serif; font-size: 9pt; font-weight: bold; font-style: italic;
color: brown; }
.meerkatChannel {
font-family: sans-serif; font-size: 9pt; font-style: italic; color: brown; }
.meerkatDate { font-family: sans-serif; font-size: xx-small; color: #336699; }
.tocTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 10pt;
}
.toc-item {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: underline;
}
.perlVersion {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt; text-decoration: none;
}
.podTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000;
}
.docTitle {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #000000; font-size: 10pt;
}
.dotDot {
font-family: Arial,Helvetica; font-weight: bold;
color: #000000; font-size: 9pt;
}
.docSec {
font-family: Arial,Helvetica; font-weight: normal;
color: #333333; font-size: 9pt;
}
.docVersion {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.docSecs-on {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #ff0000; font-size: 10pt;
}
.docSecs-off {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
h2 {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: medium;
}
h1 {
font-family: Verdana,Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: large;
}
DL {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: none;
color: #333333; font-size: 10pt;
}
UL > LI > A {
font-family: Arial,Helvetica; font-weight: bold;
color: #336699; font-size: 10pt;
}
.moduleInfo {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 11pt;
}
.moduleInfoSec {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 10pt;
}
.moduleInfoVal {
font-family: Arial,Helvetica; font-weight: normal; text-decoration: underline;
color: #000000; font-size: 10pt;
}
.cpanNavTitle {
font-family: Arial,Helvetica; font-weight: bold;
color: #ffffff; font-size: 10pt;
}
.cpanNavLetter {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #333333; font-size: 9pt;
}
.cpanCat {
font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
color: #336699; font-size: 9pt;
}
.bttndrkblue-bkgd-top {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgtop.gif);
}
.bttndrkblue-bkgd-left {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgleft.gif);
}
.bttndrkblue-bkgd {
padding-top: 0px;
padding-bottom: 0px;
margin-bottom: 0px;
margin-top: 0px;
background-repeat: no-repeat;
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgmiddle.gif);
vertical-align: top;
}
.bttndrkblue-bkgd-right {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgright.gif);
}
.bttndrkblue-bkgd-bottom {
background-color: #225688;
background-image: url(/global/mvc_objects/images/bttndrkblue_bgbottom.gif);
}
.bttndrkblue-text a {
color: #ffffff;
text-decoration: none;
}
a.bttndrkblue-text:hover {
color: #ffDD3C;
text-decoration: none;
}
.bg-ltblue {
background-color: #f0f5fa;
}
.border-left-b {
background: #f0f5fa url(/i/corner-leftline.gif) repeat-y;
}
.border-right-b {
background: #f0f5fa url(/i/corner-rightline.gif) repeat-y;
}
.border-top-b {
background: #f0f5fa url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-b {
background: #f0f5fa url(/i/corner-botline.gif) repeat-x;
}
.border-right-w {
background: #ffffff url(/i/corner-rightline.gif) repeat-y;
}
.border-top-w {
background: #ffffff url(/i/corner-topline.gif) repeat-x;
}
.border-bottom-w {
background: #ffffff url(/i/corner-botline.gif) repeat-x;
}
.bg-white {
background-color: #ffffff;
}
.border-left-w {
background: #ffffff url(/i/corner-leftline.gif) repeat-y;
}

View File

@@ -0,0 +1,120 @@
<html>
<title>LLVM: opt tool</title>
<body bgcolor=white>
<center><h1>LLVM: <tt>opt</tt> tool</h1></center>
<HR>
<h3>NAME</h3>
<tt>opt</tt>
<h3>SYNOPSIS</h3>
<tt>opt [options] [filename]</tt>
<h3>DESCRIPTION</h3>
The <tt>opt</tt> command is the modular LLVM optimizer. It takes LLVM bytecode
as input, runs the specified optimizations on it, and then outputs the optimized
LLVM bytecode.
<p>
The optimizations available via <tt>opt</tt> depend upon what libraries were
linked into it as well as any additional libraries that have been loaded with
the <tt>-load</tt> option. Use the <tt>-help</tt> option to determine what
optimizations you can use.
<p>
If no filename is specified on the command line, <tt>opt</tt> reads its input
from standard input.
<p>
If an output filename is not specified with the <tt>-o</tt> option, <tt>opt</tt>
writes its output to the standard output.
<h3>OPTIONS</h3>
<ul>
<li> -f
<br>
Force overwrite. Normally, <tt>opt</tt> will refuse to overwrite an
output file that already exists. With this option, <tt>opt</tt> will
overwrite the output file and replace it with new bytecode.
<p>
<li> -help
<br>
Print a summary of command line options.
<p>
<li> -o &lt;filename&gt;
<br>
Specify the output filename.
<p>
<li> -stats
<br>
Print statistics.
<p>
<li> -time-passes
<br>
Record the amount of time needed for each pass and print it to standard
error.
<p>
<li> -debug
<br>
If this is a debug build, this option will enable debug printouts from
passes which use the <tt>DEBUG</tt> macro. See the <a
href="../ProgrammersManual.html#DEBUG">Programmer's Manual</a> for more
information.
<p>
<!--
<li> -internalize-public-api-file &lt;filename&gt;
<br>
Preserve the symbol names listed in the file filename.
<p>
<li> -internalize-public-api-list=&lt;list&gt;
<br>
Perserve the symbol names specified.
<p>
-->
<li> -q
<br>
Quiet mode. Do not print messages on whether the program was modified.
<p>
<li> -load &lt;plugin.so&gt;
<br>
Load the dynamic object &lt;plugin.so&gt;. This object should register new
optimization passes. Once loaded, the object will add new command line
options to enable various optimizations. To see the new complete list
of optimizations, use the -help and -load options together:
<p>
<tt>opt -load &lt;plugin.so&gt; -help</tt>
<p>
<li> -p
<br>
Print module after each transformation.
<p>
</ul>
<h3>EXIT STATUS</h3>
If <tt>opt</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
it will exit with a non-zero value.
<h3>SEE ALSO</h3>
<a href="analyze.html"><tt>analyze</tt></a>
<HR>
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
</body>
</html>

View File

@@ -1,97 +0,0 @@
=pod
=head1 NAME
opt - LLVM optimizer
=head1 SYNOPSIS
B<opt> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<opt> command is the modular LLVM optimizer. It takes LLVM
bytecode as input, runs the specified optimizations on it, and then
outputs the optimized LLVM bytecode.
The optimizations available via B<opt> depend upon what libraries
were linked into it as well as any additional libraries that have
been loaded with the B<-load> option. Use the B<-help> option to
determine what optimizations you can use.
If no filename is specified on the command line, B<opt> reads its
input from standard input.
If an output filename is not specified with the B<-o> option, B<opt>
writes its output to the standard output.
=head1 OPTIONS
=over
=item B<-f>
Force overwrite. Normally, B<opt> will refuse to overwrite an
output file that already exists. With this option, B<opt> will
overwrite the output file and replace it with new bytecode.
=item B<-help>
Print a summary of command line options.
=item B<-o> I<filename>
Specify the output filename.
=item B<-profile-info-file> I<filename>
Specify the name of the file loaded by the -profile-loader option.
=item B<-stats>
Print statistics.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=item B<-debug>
If this is a debug build, this option will enable debug printouts
from passes which use the I<DEBUG()> macro. See the B<LLVM Programmer's
Manual>, section I<#DEBUG> for more information.
=item B<-load>=I<plugin>
Load the dynamic object I<plugin>. This object should register new
optimization passes. Once loaded, the object will add new command line
options to enable various optimizations. To see the new complete list
of optimizations, use the B<-help> and B<-load> options together:
=over
B<opt -load>=I<plugin> B<-help>
=back
=item B<-p>
Print module after each transformation.
=back
=head1 EXIT STATUS
If B<opt> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value.
=head1 SEE ALSO
L<analyze|analyze>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

View File

@@ -1,2 +0,0 @@
*ps
.dir

View File

@@ -1,96 +0,0 @@
=pod
=head1 NAME
stkrc - Stacker Compiler
=head1 SYNOPSIS
B<stkrc> [I<options>] [I<filename>]
=head1 DESCRIPTION
The B<stkrc> command is the compiler for the Stacker language. Stacker is a
simple stack based, Forth-like language that was written as a demonstration
language for LLVM. For details on the language, please see
L<http://llvm.cs.uiuc.edu/docs/Stacker.html> . The B<stkrc> compiler is fairly
minimal. It compiles to bytecode only and doesn't perform any optimizations.
The output of stkrc (a bytecode file) can be piped through other LLVM tools
for optimization and linking.
If F<filename> is omitted or is C<->, then B<stkrc> reads its input
from standard input. This is useful for combining the tool into a pipeline.
If an output file is not specified with the B<-o> option, then
B<llvm-as> sends its output to a file or standard output by following
these rules:
=over
=item *
If the input is standard input, then the output is standard output.
=item *
If the input is a file that ends with C<.st>, then the output file is of
the same name, except that the suffix is changed to C<.bc>.
=item *
If the input is a file that does not end with the C<.st> suffix, then the
output file has the same name as the input file, except that the C<.bc>
suffix is appended.
=back
=head1 OPTIONS
=over
=item B<-o> F<filename>
Specify the output file name. If F<filename> is C<->, then B<llvm-as>
sends its output to standard output.
=item B<-stats>
Print statistics acquired during compilation.
=item B<-time-passes>
Record the amount of time needed for each pass and print it to standard
error.
=item B<-f>
Force the output to be written. Normally, B<stkrc> won't overwrite an existing
bytecode file. This option overrides that behavior.
=item B<-s> F<stacksize>
Specify the stack size for the program. The default stack size, 1024, should be
sufficient for most programs. For very large programs, especially those that
recurse a lot, you might want to provide a larger value. Each unit of this
value consumes 8 bytes of memory.
=item B<-help>
Print a summary of command line options.
=back
=head1 EXIT STATUS
If B<stkrc> succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non-zero value, usually 1.
=head1 SEE ALSO
L<llvm-as>, L<http://llvm.cs.uiuc.edu/docs/Stacker.html>
=head1 AUTHORS
Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
=cut

Some files were not shown because too many files have changed in this diff Show More