Commit Graph

2194 Commits

Author SHA1 Message Date
Nick Kledzik
920ae9863b fix dangling pointer and argv off by one errors. Add support for --disable-inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 21:14:10 +00:00
Owen Anderson
7220b814ed Global variables beginning with \01 have special meaning on Darwin, so we need to remove
the name prefix when we change them from internal to external.  This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53236 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 16:38:42 +00:00
Nick Kledzik
82eec45b00 add _lto_codegen_debug_options so that linker can use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 23:24:06 +00:00
Devang Patel
a93ae711a9 Provide a hook to set the code generation debug options to investigate lto failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03 22:53:14 +00:00
Owen Anderson
735e6eabf1 Use ADCE instead of just DCE. ADCE will better clean up after jump threading,
for instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-02 18:42:07 +00:00
Devang Patel
ebd69421a2 Rename new lto2 tool as lto.
lto2->lto


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:15:01 +00:00
Devang Patel
5eabc9d4f6 Remove old LTO interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 18:04:55 +00:00
Devang Patel
687e03b2fa Move dominator info printer into tool/opt/GraphPrinters.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52907 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30 17:32:58 +00:00
Argyrios Kyrtzidis
ca29dffa16 Since we are using GCC to assemble the program, make sure the assembly syntax is AT&T.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-27 15:08:59 +00:00
Chris Lattner
c4ab7acc0b jump threading can introduce allocas, make sure we promote
them back to registers!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:54:18 +00:00
Chris Lattner
6c31e87d7c run mem2reg after the second jump threading pass in llvm-ld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:51:55 +00:00
Chris Lattner
8e336eb04d remove some dead options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 16:44:08 +00:00
Duncan Sands
9954c76f2c Fix some warnings reported by gcc-4.3. Hopefully
this still compiles on windows - I can't test!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52488 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 08:47:31 +00:00
Bill Wendling
e424254897 Refactor the way to get a string containing the features of the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52470 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 21:39:02 +00:00
Bill Wendling
604a818463 If compiling for PPC on an i386 box, the LTO wouldn't get the altivec (and
other) feature information. The workaround is inelegant and could be cleaned up
if this information were available some other way (say, in the IR).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 06:35:30 +00:00
Argyrios Kyrtzidis
48cca1fd46 Add an "exe" suffix only if the output file has no suffix at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 15:20:16 +00:00
Argyrios Kyrtzidis
1662183a83 Make sure all produced executable files have "exe" suffix on Windows.
With this more general way, -native and -native-cbe options are handled too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52287 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 13:48:12 +00:00
Argyrios Kyrtzidis
e2bc1cb711 Make sure that the current executable filename has "exe" suffix on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 12:07:01 +00:00
Argyrios Kyrtzidis
5b90a7296c Append "exe" suffix to executable files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-15 12:01:16 +00:00
Matthijs Kooijman
ad6996d74f Let bugpoint display generated messages on stderr only if no interpreter was
found, this ensures that messages like "Found gcc" end up on stdout where they
belong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52235 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 13:09:43 +00:00
Matthijs Kooijman
fbea227f41 Add -silence-passes option to bugpoint. This option suppresses output generated
when bugpoint is running passes in a child process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52234 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 13:02:26 +00:00
Mikhail Glushenkov
856e106d20 Make all help strings start in upper case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 21:14:10 +00:00
Mikhail Glushenkov
74a0c28fba Fix the -opt switch and add a test case for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 19:56:27 +00:00
Mikhail Glushenkov
18aac1c622 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 18:53:09 +00:00
Mikhail Glushenkov
7ef36069c8 Add a --dry-run option to llvmc2. Patch by Holger Schurig.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51781 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 18:48:52 +00:00
Mikhail Glushenkov
7329610dfa Add a --save-temps option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:29:17 +00:00
Mikhail Glushenkov
a7d0ae34fb Add a check for side effect-free options (specified only in the OptionList).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:28:37 +00:00
Mikhail Glushenkov
0ab8ac318f Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:28:00 +00:00
Mikhail Glushenkov
ed3ba406c7 Show argv[0] in error messages (like gcc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:26:35 +00:00
Mikhail Glushenkov
e43228958c New feature: OptionList.
It can be handy to have all information about options gathered in a single place
to provide an overview of all supported options. This patch allows the following:

def Options : OptionList<[
(switch_option "E", (help "Help string")),
(alias_option "quiet", "q")
...
]>;

Tool-specific option properties (like 'append_cmd') have (obviously) no meaning in
this context, so the only properties that are allowed are 'help' and 'required'.

See usage example in examples/Clang.td.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:26:08 +00:00
Mikhail Glushenkov
270cae3bf8 Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51753 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:25:24 +00:00
Mikhail Glushenkov
5fe8475e3a A small optimization: use static char* array instead of StrVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:24:49 +00:00
Mikhail Glushenkov
92b8da75a1 Make it possible to test if the '-o' option is provided.
The following is now allowed:

    (case (not_empty "o"), do_something, ...)

This didn't work previously because "-o" is built-in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51751 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:24:07 +00:00
Mikhail Glushenkov
6be4ffc7c3 Add support for option aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:22:52 +00:00
Mikhail Glushenkov
fb37f39111 Fix some headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:20:54 +00:00
Mikhail Glushenkov
2e73e851d8 New tests for the 'case' expression: not_empty, in_language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:19:52 +00:00
Mikhail Glushenkov
ef4160dff0 -E should print to stdout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:18:50 +00:00
Mikhail Glushenkov
ffcf3a1a69 Make it possible to have multiple input languages for a single tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:18:16 +00:00
Mikhail Glushenkov
aa3bb17fcc Rename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter.cpp).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:17:29 +00:00
Mikhail Glushenkov
35bca4116e Minor error message fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:16:59 +00:00
Mikhail Glushenkov
163dc1eaa8 Documentation and examples improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51739 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:16:32 +00:00
Mikhail Glushenkov
37f509a70c Do not generate empty 'if's for the output_suffix property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:15:20 +00:00
Mikhail Glushenkov
cd0858e170 Update documentation, add examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:14:42 +00:00
Mikhail Glushenkov
1e4bab2c02 Rename LLVMC-Tutorial.rst to LLVMC-Reference.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:14:01 +00:00
Mikhail Glushenkov
5c7578de08 Make it possible to change the output file suffix based on command-line options.
For instance, the following command:

    llvmc2 -E hello.c

now generates a file with the correct suffix (hello.i).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:13:02 +00:00
Mikhail Glushenkov
08bd2e74dc Add support for user-provided hooks and environment variable reads to the cmd_line tool property.
Used like this: (cmd_line "$CALL(MyHook) --option -o $ENV(VARIABLE) $CALL(AnotherHook)")
Also works with case expressions.

Hook declarations are auto-generated, the definitions should be provided by the user
(just drop a .cpp file in the tools/llvmc2 directory).

Hooks should live in the "hooks" namespace and have type std::string hooks::Hook(void).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51732 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:12:24 +00:00
Mikhail Glushenkov
4eaa389519 Enable the response file ('llvmc @file') support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51731 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:11:45 +00:00
Mikhail Glushenkov
706aecf98e Update the code to the fact that StringSet now lives in llvm/ADT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:11:18 +00:00
Mikhail Glushenkov
b5ccfbf0a9 Make it possible to use the generalised 'case' construct in the cmd_line property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:10:19 +00:00
Mikhail Glushenkov
e5557f4da4 Add a generalised 'case' construct.
Besides assigning edge weights, it will also be used by the cmd_line tool property.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 06:08:50 +00:00