Commit Graph

1280 Commits

Author SHA1 Message Date
Chris Lattner b3140c3e8a add a hack that fixes:
llvm-gcc main.c -Wl,-native -o a.out -g

This is important because it used by many configure scripts.

John, please pull this onto the 1.6 branch.

llvm-svn: 24163
2005-11-03 07:17:51 +00:00
John Criswell fe5f33b120 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.

llvm-svn: 24036
2005-10-27 15:54:34 +00:00
John Criswell 94b7bea733 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.

llvm-svn: 24023
2005-10-26 20:35:13 +00:00
Chris Lattner aad5452c2e transforms before analyses
llvm-svn: 23976
2005-10-25 17:10:30 +00:00
Chris Lattner 788318cb69 Remove a now-unneeded library
llvm-svn: 23942
2005-10-24 02:31:05 +00:00
Chris Lattner 2a5442f365 pull in the archive version of this lib to reduce exe size
llvm-svn: 23929
2005-10-24 01:13:21 +00:00
Chris Lattner f4d2a4b3bf Pull in the archive versions of these libs to reduce executable size
llvm-svn: 23928
2005-10-24 01:12:14 +00:00
Chris Lattner 1f001771b2 Link in datastructure as a relinked o file
llvm-svn: 23926
2005-10-24 01:07:56 +00:00
Chris Lattner 652ce549ec Link to archive versions of libraries instead of the relinked ones
llvm-svn: 23925
2005-10-24 01:05:53 +00:00
Chris Lattner 8f16bb6c3c Use the new LinkAllAnalyses.h header instead of forcing passes to be
in relinked object files

llvm-svn: 23922
2005-10-24 01:00:13 +00:00
Chris Lattner b45e57c2dd move this to the analyze tool
llvm-svn: 23918
2005-10-24 00:27:36 +00:00
Chris Lattner 672471fbed Use archive versions of these libraries, using the LinkAllPasses header.
llvm-svn: 23916
2005-10-24 00:12:20 +00:00
Chris Lattner 41548484f4 Shrinkify to make --help output look better
llvm-svn: 23911
2005-10-23 22:37:13 +00:00
Chris Lattner 0b2bf4c255 shrinkify the option name a bit
llvm-svn: 23910
2005-10-23 22:35:42 +00:00
Jeff Cohen 11e26b52b2 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Chris Lattner 711a5fe009 document this as experimental
llvm-svn: 23883
2005-10-22 22:00:45 +00:00
Chris Lattner 727671a3dc Fix PR637
llvm-svn: 23784
2005-10-18 06:29:43 +00:00
Chris Lattner f20941116b Speed up isBytecodeLPath from 20s to .01s in common cases. This makes -native
not completely painful to use.  Once we decide a directory has a bytecode
library, we know it this function returns true, no need to scan entire directories.

llvm-svn: 23405
2005-09-23 06:11:24 +00:00
Chris Lattner 9b9b510084 1. Do not use .c_str() to keep a persistent handle on a temporary string.
2. Concatenate -lfoo and -L/bar options into a single option instead of
   passing "-L /bar" (for example) which doesn't work on Darwin.
3. Send -v output to stderr instead of stdout

llvm-svn: 23404
2005-09-23 06:05:46 +00:00
Jim Laskey 27d628dfc9 Add help support for -mcpu and -mattr.
llvm-svn: 23222
2005-09-02 19:27:43 +00:00
Jim Laskey 19058c3989 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.

llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Reid Spencer dfb3fb4a25 Implement PR614:
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.

llvm-svn: 23115
2005-08-27 18:50:39 +00:00
Chris Lattner bd615f518c If the user interrupts bugpoint, don't extract loops
llvm-svn: 22603
2005-08-02 23:25:56 +00:00
Chris Lattner ab08df9699 Pass -export-dynamic to gcc when compiling with -native and the link is
performed with -export-dynamic (aka. -disable-internalize).

Patch by Nicholas Riley!

llvm-svn: 22601
2005-08-02 22:07:38 +00:00
Chris Lattner beb01faea3 When the user hits ctrl-c, bugpoint should attempt to stop reduction as
quickly as possible and output what it has so far.  If they hit it twice,
bugpoint is killed.

llvm-svn: 22579
2005-08-02 02:16:17 +00:00
Jeff Cohen 546fd5944e Keep tabs and trailing spaces out.
llvm-svn: 22565
2005-07-30 18:33:25 +00:00
Reid Spencer 87c5a8a48a Run the verifier pass after all the other passes rather than before them.
This catches mistakes in the passes rather than just verifying the bytecode
input to llc.

llvm-svn: 22534
2005-07-28 04:00:49 +00:00
Reid Spencer 8e3830dae7 Make the verifier pass run (in debug mode) in llc. This adds a sanity check
to llc when debugging. Also allow other passes to be run from llc.
Patch contributed by Michael McCracken.

llvm-svn: 22532
2005-07-28 02:25:30 +00:00
Jeff Cohen 5f4ef3c5a8 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Chris Lattner 986675cb75 Fix PR576.
Instead of emitting a JIT stub that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
header:
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=1]
        call void %resolverCast( int %0 )
        ret void
}

Emit one that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
Entry:
	%fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache               ; <void (int)*> [#uses=2]
        %isNull = seteq void (int)* %fpcache, null              ; <bool> [#uses=1]
        br bool %isNull, label %lookupfp, label %usecache

usecache:               ; preds = %lookupfp, %Entry
        %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ]            ; <void (int)*> [#uses=1]
        call void %fp( int %0 )
        ret void

lookupfp:               ; preds = %Entry
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=2]
        store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache
        br label %usecache
}


This makes the JIT debugger *MUCH* faster on large programs, as
getPointerToNamedFunction takes time linear with the size of the program, and
before we would call it every time a function in the text module was called from
the safe module (ouch!).

llvm-svn: 22387
2005-07-12 01:00:32 +00:00
Reid Spencer 03f6f7a537 Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false".

llvm-svn: 22360
2005-07-08 16:48:52 +00:00
Reid Spencer af48d8643d Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.

llvm-svn: 22354
2005-07-08 03:08:58 +00:00
Reid Spencer c9c0473fa5 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.

llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer 5b891e9847 For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.

llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Chris Lattner 06fcc4cb75 add a new -filetype argument to llc.
llvm-svn: 22287
2005-06-25 03:32:05 +00:00
Chris Lattner 09b0eb387a minor cleanups, use copy ctor instead of manually doing it.
llvm-svn: 22285
2005-06-25 03:00:34 +00:00
Chris Lattner 6a7b48e747 refactor this interface
llvm-svn: 22284
2005-06-25 02:50:35 +00:00
Andrew Lenharth ea9af931b8 make SparcV8 and V9 seperately configurable
llvm-svn: 22204
2005-06-08 22:32:51 +00:00
Reid Spencer b19f7a3c22 Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.

llvm-svn: 22142
2005-05-19 21:10:31 +00:00
Reid Spencer 98a2d980ee Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.

llvm-svn: 22141
2005-05-19 21:03:11 +00:00
Reid Spencer e4925ca229 For PR514:
* Make sure the "etcdir" gets checked for configuration files so that
  the installed location for config files is checked.
* Remove the st.in file (moved to projects/Stacker/tools/stkrc)

llvm-svn: 22135
2005-05-19 01:06:46 +00:00
Reid Spencer e9bee08f1d For PR514:
* language specification files are no longer configured with "configure"
* add substitutions for %bindir%, %libdir%, and various llvmgcc related
  variables needed in the c and cpp spec files.
* Implement the stubstituions in the Compiler Driver.
* Move st.in to projects/Stacker/tools/stkrc where it belongs.

llvm-svn: 22128
2005-05-19 00:52:28 +00:00
Chris Lattner 257008beff If loopextract breaks the program provide output so that we can repro the
problem.

llvm-svn: 21790
2005-05-08 21:54:56 +00:00
Chris Lattner 041f8b59c1 Move licm after reassociate, add some cond-propagate passes
llvm-svn: 21769
2005-05-07 22:45:35 +00:00
Misha Brukman 3f670d29dc * Use consistent spacing for function arguments
* Output single-character strings as chars

llvm-svn: 21705
2005-05-05 22:38:21 +00:00
Misha Brukman 23e9f163ad Minor clean-ups
llvm-svn: 21678
2005-05-03 20:30:34 +00:00
Misha Brukman d317d937b2 Clean up and correct llvmc configurations for C and C++
llvm-svn: 21667
2005-05-03 06:13:18 +00:00
Misha Brukman 18aa1d6438 std::string(NULL) does not a proper constructor make
llvm-svn: 21666
2005-05-03 06:10:51 +00:00
Misha Brukman cc42755633 Omit periods at the end of command-line switch explanations for consistency
llvm-svn: 21664
2005-05-03 05:36:14 +00:00
Reid Spencer a21f83f809 Add the simplify-libcalls pass.
llvm-svn: 21585
2005-04-27 02:22:47 +00:00