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
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
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
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
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
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
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
Bill Wendling
b56bc61cf4
Add a flag to indicate that an instruction is as cheap (or cheaper) than a move
...
instruction to execute. This can be used for transformations (like two-address
conversion) to remat an instruction instead of generating a "move"
instruction. The idea is to decrease the live ranges and register pressure and
all that jazz.
llvm-svn: 51660
2008-05-28 22:54:52 +00:00
Dan Gohman
19aa4b76fc
Fix the spelling of the va_arg keyword.
...
llvm-svn: 51484
2008-05-23 17:11:55 +00:00
Dan Gohman
c7007dd0dc
Make structs and arrays first-class types, and add assembly
...
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.
Note that this does not yet include CodeGen support.
llvm-svn: 51468
2008-05-23 01:55:30 +00:00
Dan Gohman
c4181f29d4
Add a polygen grammar definition for LLVM assembly language.
...
llvm-svn: 51449
2008-05-22 22:45:03 +00:00
Roman Levenstein
7e3ffb268e
Do not generate by TableGen the hard-coded standard, target-independent part of
...
DAG instruction selectors. Introudce a dedicated header file for this part:
include/llvm/CodeGen/DAGISelHeader.h
TableGen now only generates the include preprocessor directive to include this
new header.
This is a preparation for supporting multiple implementations of instruction
selectors in the future.
Reviewed and approved by Evan and Dan.
llvm-svn: 51102
2008-05-14 10:17:11 +00:00
Mikhail Glushenkov
18508c5df4
Filter option names to escape symbols not allowed as C++ identifiers.
...
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.
llvm-svn: 50973
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov
ac930296dd
Reapply 50867: A small refactoring (extract method) + some comment fixes.
...
Fixed the build breakage, sorry for that.
llvm-svn: 50895
2008-05-09 08:27:26 +00:00
Tanya Lattner
56baa19bfb
Revertin 50867 since it was breaking the build.
...
llvm-svn: 50871
2008-05-08 21:54:20 +00:00
Mikhail Glushenkov
49359aa3b3
A small refactoring (extract method) + some comment fixes.
...
llvm-svn: 50867
2008-05-08 20:02:03 +00:00
Mikhail Glushenkov
7e401e5002
Use Doxygen-style comments.
...
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Mikhail Glushenkov
b2547a6c28
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
...
llvm-svn: 50766
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
24d085fee4
Add new edge property combinator: weight.
...
llvm-svn: 50765
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
3534026221
Use edge weights to choose the right linker based on input language names.
...
llvm-svn: 50759
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
7ea1b7e206
Add weights to graph edges. Choose between edges based on their weight.
...
llvm-svn: 50757
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
e2005cb90d
Remove the UnpackValues() function.
...
llvm-svn: 50756
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
78aa308f84
Add a --linker command-line option, make all tests pass.
...
llvm-svn: 50755
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
89e32fbe59
Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
...
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
c586c41085
Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter
...
llvm-svn: 50748
2008-05-06 18:09:29 +00:00
Mikhail Glushenkov
b70916c93f
Add output redirection, rename namespace llvmcc to namespace llvmc.
...
llvm-svn: 50746
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
839e3445a1
Small output formatting fix.
...
llvm-svn: 50739
2008-05-06 17:27:15 +00:00
Mikhail Glushenkov
68908552ae
Add inward edge counters to Nodes; Associate JoinLists with JoinTools.
...
llvm-svn: 50738
2008-05-06 17:26:53 +00:00
Mikhail Glushenkov
c00f149f81
Return const char* instead of std::string in Tool classes
...
llvm-svn: 50733
2008-05-06 17:24:26 +00:00
Mikhail Glushenkov
3895684d84
Refactoring: extract method.
...
llvm-svn: 50731
2008-05-06 17:23:14 +00:00
Mikhail Glushenkov
2ad807d5fe
Add new edge properties: parameter_equals, element_in_list, and.
...
llvm-svn: 50730
2008-05-06 17:22:47 +00:00
Mikhail Glushenkov
00b7a3bfb5
Implemented switch_on edge property.
...
llvm-svn: 50729
2008-05-06 17:22:03 +00:00
Mikhail Glushenkov
689a173ed2
More work on edge properties. Use Edge classes instead of strings in CompilationGraph.
...
llvm-svn: 50726
2008-05-06 16:36:50 +00:00
Mikhail Glushenkov
10283528ca
Ongoing work: add an edge typechecker, rudimentary support for edge properties.
...
llvm-svn: 50725
2008-05-06 16:36:06 +00:00
Mikhail Glushenkov
72590c9cc7
Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.
...
llvm-svn: 50724
2008-05-06 16:35:25 +00:00
Mikhail Glushenkov
de53f4ce11
Code reorg
...
llvm-svn: 50722
2008-05-06 16:34:12 +00:00
Bill Wendling
8767148326
Remove tar ball from installed directory.
...
llvm-svn: 50717
2008-05-06 08:33:07 +00:00
Bill Wendling
2e2dab8423
Added support for:
...
- defm and multiclass
- imbricatable multiline C style comment
- FIXME/TODO highlight in comment
- binary and hexadecimal number
- code using [{ }] is no highlighted as special (perhaps not the best
choice)
Patch by Cedric Venet!
llvm-svn: 50319
2008-04-27 09:44:10 +00:00
Bill Wendling
b9b4f72a9a
Apple GCC 4.2 builds things differently. It no longer spawns a bunch of
...
processes, but requires the project to use -j.
llvm-svn: 49744
2008-04-15 21:33:52 +00:00
Chuck Rose III
fbfb612c4e
VisualStudio project files updated. #include <algorithm> added to make VisualStudio happy. Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio.
...
llvm-svn: 49743
2008-04-15 21:27:11 +00:00
Evan Cheng
cff9295e43
Sort sub-registers and super-registers lists according to super-sub register relations. e.g. X86::RAX sub-register list is EAX, AX, AL, AH (order of last two are not guaranteed).
...
llvm-svn: 49714
2008-04-15 07:56:03 +00:00
Bill Wendling
4a514d9633
Install into the directory
...
llvm-svn: 49713
2008-04-15 07:02:59 +00:00
Devang Patel
13b2e01d4a
Change llvm tools install location.
...
llvm-svn: 49540
2008-04-11 17:45:39 +00:00
Chris Lattner
da0c256cab
produce an error on invalid input instead of asserting:
...
def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc,
^
llvm-svn: 49462
2008-04-10 04:48:34 +00:00
Nate Begeman
41d0309ce8
Fix a bug where an incorrect bit mask would be generated if a target's last asm
...
string began at a power of 2 in the string index. For example, if "ret" started
at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31.
llvm-svn: 49433
2008-04-09 16:24:11 +00:00