1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

1045 Commits

Author SHA1 Message Date
Reid Spencer
84cf11571d Implement the "setIncludePaths" and "setSymbolDefines" interface methods.
Revise token substitution to be a little faster.
Clean up exception throwing, make sure its always a std::string.

llvm-svn: 16116
2004-08-30 06:29:06 +00:00
Reid Spencer
fb109f9d22 Pass lists of -I and -D options through to the Compiler Driver.
Handle -g and -Wxxx for GCC compatibility

llvm-svn: 16115
2004-08-30 06:27:32 +00:00
Reid Spencer
dac3230f2c Need to throw std::string not const char* if we want error messages to be
caught.

llvm-svn: 16109
2004-08-30 00:06:52 +00:00
Reid Spencer
24cdc1127d Add a missing header file
llvm-svn: 16099
2004-08-29 20:02:28 +00:00
Reid Spencer
e044a2172e Add the LLVMsystem.a library as it is now used for operating system
independence of the tool.

llvm-svn: 16092
2004-08-29 19:29:38 +00:00
Reid Spencer
8cb2484800 The functions in Signal.h are now in the llvm::sys namespace - adjust
llvm-svn: 16091
2004-08-29 19:28:55 +00:00
Reid Spencer
9b8cc2874a add llvmc
llvm-svn: 16090
2004-08-29 19:27:34 +00:00
Reid Spencer
db30d00e08 Convert llvmc to use the lib/System interface instead of directly
using Unix operating system calls.

llvm-svn: 16089
2004-08-29 19:26:56 +00:00
Reid Spencer
2cd624a646 License file for llvmc.
llvm-svn: 16045
2004-08-25 00:41:06 +00:00
Reid Spencer
6faef7d66f Insert declarations for two new functions that support the dependent
libraries feature.

llvm-svn: 16043
2004-08-24 22:55:34 +00:00
Reid Spencer
06c4d33910 Run the compilation actions before we attempt linking work.
Correctly implement the dependent libraries feature so that linked bytecode
files automatically include any dependent libraries they specify.

llvm-svn: 16042
2004-08-24 22:54:32 +00:00
Reid Spencer
5ab60e3f09 Add the directory specified by LLVM_LIB_SEARCH_PATH to the list of
directories to be searched during linking.

llvm-svn: 16041
2004-08-24 22:53:13 +00:00
Reid Spencer
db7904901b Get rid of error messages from CommandLine because -time-passes was
defined twice. We make use of the new TimePassesIsEnabled global boolean
value from Pass.h to access the value.

llvm-svn: 16033
2004-08-24 17:54:26 +00:00
Reid Spencer
04ce97fcfb Adjustments for changes in the configuration language.
llvm-svn: 16026
2004-08-24 14:24:14 +00:00
Reid Spencer
80ef5155ef - Unify format of output messages
- All errors throw std::string
- Default output file name to a.out (if we're linking)

llvm-svn: 16025
2004-08-24 14:05:30 +00:00
Reid Spencer
57f14fb5ba Link with bcreader and vmcore.
llvm-svn: 16024
2004-08-24 14:04:07 +00:00
Reid Spencer
2ab1477240 - Implement the %args% substitution
- Implement parsing of the .output={bytecode|assembly} item.
- Drop parsing support for translator.optimizes, translator.groks_dash_O,
  optimizer.groks_dash_O, translator.output_is_asm, optimizer.output_is_asm
- Add parsing support for translator.output and optimizer.output
- Add optimizer.required parsing support
- Add linker.libs and linker.libpaths parsing support
- Fix error messages to list correct set of tokens expected.
- Rename FileReadable -> FileIsReadable (changed in CompilerDriver.cpp)

llvm-svn: 16023
2004-08-24 14:03:23 +00:00
Reid Spencer
911f0cdb14 - Alphabetize the list of token enumerators.
- Drop old tokens, insert new tokens

llvm-svn: 16022
2004-08-24 13:59:35 +00:00
Reid Spencer
442ebf8ff7 - Rename and rearrange for clarity
- Drop name tokens not used any more (GROKS_DASH_O)
- Rename OUTPUT_IS_ASM as OUTPUT and allow "bytecode" and "assembly" as
  values of it.
- Simplify handleContext (now handleNameContext) arguments and ensure that
  it returns OPTION tokens exactly as scanned.

llvm-svn: 16021
2004-08-24 13:58:37 +00:00
Reid Spencer
3c92d9c9b5 - Remove unused GetSuffix function
- Renamed FileReadable -> FileIsReadable
- Remove support for GROKS_DASH_O; deferr it to %opts% substitution
- Require a -o option except in case of linking where it defaults to a.out
- Fix problem processing *.o and *.bc files.
- Ignore optimization phase if -emit-raw-code
- Correct the assembly generation phase to support -emit-native-code
- Implement dependent library lookup

llvm-svn: 16020
2004-08-24 13:55:17 +00:00
Reid Spencer
4fcef1c5ef Remove unneeded flags.
llvm-svn: 16019
2004-08-24 13:49:57 +00:00
Reid Spencer
da175fc4f5 Provide support for retaining the version number found in a config file.
llvm-svn: 15995
2004-08-22 18:03:25 +00:00
Reid Spencer
a0a8121591 Add the VERSION token.
llvm-svn: 15994
2004-08-22 18:02:41 +00:00
Reid Spencer
d4455d815e Add support for version numbers.
Allow CRLF as a line terminator (as well as plain LF)

llvm-svn: 15993
2004-08-22 18:02:13 +00:00
Reid Spencer
59652b454a Shorten lines so this file can be used as the documentation example
directly. Remove -pre (experimental pass).

llvm-svn: 15992
2004-08-22 18:01:19 +00:00
Reid Spencer
be70baea8a Correct to change interface of the analyzer.
llvm-svn: 15986
2004-08-21 21:00:24 +00:00
Reid Spencer
8a881d2717 Change @ -> % in config files. @name@ might be needed for config files to
themselves be configured via autoconf so its not a good substitition syntax
for llvmc. Furthermore % is more llvmish :)

llvm-svn: 15957
2004-08-20 22:53:11 +00:00
Reid Spencer
deca3b5840 Implement the correct search for configuration files. llvmc will now try
the following in this order:
 1. -config-dir=/path/to/configs
 2. LLVM_CONFIG_DIR=/path/to/configs
 3. ~/.llvm/etc
 4. $prefix/etc
 5. /etc/llvm

llvm-svn: 15950
2004-08-20 09:24:07 +00:00
Reid Spencer
cad614877f Add CONFIG_FILES so the language specific config files can be installed.
llvm-svn: 15949
2004-08-20 09:21:51 +00:00
Reid Spencer
4fa690d247 Implement Assembly support.
Consolidate platform-specific code into "sys" namespace.

llvm-svn: 15947
2004-08-20 09:14:05 +00:00
Reid Spencer
20baacd924 Actually let it compile after file name changes.
llvm-svn: 15931
2004-08-19 21:52:49 +00:00
Reid Spencer
85a95dd68c Moved ConfigData -> Configuration
llvm-svn: 15927
2004-08-19 21:17:53 +00:00
Reid Spencer
d2e0e70267 Implement many new features for llvmc. This is the first version that will
actually execute actions and it is been shown to optimize a Stacker program

llvm-svn: 15912
2004-08-19 04:49:47 +00:00
Reid Spencer
5fdd631700 Back out dependencies on lib/System/Path.h
llvm-svn: 15815
2004-08-16 07:06:38 +00:00
Reid Spencer
cbfb127298 Fix definitions to match tool's actual capabilities.
llvm-svn: 15814
2004-08-16 07:06:13 +00:00
Chris Lattner
9a1b8cf1de Documentation like this doesn't belong here, and now we have the commandguide
llvm-svn: 15785
2004-08-15 22:53:20 +00:00
Reid Spencer
331131e1a2 More Functionality:
- cleaned up lexical scanner
- added support for "lang.optN" configuration items
- added temporary file support (ala lib/System)
- corrected logic for deciding which phases to run
- consolidated the Action and ActionPattern classes

llvm-svn: 15765
2004-08-15 08:19:46 +00:00
Reid Spencer
84327dc15e Initial configuration files (to be installed) for ll (LLVM Assembly) and
st (Stacker) source files. These versions for testing/review only.

llvm-svn: 15764
2004-08-15 08:16:12 +00:00
Reid Spencer
737adb695d Converted to use flex for tokenizing input so we can use an easier to
understand recursive descent parser, we can easily handle more syntax
variety, and we can more easily change the configuration items accepted.

llvm-svn: 15732
2004-08-14 09:37:15 +00:00
Reid Spencer
fe43dbee67 Fix header commentary.
llvm-svn: 15729
2004-08-13 20:25:54 +00:00
Reid Spencer
b0b89a1dd3 Additional functionality. This version handles option parsing and parameter
subsitution correctly for at least .ll and .st files. There's still a long
way to go (i.e. this isn't worth of review yet).

llvm-svn: 15728
2004-08-13 20:22:43 +00:00
Reid Spencer
0d84117719 First version of a utility internal to llvmc that handles the parsing and
construction of configuration data for compiler front ends.

llvm-svn: 15727
2004-08-13 20:21:22 +00:00
Chris Lattner
8966ce8f41 If the block extractor fails, actually emit the bc file that failed to extract
llvm-svn: 15675
2004-08-12 02:36:50 +00:00
Reid Spencer
9b02858105 Move CompilerDriver.h here.
llvm-svn: 15609
2004-08-10 16:29:18 +00:00
Reid Spencer
0cef958976 Initial makefile for the LLVM Compiler Driver.
llvm-svn: 15608
2004-08-10 16:27:08 +00:00
Reid Spencer
18752e3fa4 First "do nothing" version of the LLVM Compiler Driver. This version just
processes command line arguments and allows --help to be used.

llvm-svn: 15607
2004-08-10 16:26:01 +00:00
Chris Lattner
bf37de72f2 while we're at it, make the libraries be on separate lines
llvm-svn: 15526
2004-08-05 18:32:57 +00:00
Misha Brukman
676315bb41 Lines need to end with \ to make sure they're actually continued
llvm-svn: 15525
2004-08-05 18:31:33 +00:00
Misha Brukman
9fe4bea4d9 * Add PowerPC library to LLC
* Fit used libraries on a few lines

llvm-svn: 15524
2004-08-05 18:24:11 +00:00
Brian Gaeke
f9d31d8a7e sparcv9select is history.
llvm-svn: 15516
2004-08-05 05:17:19 +00:00
Misha Brukman
9da0d0b89f * Convert C++ comments to C
* Add UIUC copyright notice headers

llvm-svn: 15503
2004-08-04 21:19:49 +00:00
Misha Brukman
96d7725c9f Shared libraries are usually prepended with `lib'
llvm-svn: 15502
2004-08-04 21:19:27 +00:00
Brian Gaeke
d0cf43f696 sparcv9select is history
llvm-svn: 15479
2004-08-04 07:39:21 +00:00
Brian Gaeke
1f8045ae93 libsparcv9select is history
llvm-svn: 15478
2004-08-04 07:38:52 +00:00
Chris Lattner
6d1c36b4d4 This pass has proven its metal, remove -disable option.
llvm-svn: 15411
2004-08-02 10:10:08 +00:00
Misha Brukman
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
cac8edbc32 Run DSE at link-time, and turn on an IP alias analysis by default in gccld!
The -disable-globalsmodref is temporary and will be removed eventually.

llvm-svn: 15268
2004-07-27 08:13:15 +00:00
Chris Lattner
0d3969f3d1 Finally give bugpoint -timeout support!
llvm-svn: 15163
2004-07-24 07:53:26 +00:00
Misha Brukman
b521637a8d * Convert "\n" -> '\n'
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols

llvm-svn: 15123
2004-07-23 01:30:49 +00:00
Chris Lattner
abe9575868 Remove redundant SCCP pass
Add new DSE pass.  Add a temporary option to disable it in case we need it
This is going in after the July 22 nightly tester run, so we'll wait until the 23rd to see it
:)

llvm-svn: 15104
2004-07-22 08:34:33 +00:00
Brian Gaeke
f18cdca667 These files don't need to include <iostream> since they include "Support/Debug.h".
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Chris Lattner
ba8dc803cb Remove this printer
llvm-svn: 14980
2004-07-18 23:43:34 +00:00
Reid Spencer
7f33869f9b bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage

llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Reid Spencer
f687d42d99 bug 122:
- Minimize redundant isa<GlobalValue> usage

llvm-svn: 14952
2004-07-18 00:44:14 +00:00
Chris Lattner
8e058d3e9b Build skeleton target
llvm-svn: 14876
2004-07-16 07:12:46 +00:00
Chris Lattner
9b03d18729 IA64 compat
llvm-svn: 14867
2004-07-16 00:08:28 +00:00
Chris Lattner
1fa594cf7b Actually, use an exception to stop verification. This gives us much better
error messages because verification stops at the first error.

llvm-svn: 14794
2004-07-13 08:48:04 +00:00
Chris Lattner
2d343521e2 There is no reason to abort and print a stack trace if there is a verification
error.  Just print the message like a good little tool.

llvm-svn: 14793
2004-07-13 08:45:41 +00:00
Misha Brukman
c9bf3b6db9 * Tabs to spaces
* Delete extra blank lines

llvm-svn: 14779
2004-07-12 22:58:07 +00:00
Reid Spencer
7e948057af Correct an output typo.
llvm-svn: 14766
2004-07-11 23:20:54 +00:00
Chris Lattner
4cfce6dea3 Prune unused #include
llvm-svn: 14753
2004-07-11 04:05:32 +00:00
Chris Lattner
0171aec781 Goodbye macro hell, hello nice clean and simple code. This also gives llc
the ability to dynamically load and use targets that are not linked into it
statically.  e.g.:

  llc -load libparisc.so -march=parisc foo.bc -o foo.s

llvm-svn: 14751
2004-07-11 04:03:24 +00:00
Chris Lattner
9e43df4c37 Add -load option
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Chris Lattner
b90bdf1f41 Add a -load option
llvm-svn: 14739
2004-07-11 01:06:59 +00:00
Reid Spencer
6d8b0985d1 Add #include <iostream> since Value.h does not include it any more.
llvm-svn: 14623
2004-07-04 12:20:55 +00:00
Brian Gaeke
ca29562605 Build llvm-bcanalyzer
llvm-svn: 14568
2004-07-02 05:59:20 +00:00
Reid Spencer
1642054814 Name Change: llvm-abcd -> llvm-bcanalyzer
llvm-svn: 14555
2004-07-02 03:22:53 +00:00
Reid Spencer
a8352a0357 Implement verification feature.
Ensure output occurs even in the face of an error.

llvm-svn: 14499
2004-06-29 23:34:27 +00:00
Reid Spencer
599f629a83 The analyzer code now lives in the bcreader library. The bcanalyzer lib
is no more.

llvm-svn: 14498
2004-06-29 23:33:31 +00:00
Chris Lattner
3a9388ccf6 Write .bc files to binary ostreams. This shouldn't change anything on unix,
but allows us to generate valid code on hosts (like windows) that do newline
translation for text files.

llvm-svn: 14418
2004-06-25 20:54:43 +00:00
Chris Lattner
1eb0e5635c Make sure to link all IPA's into opt, so that it has access to stuff like
anders-aa

llvm-svn: 14395
2004-06-25 05:19:17 +00:00
Misha Brukman
0756b32837 TransformUtils library is no longer needed since Linker.cpp is in VMCore
llvm-svn: 14352
2004-06-23 17:36:17 +00:00
Misha Brukman
5b0111dddd Linker.h moved to include/llvm/Support
llvm-svn: 14351
2004-06-23 17:33:09 +00:00
Reid Spencer
1cdaa55cda Clean up documentation and naming of variables.
llvm-svn: 14119
2004-06-10 18:38:44 +00:00
Reid Spencer
49b2fca671 Made detailed output the default and changed -details option to -nodetails.
llvm-svn: 14114
2004-06-10 08:24:42 +00:00
Reid Spencer
e967dde9ca Clean up the documentation.
Simplify the file handling. It now only writes to std::cout.

llvm-svn: 14059
2004-06-08 05:56:58 +00:00
Chris Lattner
79426af62f Eliminate more traces of the -c option
llvm-svn: 14049
2004-06-07 18:10:01 +00:00
Reid Spencer
329505d08b Commit For New Tool: llvm-abcd (Analysis of ByteCode Dumper). This tool
will (eventually) provide statistical analysis of bytecode files as well
as the ability to dump them in a low level format (slot numbers not
resolved). The purpose of this is to aid in the Type!=Value change of
bug 122. With this initial release, llvm-abcd merely dumps out the
bytecode. However, the infrastructure for separating bytecode parsing from
handling the parsing events is in place. The style chosen is similar to
SAX XML parsing where a handler object is called to handlign the parsing
events. This probably isn't useful to anyone but me right now as there is
no analysis yet, and the dumper doesn't work on every bytecode file. It
will probably be useful by the end of this week. Note that there is some
duplication of code from the bytecode reader.  This was done to eliminate
errors from being introduced in the reader and to minimize the impact to
other LLVM developers. At some point, the Analyzer and the Reader will be
integrated to use the same infrastructure. Also, sorry for the minor change
to Instruction.h but I just couldn't bring myself to write code that
depends on Instruction internals.

llvm-svn: 14048
2004-06-07 17:53:43 +00:00
Chris Lattner
1789413bac Make gccld copy the llvm-stub program to be the execution wrapper for
bytecode files on win32 systems.  We keep the shell script on unix systems
because it is much more transparent for the users and supports -load
options.

This allows llvmgcc work correctly on win32 systems without the -native or
-native-cbe options.

llvm-svn: 13946
2004-06-02 00:53:57 +00:00
Misha Brukman
312ed8be87 Fix a double negation (in grammar).
llvm-svn: 13943
2004-06-02 00:29:52 +00:00
Chris Lattner
515dea0a05 Move some functions out of gccld.cpp to GenerateCode.cpp. This allows us
to reduce the inter-file interface in the gccld tool and gets some
uninteresting code out of gccld.cpp.

llvm-svn: 13942
2004-06-02 00:22:24 +00:00
Chris Lattner
28c70404df Refactor a bit of code into a function, no functionality changes.
llvm-svn: 13941
2004-06-02 00:10:19 +00:00
Chris Lattner
2abe671b13 No really cygwin, we LIKE .exe'ness.
llvm-svn: 13939
2004-06-02 00:04:54 +00:00
Chris Lattner
daab811ad9 Build the llvm-stub directory
llvm-svn: 13938
2004-06-01 23:49:55 +00:00
Chris Lattner
de1cee210b Initial checkin of a stub executable that can be used by gccld to forward to
bytecode files on systems that don't support #!/bin/sh natively (ie, win32).

llvm-svn: 13937
2004-06-01 23:48:45 +00:00
Chris Lattner
7ef83df9a2 Neuter the -q option. Stop printing the "program modified" message, ever
llvm-svn: 13844
2004-05-27 20:32:10 +00:00
Reid Spencer
726f1be2d2 Re-introduce the -q option and make opt always return 0, even if the
optimization pasess fail. This is necessary to avoid breaking feature
tests in the tests suite that depend on this behavior. *sigh*

llvm-svn: 13832
2004-05-27 16:28:54 +00:00
Reid Spencer
0e77f07d67 Removed the -q option and the default message written to stderr. The
output produces confusing results in TestRunner.sh

llvm-svn: 13828
2004-05-27 08:26:22 +00:00
Chris Lattner
2236327da5 Right, globals aren't values yet..
llvm-svn: 13822
2004-05-27 06:43:37 +00:00
Chris Lattner
06542fe02e Add a simple pass.
llvm-svn: 13820
2004-05-27 06:13:36 +00:00