1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 22:42:52 +01:00
Commit Graph

39119 Commits

Author SHA1 Message Date
Mikhail Glushenkov
3cc06cc83a 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.

llvm-svn: 51754
2008-05-30 06:26:08 +00:00
Mikhail Glushenkov
46e4310766 Documentation update.
llvm-svn: 51753
2008-05-30 06:25:24 +00:00
Mikhail Glushenkov
6d853110ba A small optimization: use static char* array instead of StrVector.
llvm-svn: 51752
2008-05-30 06:24:49 +00:00
Mikhail Glushenkov
85844e2353 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.

llvm-svn: 51751
2008-05-30 06:24:07 +00:00
Mikhail Glushenkov
4d71bea2c9 Fix: 'sink' handling was broken.
llvm-svn: 51750
2008-05-30 06:23:29 +00:00
Mikhail Glushenkov
471d982643 Add support for option aliases.
llvm-svn: 51749
2008-05-30 06:22:52 +00:00
Mikhail Glushenkov
9c0a984b65 Allow nesting of case expressions.
The following is now legal:

    (case (in_language "c"),
          (case (switch_on "E"), "gcc -x c -E $INFILE", (default), "gcc -x c $INFILE"),
          (default),
          "gcc $INFILE $OUTFILE")

llvm-svn: 51748
2008-05-30 06:22:15 +00:00
Mikhail Glushenkov
8b0a6430e6 Small error message improvement.
llvm-svn: 51747
2008-05-30 06:21:48 +00:00
Mikhail Glushenkov
1ba3b7e1fa Remove RequireDefault parameter from EmitCaseConstructHandler.
There are now no situations when 'default' is required.

llvm-svn: 51746
2008-05-30 06:21:21 +00:00
Mikhail Glushenkov
64ec622f1d Fix some headers.
llvm-svn: 51745
2008-05-30 06:20:54 +00:00
Mikhail Glushenkov
9f66c06b4e New tests for the 'case' expression: not_empty, in_language.
llvm-svn: 51744
2008-05-30 06:19:52 +00:00
Mikhail Glushenkov
9d884b6cfb -E should print to stdout.
llvm-svn: 51743
2008-05-30 06:18:50 +00:00
Mikhail Glushenkov
1abbaf5299 Make it possible to have multiple input languages for a single tool.
llvm-svn: 51742
2008-05-30 06:18:16 +00:00
Mikhail Glushenkov
9cc41e71af Rename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter.cpp).
llvm-svn: 51741
2008-05-30 06:17:29 +00:00
Mikhail Glushenkov
419acffb7c Minor error message fixes.
llvm-svn: 51740
2008-05-30 06:16:59 +00:00
Mikhail Glushenkov
2b1ce739f3 Documentation and examples improvements
llvm-svn: 51739
2008-05-30 06:16:32 +00:00
Mikhail Glushenkov
aa7a46f0bd Better error reporting for the 'case' construct.
llvm-svn: 51738
2008-05-30 06:15:47 +00:00
Mikhail Glushenkov
e0bb150778 Do not generate empty 'if's for the output_suffix property.
llvm-svn: 51737
2008-05-30 06:15:20 +00:00
Mikhail Glushenkov
1cc4f2a4a5 Update documentation, add examples.
llvm-svn: 51736
2008-05-30 06:14:42 +00:00
Mikhail Glushenkov
5bc64aef11 Rename LLVMC-Tutorial.rst to LLVMC-Reference.rst
llvm-svn: 51735
2008-05-30 06:14:01 +00:00
Mikhail Glushenkov
5c31024be9 Make it possible to use hooks like this: '$CALL(MyHook)/path/to/file'.
llvm-svn: 51734
2008-05-30 06:13:29 +00:00
Mikhail Glushenkov
c9f69ac2fe 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).

llvm-svn: 51733
2008-05-30 06:13:02 +00:00
Mikhail Glushenkov
7ded98d7b6 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).

llvm-svn: 51732
2008-05-30 06:12:24 +00:00
Mikhail Glushenkov
97687bef23 Enable the response file ('llvmc @file') support.
llvm-svn: 51731
2008-05-30 06:11:45 +00:00
Mikhail Glushenkov
a5bf652530 Update the code to the fact that StringSet now lives in llvm/ADT.
llvm-svn: 51730
2008-05-30 06:11:18 +00:00
Mikhail Glushenkov
b879936694 Some small tweaks to make the generated code prettier.
llvm-svn: 51729
2008-05-30 06:10:47 +00:00
Mikhail Glushenkov
b81c3fc00f Make it possible to use the generalised 'case' construct in the cmd_line property.
llvm-svn: 51728
2008-05-30 06:10:19 +00:00
Mikhail Glushenkov
4f4ac7de01 Add a generalised 'case' construct.
Besides assigning edge weights, it will also be used by the cmd_line tool property.

llvm-svn: 51727
2008-05-30 06:08:50 +00:00
Nick Lewycky
a02482cfaa Unbreak this test.
llvm-svn: 51726
2008-05-30 05:02:37 +00:00
Nick Kledzik
7afde12ac4 remove the StripSymbolsPass. This should not be done by default in libLTO.dylib. The linker will remove the symbol names if needed after LTO is done
llvm-svn: 51722
2008-05-30 00:59:13 +00:00
Dan Gohman
72f5ed6a0d Remove an unused variable.
llvm-svn: 51721
2008-05-30 00:56:36 +00:00
Dan Gohman
edc136d18f Fix an error in the comment for APInt::getMinSignedBits.
llvm-svn: 51720
2008-05-30 00:46:49 +00:00
Dan Gohman
15eb8b47aa Fix a typo in a comment.
llvm-svn: 51718
2008-05-30 00:08:18 +00:00
Dan Gohman
24ad4a21e3 Fix a copy+paste error in a comment.
llvm-svn: 51717
2008-05-30 00:02:02 +00:00
Dan Gohman
e587db7187 Fix doxygen comment syntax.
llvm-svn: 51716
2008-05-30 00:01:36 +00:00
Owen Anderson
5ff0c098ae Make the renumbering correct in the face of deleted instructions that have been removed from the LiveIntervals maps.
llvm-svn: 51714
2008-05-29 23:01:22 +00:00
Gabor Greif
42da2a4b26 add doxygen comments
llvm-svn: 51712
2008-05-29 22:58:33 +00:00
Bill Wendling
bcd38344b9 Unbreak build.
llvm-svn: 51709
2008-05-29 22:02:08 +00:00
Anton Korobeynikov
80d70cd681 Remove guard, so *each* inclusion will result in a warning
llvm-svn: 51708
2008-05-29 21:57:11 +00:00
Dan Gohman
aa8fcd5657 Add patterns for CALL32m and CALL64m. They aren't matched in most
cases due to an isel deficiency already noted in
lib/Target/X86/README.txt, but they can be matched in this fold-call.ll
testcase, for example.

This is interesting mainly because it exposes a tricky tblgen bug;
tblgen was incorrectly computing the starting index for variable_ops
in the case of a complex pattern.

llvm-svn: 51706
2008-05-29 21:50:34 +00:00
Bill Wendling
2ba98ca60f Remove more iostream header includes. Needed to implement a "FlushStream"
function to flush a specified std::ostream.

llvm-svn: 51705
2008-05-29 21:46:33 +00:00
Bill Wendling
4a95fce74c Remove <iostream>.
llvm-svn: 51704
2008-05-29 21:29:39 +00:00
Owen Anderson
0eabbbfc58 Add newline at end of file.
llvm-svn: 51701
2008-05-29 21:05:16 +00:00
Dan Gohman
4e87d82476 Fix a tblgen problem handling variable_ops in tblgen instruction
definitions. This adds a new construct, "discard", for indicating
that a named node in the input matching pattern is to be discarded,
instead of corresponding to a node in the output pattern. This
allows tblgen to know where the arguments for the varaible_ops are
supposed to begin.

This fixes "rdar://5791600", whatever that is ;-).

llvm-svn: 51699
2008-05-29 19:57:41 +00:00
Dan Gohman
d8b84813d5 const-ify getOpcode.
llvm-svn: 51698
2008-05-29 19:53:46 +00:00
Dan Gohman
3ea2dceca0 Prune and tidy #includes.
llvm-svn: 51697
2008-05-29 19:52:31 +00:00
Dan Gohman
e256337a1a Expand small memmovs using inline code. Set the X86 threshold for expanding
memmove to a more plausible value, now that it's actually being used.

llvm-svn: 51696
2008-05-29 19:42:22 +00:00
Anton Korobeynikov
eb3cd5e822 For PR1338: Rename test dirs
llvm-svn: 51695
2008-05-29 19:17:15 +00:00
Owen Anderson
7de6e25492 Revert part of my last patch that I didn't intend to commit yet.
llvm-svn: 51694
2008-05-29 18:35:21 +00:00
Anton Korobeynikov
f46e96a222 Add file with warning for backward comptibility. Should be removed after 2.4
llvm-svn: 51693
2008-05-29 18:18:15 +00:00