Mikhail Glushenkov
f40296bb49
Build system tweaks to make it more convenient for the plugin authors.
...
Plugins can be now compiled in with a slight Makefile change.
For example, to compile the new Clang driver, use:
cd $LLVMC2_DIR
make TOOLNAME=ccc2 BUILTIN_PLUGINS=Clang
llvm-svn: 56967
2008-10-02 21:15:05 +00:00
Bill Wendling
bed16a1a2b
Avoid name shadowing with E variable defined in for(). This was giving VC++
...
grief.
llvm-svn: 56961
2008-10-02 18:39:11 +00:00
Oscar Fuentes
cdc95498f5
CMake: Builds all targets.
...
llvm-svn: 56641
2008-09-26 04:40:32 +00:00
Oscar Fuentes
ace327af3e
CMake: Lists of source files updated. Removed bogus dependency from
...
lib/VMCore/CMakeLists.txt
llvm-svn: 56541
2008-09-24 01:58:12 +00:00
Duncan Sands
9c40c28926
Rationalize the names of passes that print information:
...
-callgraph => print-callgraph
-callscc => print-callgraph-sccs
-cfgscc => print-cfg-sccs
-externalfnconstants => print-externalfnconstants
-print => print-function
-print-alias-sets (no change)
-print-callgraph => dot-callgraph
-print-cfg => dot-cfg
-print-cfg-only => dot-cfg-only
-print-dom-info (no change)
-printm => print-module
-printusedtypes => print-used-types
llvm-svn: 56487
2008-09-23 12:47:39 +00:00
Mikhail Glushenkov
446c5dcf57
Convert llvmc2 plugins to use llvm/Support/Registry.h machinery.
...
llvm-svn: 56467
2008-09-22 20:51:19 +00:00
Mikhail Glushenkov
53aa586844
Move llvmc2 header files under include/llvm/CompilerDriver
...
llvm-svn: 56466
2008-09-22 20:50:40 +00:00
Mikhail Glushenkov
47afe73081
Plugin support for llvmc2 (a-la opt).
...
llvm-svn: 56465
2008-09-22 20:49:34 +00:00
Mikhail Glushenkov
6f1db3df74
Add a 'Debugging' section to the documentation.
...
llvm-svn: 56464
2008-09-22 20:48:48 +00:00
Mikhail Glushenkov
4825a0bb2f
Make comments a little bit more clear.
...
llvm-svn: 56463
2008-09-22 20:48:22 +00:00
Mikhail Glushenkov
8a2bdc74b2
Get rid of GlobalLanguageMap. Global state is evil.
...
llvm-svn: 56462
2008-09-22 20:47:46 +00:00
Mikhail Glushenkov
632d982a7f
Rename our version of ccc to ccc2
...
llvm-svn: 56461
2008-09-22 20:47:09 +00:00
Mikhail Glushenkov
1c4e084bd2
Fix some comments
...
llvm-svn: 56460
2008-09-22 20:46:44 +00:00
Mikhail Glushenkov
9c13f724fc
Add a (forward_as) option property
...
llvm-svn: 56459
2008-09-22 20:46:19 +00:00
Mikhail Glushenkov
b50080e6cb
Delete the file llvmc2/doc/LLVMC-Enhancements.rst + some minor language/spelling fixes.
...
llvm-svn: 56458
2008-09-22 20:45:17 +00:00
Oscar Fuentes
8807bddf08
CMake build system: support for parallel builds.
...
llvm-svn: 56453
2008-09-22 18:21:51 +00:00
Oscar Fuentes
a229b3c9a7
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Duncan Sands
5408dfd3b8
Turn on the AddReadAttrs pass.
...
llvm-svn: 56345
2008-09-19 14:34:36 +00:00
Duncan Sands
938e8f60d6
Teach -callgraph to always print the callgraph (as the
...
description says it does), not just when -analyze is
used as well. This means printing to stderr, so adjust
some tests.
llvm-svn: 56337
2008-09-19 07:57:09 +00:00
Devang Patel
7293f0f344
Fix comments, help messages.
...
llvm-svn: 56282
2008-09-17 16:01:39 +00:00
Devang Patel
11b862aed5
Fix cut-n-pasto.
...
llvm-svn: 56265
2008-09-17 00:01:04 +00:00
Devang Patel
9966ccffb4
Add -O1, -O2 and -O3 that matches llvm-gcc's -O1, -O2 and -O3 respectively.
...
llvm-svn: 56255
2008-09-16 22:25:14 +00:00
Duncan Sands
18da83555f
End of the GlobalsModRef experiment.
...
llvm-svn: 56222
2008-09-15 18:42:38 +00:00
Duncan Sands
fa1472fd55
Give GlobalsModRef a whirl in the nightly testers.
...
I placed it just before GVN because that it is the
pass most likely to benefit from it. Some quick
and dirty testing confirms that this is a decent
place for it.
llvm-svn: 56144
2008-09-12 08:23:37 +00:00
Evan Cheng
7aedcf151c
Allow use of ssh to perform remote execution.
...
llvm-svn: 55979
2008-09-09 06:11:26 +00:00
Devang Patel
d3a1b46aad
Backout 55429
...
llvm-svn: 55432
2008-08-27 20:51:49 +00:00
Devang Patel
fdef44d7c4
Add facility to create a target.
...
llvm-svn: 55429
2008-08-27 20:00:27 +00:00
Chris Lattner
0c19df4871
Switch the asmprinter (.ll) and all the stuff it requires over to
...
use raw_ostream instead of std::ostream. Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).
Other interesting changes:
1) This makes Value::print be non-virtual.
2) AP[S]Int and ConstantRange can no longer print to ostream directly,
use raw_ostream instead.
3) This fixes a bug in raw_os_ostream where it didn't flush itself
when destroyed.
4) This adds a new SDNode::print method, instead of only allowing "dump".
A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream
versions.
This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.
llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Dan Gohman
f3e13bbd4d
Don't silently ignore errors when opening output streams.
...
llvm-svn: 55120
2008-08-21 15:33:45 +00:00
Owen Anderson
9371964f47
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Anton Korobeynikov
e0c83e47e3
Link GC metadata printers by default to llc
...
llvm-svn: 54892
2008-08-17 14:33:01 +00:00
Anton Korobeynikov
c5faeb82b5
Move X86 assembler printers into separate directory. This allows JIT-only users not to link it in (use 'x86codegen' llvm-config arg for this)
...
llvm-svn: 54886
2008-08-17 13:53:59 +00:00
Owen Anderson
affe0267f8
Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated for almost a year; it's finally time for them to go away.
...
llvm-svn: 54822
2008-08-15 21:31:02 +00:00
Evan Cheng
06d988eaa3
Add -fast command line option to lli. It enables fast codegen path.
...
llvm-svn: 54524
2008-08-08 08:12:06 +00:00
Matthijs Kooijman
3d5d6f90e0
Improve bugpoint output a bit by outputting the actual instructions instead of
...
just it's name, which is often empty. Also remove a newline from the output
that wasn't really needed.
llvm-svn: 54158
2008-07-29 08:55:30 +00:00
Devang Patel
bfc77176d5
Identify llvm bit-code file that is causing linking failure in LTO mode.
...
llvm-svn: 53972
2008-07-24 00:34:11 +00:00
Devang Patel
7238723ccb
Quit early, if unable to reproduce error using original input files.
...
Quit, if unable to fix error when linker input files are all native object files.
llvm-svn: 53935
2008-07-22 22:20:18 +00:00
Devang Patel
ea185dc2c1
Remove temp. files in the end.
...
llvm-svn: 53930
2008-07-22 20:03:45 +00:00
Bill Wendling
caf1ac8545
Remove more tabs.
...
llvm-svn: 53905
2008-07-22 09:08:05 +00:00
Devang Patel
f81bd70177
Provide llvm bitcode file to native object file interface.
...
llvm-svn: 53886
2008-07-21 23:04:39 +00:00
Nick Kledzik
44831bcb8c
tentative definitions are default visibility
...
llvm-svn: 53780
2008-07-19 00:58:07 +00:00
Devang Patel
bf3a52a62c
typo.
...
llvm-svn: 53778
2008-07-18 23:47:27 +00:00
Devang Patel
4e38849dec
If all linker input files are native object files then lto-bugpoint is not useful.
...
llvm-svn: 53777
2008-07-18 23:46:41 +00:00
Devang Patel
f45f608e7d
Start writing lto-bugpoint tool.
...
llvm-svn: 53774
2008-07-18 22:59:45 +00:00
Devang Patel
41cfed7e49
Name string length is end position marker - begin position marker.
...
llvm-svn: 53697
2008-07-16 19:49:09 +00:00
Devang Patel
a59fe95be3
Do not forget global definitions from inline asm code block.
...
llvm-svn: 53693
2008-07-16 18:06:52 +00:00
Devang Patel
7688bed4ff
LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
...
llvm-svn: 53580
2008-07-15 00:00:11 +00:00
Evan Cheng
4015ae1d2c
Goodbye tail duplication (for good this time).
...
llvm-svn: 53574
2008-07-14 22:29:15 +00:00
Dan Gohman
0c292dbb6c
Reformat this message to fit in 80 cols.
...
llvm-svn: 53561
2008-07-14 17:43:27 +00:00
Duncan Sands
2e6f7b49bf
Fix comment.
...
llvm-svn: 53525
2008-07-13 20:14:38 +00:00
Chris Lattner
501c3b67fd
Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
...
llvm-svn: 53523
2008-07-13 19:35:21 +00:00
Nick Kledzik
c232347cb8
fix dangling pointer and argv off by one errors. Add support for --disable-inlining
...
llvm-svn: 53249
2008-07-08 21:14:10 +00:00
Owen Anderson
c76bacbffb
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.
llvm-svn: 53236
2008-07-08 16:38:42 +00:00
Nick Kledzik
7c6f23fb9d
add _lto_codegen_debug_options so that linker can use it
...
llvm-svn: 53213
2008-07-07 23:24:06 +00:00
Devang Patel
a0e4fb8283
Provide a hook to set the code generation debug options to investigate lto failures.
...
llvm-svn: 53119
2008-07-03 22:53:14 +00:00
Owen Anderson
abfd3a8162
Use ADCE instead of just DCE. ADCE will better clean up after jump threading,
...
for instance.
llvm-svn: 53045
2008-07-02 18:42:07 +00:00
Devang Patel
4be1c150e4
Rename new lto2 tool as lto.
...
lto2->lto
llvm-svn: 52912
2008-06-30 18:15:01 +00:00
Devang Patel
a1e5413983
Remove old LTO interface.
...
llvm-svn: 52909
2008-06-30 18:04:55 +00:00
Devang Patel
81ea3bb55c
Move dominator info printer into tool/opt/GraphPrinters.cpp
...
llvm-svn: 52907
2008-06-30 17:32:58 +00:00
Argyrios Kyrtzidis
969cc2aea3
Since we are using GCC to assemble the program, make sure the assembly syntax is AT&T.
...
llvm-svn: 52827
2008-06-27 15:08:59 +00:00
Chris Lattner
d95b74870e
jump threading can introduce allocas, make sure we promote
...
them back to registers!
llvm-svn: 52729
2008-06-25 16:54:18 +00:00
Chris Lattner
0e06949726
run mem2reg after the second jump threading pass in llvm-ld.
...
llvm-svn: 52728
2008-06-25 16:51:55 +00:00
Chris Lattner
10d75bb88b
remove some dead options.
...
llvm-svn: 52726
2008-06-25 16:44:08 +00:00
Duncan Sands
db356eea26
Fix some warnings reported by gcc-4.3. Hopefully
...
this still compiles on windows - I can't test!
llvm-svn: 52488
2008-06-19 08:47:31 +00:00
Bill Wendling
573e0fd68b
Refactor the way to get a string containing the features of the target.
...
llvm-svn: 52470
2008-06-18 21:39:02 +00:00
Bill Wendling
9b2c5730b3
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).
llvm-svn: 52447
2008-06-18 06:35:30 +00:00
Argyrios Kyrtzidis
aea2be2610
Add an "exe" suffix only if the output file has no suffix at all.
...
llvm-svn: 52289
2008-06-15 15:20:16 +00:00
Argyrios Kyrtzidis
cb16b095c5
Make sure all produced executable files have "exe" suffix on Windows.
...
With this more general way, -native and -native-cbe options are handled too.
llvm-svn: 52287
2008-06-15 13:48:12 +00:00
Argyrios Kyrtzidis
bddf2fd699
Make sure that the current executable filename has "exe" suffix on Windows.
...
llvm-svn: 52286
2008-06-15 12:07:01 +00:00
Argyrios Kyrtzidis
5037fe21aa
Append "exe" suffix to executable files.
...
llvm-svn: 52285
2008-06-15 12:01:16 +00:00
Matthijs Kooijman
3bb1276ed2
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.
llvm-svn: 52235
2008-06-12 13:09:43 +00:00
Matthijs Kooijman
4ba5df8a68
Add -silence-passes option to bugpoint. This option suppresses output generated
...
when bugpoint is running passes in a child process.
llvm-svn: 52234
2008-06-12 13:02:26 +00:00
Mikhail Glushenkov
7640cca259
Make all help strings start in upper case.
...
llvm-svn: 51788
2008-05-30 21:14:10 +00:00
Mikhail Glushenkov
b6725054b8
Fix the -opt switch and add a test case for it.
...
llvm-svn: 51784
2008-05-30 19:56:27 +00:00
Mikhail Glushenkov
48b9f4be9d
Fix indentation.
...
llvm-svn: 51782
2008-05-30 18:53:09 +00:00
Mikhail Glushenkov
241042b700
Add a --dry-run option to llvmc2. Patch by Holger Schurig.
...
llvm-svn: 51781
2008-05-30 18:48:52 +00:00
Mikhail Glushenkov
394620bbd8
Add a --save-temps option.
...
llvm-svn: 51760
2008-05-30 06:29:17 +00:00
Mikhail Glushenkov
401f3d6eab
Add a check for side effect-free options (specified only in the OptionList).
...
llvm-svn: 51759
2008-05-30 06:28:37 +00:00
Mikhail Glushenkov
47817cd1a4
Documentation update.
...
llvm-svn: 51758
2008-05-30 06:28:00 +00:00
Mikhail Glushenkov
1c64538a5e
Show argv[0] in error messages (like gcc).
...
llvm-svn: 51755
2008-05-30 06:26:35 +00:00
Mikhail Glushenkov
b9b010eb09
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
ae551a012d
Documentation update.
...
llvm-svn: 51753
2008-05-30 06:25:24 +00:00
Mikhail Glushenkov
c8bd3517d5
A small optimization: use static char* array instead of StrVector.
...
llvm-svn: 51752
2008-05-30 06:24:49 +00:00
Mikhail Glushenkov
bf14dd7dc3
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
b043663cf9
Add support for option aliases.
...
llvm-svn: 51749
2008-05-30 06:22:52 +00:00
Mikhail Glushenkov
5916ade717
Fix some headers.
...
llvm-svn: 51745
2008-05-30 06:20:54 +00:00
Mikhail Glushenkov
2f51489a62
New tests for the 'case' expression: not_empty, in_language.
...
llvm-svn: 51744
2008-05-30 06:19:52 +00:00
Mikhail Glushenkov
90777a5b82
-E should print to stdout.
...
llvm-svn: 51743
2008-05-30 06:18:50 +00:00
Mikhail Glushenkov
1f7a028929
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
73d708b82c
Rename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter.cpp).
...
llvm-svn: 51741
2008-05-30 06:17:29 +00:00
Mikhail Glushenkov
b2ec0b425b
Minor error message fixes.
...
llvm-svn: 51740
2008-05-30 06:16:59 +00:00
Mikhail Glushenkov
dc45f58905
Documentation and examples improvements
...
llvm-svn: 51739
2008-05-30 06:16:32 +00:00
Mikhail Glushenkov
9e58d5958f
Do not generate empty 'if's for the output_suffix property.
...
llvm-svn: 51737
2008-05-30 06:15:20 +00:00
Mikhail Glushenkov
490692c1d1
Update documentation, add examples.
...
llvm-svn: 51736
2008-05-30 06:14:42 +00:00
Mikhail Glushenkov
0ec82aff72
Rename LLVMC-Tutorial.rst to LLVMC-Reference.rst
...
llvm-svn: 51735
2008-05-30 06:14:01 +00:00
Mikhail Glushenkov
73edde26f0
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
fc4ed7ad83
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
550052d0e5
Enable the response file ('llvmc @file') support.
...
llvm-svn: 51731
2008-05-30 06:11:45 +00:00
Mikhail Glushenkov
a06c516cad
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
e57a403338
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
8fedbb7b02
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 Kledzik
25368998e7
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
Anton Korobeynikov
cf3acae26e
For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
...
llvm-svn: 51687
2008-05-29 17:41:17 +00:00
Owen Anderson
fd24ce0a99
Re-enable the newly simplified ADCE. This fixes a regression on
...
Dhrystone introduced by its removal.
llvm-svn: 51669
2008-05-29 08:48:21 +00:00
Nick Kledzik
1c4627c282
use space insted of tabs
...
llvm-svn: 51623
2008-05-28 00:06:14 +00:00
Nick Kledzik
ce956e0613
fix infinite recursion if a global's initializer references the global
...
llvm-svn: 51617
2008-05-27 22:07:08 +00:00
Devang Patel
8b16aeb879
Add instcombine after global optimizations.
...
llvm-svn: 51611
2008-05-27 20:42:44 +00:00
Devang Patel
d38b712ee0
Use IPSCCPPass instead of IPConstantPropagationPass.
...
llvm-svn: 51605
2008-05-27 20:18:45 +00:00
Owen Anderson
698e72ec2c
Remove ADCE from the optimization pipeline.
...
llvm-svn: 51581
2008-05-27 04:27:27 +00:00
Dan Gohman
643b3a0581
Add #includes to make some dependencies explicit.
...
llvm-svn: 51496
2008-05-23 20:40:06 +00:00
Dale Johannesen
5b74efd723
Make LTO expect common and weak to be represented differently.
...
Reading .bc files from before that change will no longer work.
llvm-svn: 51457
2008-05-23 00:15:10 +00:00
Evan Cheng
16f036cbe8
Rename -no-lazy to -disable-lazy-compilation.
...
llvm-svn: 51386
2008-05-21 18:20:21 +00:00
Dale Johannesen
e45329448e
Add CommonLinkage, in a way that preserves the
...
behavior on old .bc files.
llvm-svn: 51210
2008-05-16 22:46:40 +00:00
Dale Johannesen
829dab0221
Add CommonLinkage to lto (treated same as weak AFAICT)
...
and llvm-nm (prints as C).
llvm-svn: 51209
2008-05-16 22:44:18 +00:00
Evan Cheng
c5c7a290e9
Re-enable tail duplication pass (now with default threshold down to 1 instruction).
...
llvm-svn: 51184
2008-05-16 07:57:10 +00:00
Gabor Greif
697e94cc22
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
...
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Evan Cheng
13e693f331
Remove tail duplication pass.
...
llvm-svn: 51139
2008-05-15 07:43:15 +00:00
Devang Patel
38e59eb0c7
Recover nestedloop regression reported by nightly tester.
...
llvm-svn: 51110
2008-05-14 18:04:30 +00:00
Devang Patel
a37cf46c87
Do not run instruction combiner in middle of loop optimization passes.
...
llvm-svn: 51084
2008-05-14 00:26:11 +00:00
Mikhail Glushenkov
c79304461a
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
3f896c8d16
Make it possible to choose between different compilation graph definitions at compile-time.
...
llvm-svn: 50972
2008-05-12 16:32:24 +00:00
Mikhail Glushenkov
128349b8bf
Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
...
llvm-svn: 50971
2008-05-12 16:31:42 +00:00
Owen Anderson
18709fef4a
Re-enable loop deletion by default.
...
llvm-svn: 50941
2008-05-10 07:10:24 +00:00
Mikhail Glushenkov
4ae55648bc
Rename Example.td to Graph.td.
...
llvm-svn: 50910
2008-05-09 19:11:28 +00:00
Nick Kledzik
db18f328d7
use doxygen comments for makeBuffer()
...
llvm-svn: 50908
2008-05-09 18:44:41 +00:00
Mikhail Glushenkov
22ce861ffe
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
Nick Kledzik
63b6127a73
<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero terminated
...
llvm-svn: 50880
2008-05-09 01:09:59 +00:00
Tanya Lattner
93cea9fd18
Revertin 50867 since it was breaking the build.
...
llvm-svn: 50871
2008-05-08 21:54:20 +00:00
Mikhail Glushenkov
e75ac17eaa
Add -E and -S options
...
llvm-svn: 50868
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
d7e151f868
A small refactoring (extract method) + some comment fixes.
...
llvm-svn: 50867
2008-05-08 20:02:03 +00:00
Mikhail Glushenkov
41318a15d0
Use Doxygen-style comments.
...
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Owen Anderson
0d84582dc0
Disable loop deletion until the release branch.
...
llvm-svn: 50787
2008-05-06 23:56:34 +00:00
Mikhail Glushenkov
eeac27e38c
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
...
llvm-svn: 50766
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
5e9d6a3dd8
Add new edge property combinator: weight.
...
llvm-svn: 50765
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
bfc8954a65
Add a help string for the -c option
...
llvm-svn: 50764
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
7e415c4c18
Update documentation to reflect the current state of affairs.
...
llvm-svn: 50763
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
0ca372a6be
Some cosmetic changes (change some comments, move code around a bit).
...
llvm-svn: 50762
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
de7fad129d
Refactoring: split the function CompilationGraph::Build() into two parts.
...
llvm-svn: 50760
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
a02084cff7
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
1b056e9e5a
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
3a2f5c423e
Remove the UnpackValues() function.
...
llvm-svn: 50756
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
7f6ed20009
Add a --linker command-line option, make all tests pass.
...
llvm-svn: 50755
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
20c18c344b
Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
...
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
fc905c64ab
Add -x option (like in gcc).
...
llvm-svn: 50750
2008-05-06 18:10:53 +00:00
Mikhail Glushenkov
baacf0d692
Take object file as input and handle files with the same name correctly.
...
llvm-svn: 50749
2008-05-06 18:10:20 +00:00
Mikhail Glushenkov
d4918dd32c
Add output redirection, rename namespace llvmcc to namespace llvmc.
...
llvm-svn: 50746
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
2eb0268fab
Make AutoGenerated.inc depend also on Tools.td and Common.td
...
llvm-svn: 50745
2008-05-06 18:08:12 +00:00
Mikhail Glushenkov
73d866efda
Utilize topological sort in CompilationGraph::Build().
...
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.
llvm-svn: 50744
2008-05-06 18:07:48 +00:00
Mikhail Glushenkov
7701512231
Add TopologicalSort method to CompilationGraph.
...
llvm-svn: 50743
2008-05-06 18:07:14 +00:00
Mikhail Glushenkov
af932f0d96
Do not require positional arguments when we're only printing out the graph.
...
llvm-svn: 50742
2008-05-06 17:44:16 +00:00
Mikhail Glushenkov
0620d0ca47
Make ChooseEdge more generic and use it to choose between different toolchains.
...
llvm-svn: 50741
2008-05-06 17:28:03 +00:00
Mikhail Glushenkov
891c14d1f1
Remove unnecessary argument from PassThroughGraph
...
llvm-svn: 50740
2008-05-06 17:27:37 +00:00
Mikhail Glushenkov
2709e1a2c9
Add inward edge counters to Nodes; Associate JoinLists with JoinTools.
...
llvm-svn: 50738
2008-05-06 17:26:53 +00:00
Mikhail Glushenkov
ee81aa3812
Enhancements for --view-graph
...
llvm-svn: 50737
2008-05-06 17:26:14 +00:00
Mikhail Glushenkov
be23113e93
Split the Build function into two parts.
...
llvm-svn: 50736
2008-05-06 17:25:51 +00:00
Mikhail Glushenkov
af15882a5a
Make llvmc return 1 when the compilation fails.
...
llvm-svn: 50735
2008-05-06 17:25:23 +00:00
Mikhail Glushenkov
baa0b592d0
Return const char* instead of std::string in Tool classes
...
llvm-svn: 50733
2008-05-06 17:24:26 +00:00
Mikhail Glushenkov
6ec1761ef6
Add an ability to choose between different edges based on edge properties.
...
llvm-svn: 50732
2008-05-06 17:23:50 +00:00
Mikhail Glushenkov
59eb254092
Add new edge properties: parameter_equals, element_in_list, and.
...
llvm-svn: 50730
2008-05-06 17:22:47 +00:00
Mikhail Glushenkov
681df41f2c
Implemented switch_on edge property.
...
llvm-svn: 50729
2008-05-06 17:22:03 +00:00
Mikhail Glushenkov
39a9335241
Cosmetic change: if( -> if (
...
llvm-svn: 50728
2008-05-06 16:37:33 +00:00
Mikhail Glushenkov
abd7cc7238
Remove ExampleWithOpt.td: this file was merged with Example.td.
...
llvm-svn: 50727
2008-05-06 16:37:12 +00:00
Mikhail Glushenkov
251280ce0b
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
459df48de7
Ongoing work: add an edge typechecker, rudimentary support for edge properties.
...
llvm-svn: 50725
2008-05-06 16:36:06 +00:00
Mikhail Glushenkov
adcb08d1b3
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
8190616359
Small const-correctness fix
...
llvm-svn: 50723
2008-05-06 16:34:39 +00:00
Mikhail Glushenkov
a8276c5323
Code reorg
...
llvm-svn: 50722
2008-05-06 16:34:12 +00:00
Owen Anderson
7db342b0a8
Enable dead loop elimination.
...
llvm-svn: 50682
2008-05-05 23:38:07 +00:00
Anton Korobeynikov
625f4fee4d
Drop llvmc also, it will be replaced by shiny new llvmc2
...
llvm-svn: 50615
2008-05-04 06:19:55 +00:00
Anton Korobeynikov
a41f7f8985
Drop llvm2cpp, it's now a llc target
...
llvm-svn: 50614
2008-05-04 06:16:50 +00:00
Chris Lattner
e3b320bd4b
move libcalls to the same place llvm-gcc has it.
...
llvm-svn: 50593
2008-05-02 22:05:06 +00:00
Anton Korobeynikov
c53565c479
Add possibility of using arbitrary to to execute stuff from bugpoint.
...
Patch by Pekka Jääskeläinen!
llvm-svn: 50373
2008-04-28 20:53:48 +00:00
Chris Lattner
7855a5cb70
several multiple-retval fixes for bugpoint.
...
llvm-svn: 50331
2008-04-28 00:04:58 +00:00
Nick Lewycky
4d43d3c72c
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
...
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265
2008-04-25 16:53:59 +00:00
Anton Korobeynikov
8bfd6de8db
Disable building of llvm2cpp. The directory will be removed before 2.3 release.
...
llvm-svn: 50193
2008-04-23 22:46:24 +00:00
Anton Korobeynikov
78695035c4
First step of implementing PR1538: move llvm2cpp logic to new 'target'
...
llvm-svn: 50189
2008-04-23 22:29:24 +00:00
Bill Wendling
107d369b8b
Use the Create static method for some of these objects. They no longer
...
have public constructors. This should fix PR2246.
llvm-svn: 50145
2008-04-23 07:13:17 +00:00
Owen Anderson
7432cbd048
Move MemCpyOpt after GVN.
...
llvm-svn: 50097
2008-04-22 07:12:26 +00:00
Evan Cheng
0422bef7ed
Added command line option -no-lazy to disable JIT lazy compilation.
...
llvm-svn: 50095
2008-04-22 06:51:41 +00:00
Owen Anderson
a5030c3017
Add MemCpyOpt to LTO.
...
llvm-svn: 50081
2008-04-22 03:57:36 +00:00
Gabor Greif
f386da0aec
fix some residual old API that fell thru the cracks of the conversion script, closes http://llvm.org/bugs/show_bug.cgi?id=2246
...
llvm-svn: 50062
2008-04-21 21:31:55 +00:00
Owen Anderson
2988ccad6a
Use GVN in LTO instead of GCSE+LoadVN.
...
llvm-svn: 50036
2008-04-21 07:51:07 +00:00
Chris Lattner
0645b88852
Add jump threading to liblto.
...
llvm-svn: 50028
2008-04-21 04:31:40 +00:00
Chris Lattner
ba994f7cdf
run the jump threading pass in llvm-ld also
...
llvm-svn: 50027
2008-04-21 04:28:40 +00:00
Chris Lattner
b15e1f963d
enable jump threading pass by default. This causes no miscompilations
...
and can significantly shrinkify some code, particularly from C++ land.
llvm-svn: 50025
2008-04-21 04:22:09 +00:00
Duncan Sands
9ed1242efc
Run SimplifyLibCalls near the beginning, not at
...
the end. It is now run at the same moment as in
llvm-gcc. Also, run StripDeadPrototypes at the
end, just before running DeadTypeElimination.
This may be useful when doing LTO. Note that
llvm-gcc runs StripDeadPrototypes but not
DeadTypeElimination.
llvm-svn: 49848
2008-04-17 12:03:38 +00:00
Dan Gohman
bd2613d382
Fix a memory leak in llc.
...
llvm-svn: 49793
2008-04-16 15:56:26 +00:00
Owen Anderson
7629b71dd4
Revert r49614. As Dan pointed out, some of these aren't correct.
...
llvm-svn: 49657
2008-04-14 17:38:21 +00:00
Owen Anderson
1f6fbc4bc3
Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
...
which is significantly more efficient.
llvm-svn: 49614
2008-04-13 19:15:17 +00:00
Evan Cheng
2025a490d0
Move memcpy / memset optimization pass after GVN.
...
llvm-svn: 49457
2008-04-10 01:33:05 +00:00
Owen Anderson
ef9a6fd5c2
Factor a bunch of functionality related to memcpy and memset transforms out of
...
GVN and into its own pass.
llvm-svn: 49419
2008-04-09 08:23:16 +00:00
Tanya Lattner
18948355e1
Remove llvm-upgrade.
...
llvm-svn: 49347
2008-04-07 18:32:47 +00:00
Duncan Sands
813384951e
Use Intrinsic::getDeclaration in more places.
...
llvm-svn: 49338
2008-04-07 13:45:04 +00:00
Bill Wendling
856d8f5b58
Remove tabs. Patch by Mike Stump!
...
llvm-svn: 49317
2008-04-07 05:47:52 +00:00
Gabor Greif
e9ecc68d8f
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Torok Edwin
538160b7ff
-fPIC is required on x86-64 when building shared objects.
...
llvm-svn: 49274
2008-04-06 12:42:29 +00:00
Devang Patel
124cce86fc
Reenable running StripSymbols when EH is on.
...
Dale fixed EH.
llvm-svn: 49192
2008-04-03 21:30:06 +00:00
Dale Johannesen
491557712a
Make EH work with unnamed functions. Reenable running
...
StripSymbols when EH is on.
llvm-svn: 49110
2008-04-02 20:10:52 +00:00
Chris Lattner
6f2ffdb73f
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Chris Lattner
e950eee303
stop building llvmc.
...
llvm-svn: 48964
2008-03-30 18:58:05 +00:00
Anton Korobeynikov
08bae57469
Honour another bunch of parameter attributes in llvm2cpp
...
llvm-svn: 48942
2008-03-29 11:25:49 +00:00
Anton Korobeynikov
a125be374e
Honour ByVal parameter attribute in llvm2cpp
...
llvm-svn: 48941
2008-03-29 11:15:01 +00:00
Mikhail Glushenkov
ea7cb37a5c
Another test commit (with git-svn)
...
llvm-svn: 48843
2008-03-26 21:37:43 +00:00
Mikhail Glushenkov
19e24df3a4
Test commit
...
llvm-svn: 48840
2008-03-26 21:18:58 +00:00
Anton Korobeynikov
4c1559f54e
Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
...
llvm-svn: 48786
2008-03-25 18:53:36 +00:00
Tanya Lattner
ca8eb5d0f5
Disable building llvm-upgrade.
...
llvm-svn: 48764
2008-03-25 05:05:58 +00:00
Andrew Lenharth
5e0067d982
With debug info, there are nameless constant global values. do not crash when we hit one
...
llvm-svn: 48749
2008-03-24 22:16:14 +00:00
Bill Wendling
1f5c2e7fc6
Small format/grammar changes.
...
llvm-svn: 48723
2008-03-24 05:58:47 +00:00
Bill Wendling
f52a379cb3
Grammar Nazi strikes! :-)
...
llvm-svn: 48722
2008-03-24 05:55:54 +00:00
Anton Korobeynikov
70548d835e
Add first proof-of-concept universal compiler driver framework based
...
on ideas mentioned in PR686.
Written by Mikhail Glushenkov and contributed by Codedgers, Inc.
Old llvmc will be removed soon after new one will have all its properties.
llvm-svn: 48699
2008-03-23 08:57:20 +00:00
Andrew Lenharth
0d537491e7
style and spelling
...
llvm-svn: 48562
2008-03-19 22:32:43 +00:00
Andrew Lenharth
4d93dc17b2
llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
...
llvm-svn: 48550
2008-03-19 20:49:51 +00:00
Chris Lattner
8a923e7c28
Reimplement the parameter attributes support, phase #1 . hilights:
...
1. There is now a "PAListPtr" class, which is a smart pointer around
the underlying uniqued parameter attribute list object, and manages
its refcount. It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
ParamAttrsWithIndex's, no need to make a SmallVector of a specific
size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
dereferencing the pointer is simplified to just access the
PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
bit simpler.
Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.
llvm-svn: 48289
2008-03-12 17:45:29 +00:00
Andrew Lenharth
fc42740952
only extract main if the user didn't specify anything to extract
...
llvm-svn: 48023
2008-03-07 20:10:54 +00:00
Andrew Lenharth
3906c6aea3
make error message reflect default search function name
...
llvm-svn: 48021
2008-03-07 20:07:24 +00:00
Andrew Lenharth
3f13b6630a
add a pass that can extract all kinds of global values, not just functions. Update llvm-extract to use it and optionally extract a global variable if you want it too
...
llvm-svn: 48015
2008-03-07 19:51:57 +00:00
Tanya Lattner
46be50c668
Renable lto2 build.
...
llvm-svn: 47845
2008-03-03 17:32:40 +00:00
Nick Kledzik
e8338e52ed
suppress extra -install_name on Tiger. The 10.4 tools don't support it. Fix whitespace.
...
llvm-svn: 47817
2008-03-02 06:33:06 +00:00
Nick Lewycky
3cc9be0b59
Add an unwind_to field to basic blocks, making them Users instead of Values.
...
This is the first checkin for PR1269, the new EH infrastructure.
llvm-svn: 47802
2008-03-02 02:48:09 +00:00
Nick Lewycky
36c00f834a
Also handle "getresult".
...
llvm-svn: 47797
2008-03-01 21:47:06 +00:00
Tanya Lattner
bb20900184
Disable lto because its broken on tiger.
...
llvm-svn: 47783
2008-03-01 07:36:30 +00:00
Nick Kledzik
d5a2f4aee5
stop building lto on all platforms. Start building lto2 on Darwin
...
llvm-svn: 47762
2008-02-29 19:31:29 +00:00
Nick Kledzik
a28acfee92
also pass -compatibility_version when linking shared object for Darwin
...
llvm-svn: 47747
2008-02-29 02:01:34 +00:00
Andrew Lenharth
09b64a4ed1
Make llvm-ar behave like ar, if you create an empty archive, ar creates an empty archive. llvm-ar would not generate an output file in this case
...
llvm-svn: 47733
2008-02-28 22:24:48 +00:00
Nick Kledzik
91a6dcff32
fixes from review of first commit
...
llvm-svn: 47695
2008-02-27 22:25:36 +00:00
Nick Kledzik
5f1db0a8de
use PROJ_SRC_DIR so this builds with Apple style builds
...
llvm-svn: 47694
2008-02-27 22:23:46 +00:00
Nick Kledzik
07b4a62234
first commit of new LTO system. It is not hooked up in the llvm/tools/Makefile, so no one will build it be default yet
...
llvm-svn: 47621
2008-02-26 20:26:43 +00:00
Bill Wendling
8ff4320071
Detabify.
...
llvm-svn: 47596
2008-02-26 10:46:10 +00:00
Dale Johannesen
09f410b6d7
Split ParameterAttributes.h, putting the complicated
...
stuff into ParamAttrsList.h. Per feedback from
ParamAttrs changes.
llvm-svn: 47504
2008-02-22 22:17:59 +00:00
Devang Patel
c6f915e40d
Add -disable-output option.
...
llvm-svn: 47422
2008-02-21 01:41:25 +00:00
Anton Korobeynikov
ea333124f1
Get rid of hash_map in llvmc
...
llvm-svn: 47374
2008-02-20 11:28:26 +00:00
Anton Korobeynikov
bddf51bc9b
And final pack of warnings silencing
...
llvm-svn: 47372
2008-02-20 11:27:04 +00:00
Anton Korobeynikov
579f07135a
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Dale Johannesen
89268bc6e2
Expand ParameterAttributes to 32 bits (in preparation
...
for adding alignment info, not there yet). Clean up
interfaces to reference ParameterAttributes consistently.
llvm-svn: 47342
2008-02-19 21:38:47 +00:00
Dan Gohman
02d2bc8d3e
Fix a missing space in the description of the find-bugs option.
...
llvm-svn: 47271
2008-02-18 17:15:45 +00:00
Nick Lewycky
8102d473ce
PR2027, Fix bugpoint's -find-bugs option, clean up the code.
...
llvm-svn: 47105
2008-02-14 05:01:46 +00:00
Devang Patel
eef348687e
Begin setting features for target based on target triple string.
...
llvm-svn: 46863
2008-02-07 22:32:50 +00:00
Devang Patel
623df7620d
Do not set time out, lets assume assembler will do its job in reasonable amount of time.
...
llvm-svn: 46718
2008-02-04 21:16:10 +00:00
Devang Patel
1a06334403
Do not strip symbols when EH is ON.
...
llvm-svn: 46657
2008-02-02 01:32:38 +00:00
Devang Patel
540d03bda9
Supply appropriate arch info to darwin assembler.
...
llvm-svn: 46567
2008-01-30 19:19:31 +00:00
Devang Patel
b432c9e866
Enable exception handling if it is supported.
...
llvm-svn: 46560
2008-01-30 17:43:03 +00:00
Chris Lattner
d329270854
Add support for frameworks. Patch by Shantonu Sen!
...
llvm-svn: 46421
2008-01-27 22:58:59 +00:00
Devang Patel
41f375a45c
- Introduces versioning macro LLVM_LTO_VERSION
...
- Communicate symbol visibility
- Communicate code generation model
llvm-svn: 46033
2008-01-15 23:52:34 +00:00
Chris Lattner
7ff4a8bf3f
Fix llvm-ld -Xlinker, patch by Daniel Teske!
...
llvm-svn: 45770
2008-01-09 01:01:17 +00:00
Chris Lattner
97879424fe
Fix PR1797
...
llvm-svn: 45736
2008-01-08 04:26:20 +00:00
Chris Lattner
6787a45a65
remove attribution from a variety of miscellaneous files.
...
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Chris Lattner
f87b59d683
regenerate
...
llvm-svn: 45424
2007-12-29 20:47:37 +00:00
Chris Lattner
cb1e357a1c
remove attributions
...
llvm-svn: 45423
2007-12-29 20:46:15 +00:00
Chris Lattner
345353d6b4
remove attributions from tools.
...
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner
8fa21acd25
remove attributions from tools/utils makefiles.
...
llvm-svn: 45414
2007-12-29 20:07:17 +00:00