Commit Graph

2148 Commits

Author SHA1 Message Date
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
Gordon Henriksen 520e64c0c2 Fixing several transforms which would drop the collector attribute
when copying functions.

llvm-svn: 45356
2007-12-25 22:16:06 +00:00
Seo Sanghyeon d42a60baa0 Actually parse q operation in llvm-ar
llvm-svn: 45353
2007-12-25 13:53:47 +00:00
Devang Patel c006744c38 Revert my previous check-in.
llvm-svn: 45249
2007-12-20 01:46:01 +00:00
Devang Patel 6d279d484a Add lto version check mechanism.
llvm-svn: 45238
2007-12-20 00:24:01 +00:00
Christopher Lamb 083bb46370 regenerate.
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb edf0788758 Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Christopher Lamb 54dd24c2a7 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Chris Lattner ad6094ddd3 Fix accidental commit by Bill.
llvm-svn: 44729
2007-12-09 00:27:38 +00:00
Bill Wendling 3f19dfe794 Reverting 44702. It wasn't correct to rename them.
llvm-svn: 44727
2007-12-08 23:58:46 +00:00
Duncan Sands 38ef3a8ec7 Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Duncan Sands b41f872013 Add a convenience method for modifying parameter
attributes.  While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.

llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Duncan Sands 5208d1ab4a Add some convenience methods for querying attributes, and
use them.

llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Ted Kremenek c6298de211 Added quotes around $(NM_PATH) argument to GenLibDeps.pl script so that
the "-p" option is actually seen by nm (it was being dropped as it was
considered as separate argument to the Perl script).

llvm-svn: 44365
2007-11-27 17:53:54 +00:00
Duncan Sands ad0ea2d430 Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Nick Lewycky c6243020a6 Allow the block extractor take to take a list of basic blocks to not extract
from a file containing Function/BasicBlock pairings. This is not safe against
anonymous or abnormally-named Funcs or BBs.

Make bugpoint use this interface to pass the BBs list to the child bugpoint.

llvm-svn: 44101
2007-11-14 06:47:06 +00:00
Chris Lattner 07328f0b8b Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.
llvm-svn: 44051
2007-11-13 18:22:33 +00:00
Gordon Henriksen 2ed067a0d9 Deleting redundant copy of block extractor pass. See also PR1775.
llvm-svn: 43694
2007-11-05 01:54:05 +00:00
Chris Lattner 4c9ec1aaa2 Fix PR1739.
llvm-svn: 43286
2007-10-24 04:35:54 +00:00
Chris Lattner fee916334a add a 'don't use me' marker.
llvm-svn: 43226
2007-10-22 19:41:46 +00:00
Gordon Henriksen ef5d08f4ea Switching TargetMachineRegistry to use the new generic Registry.
llvm-svn: 43094
2007-10-17 21:28:48 +00:00
Dan Gohman a8656d4798 Fix a typo in a comment.
llvm-svn: 43016
2007-10-15 21:10:03 +00:00
Dan Gohman 2c6a821fd7 Move the space in overview output for commands out of each of the
commands and into the common code.

llvm-svn: 42752
2007-10-08 15:45:12 +00:00
Dale Johannesen 6bf69ed3cc minor long double related changes
llvm-svn: 42439
2007-09-28 18:06:58 +00:00
Dale Johannesen 028084efe5 Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.

llvm-svn: 41875
2007-09-12 03:30:33 +00:00
Dale Johannesen 245dceb06d Add APInt interfaces to APFloat (allows directly
access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).

llvm-svn: 41858
2007-09-11 18:32:33 +00:00
Owen Anderson 4266bb73e8 Turn GVN on by default.
llvm-svn: 41787
2007-09-08 22:23:52 +00:00
Dale Johannesen 9e70086c8f Apply feedback from previous patch.
llvm-svn: 41774
2007-09-07 21:07:57 +00:00
Dale Johannesen bed9dc423c Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)

llvm-svn: 41747
2007-09-06 18:13:44 +00:00
Devang Patel 42e2abe0e8 Enable loop index split pass.
llvm-svn: 41714
2007-09-04 20:46:58 +00:00
David Greene 85948d7474 Update generated files.
llvm-svn: 41706
2007-09-04 18:46:50 +00:00
David Greene 9bf8760a52 Revert this because the interface hasn't been updated yet.
llvm-svn: 41703
2007-09-04 17:15:07 +00:00
David Greene 4f4dc729d4 Fix typo.
llvm-svn: 41702
2007-09-04 17:00:44 +00:00
David Greene c656cbb8c2 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

llvm-svn: 41697
2007-09-04 15:46:09 +00:00
David Greene 703623d571 Update InvokeInst to work like CallInst
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
David Greene 87e2554df4 Update .cvs file
llvm-svn: 41106
2007-08-15 17:58:51 +00:00
Reid Spencer 7c38b0dc15 Don't build llvm-stub twice.
llvm-svn: 41039
2007-08-13 00:25:47 +00:00
Reid Spencer fd46badca5 Separate program name from error message with a :
llvm-svn: 40945
2007-08-08 21:19:01 +00:00
Reid Spencer f054db3242 Terminate an error message with a newline.
llvm-svn: 40943
2007-08-08 21:17:59 +00:00
David Greene c600d65e2b Make this code more efficient
llvm-svn: 40899
2007-08-07 16:57:55 +00:00
Chandler Carruth 450f95c857 Regenerating.
llvm-svn: 40808
2007-08-04 01:56:21 +00:00
Chandler Carruth 7132e00de7 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Reid Spencer e621b07e5e Adjust for new CallInst constructor interface.
This fixes test/Feature/llvm2cpp.ll

llvm-svn: 40714
2007-08-02 03:30:26 +00:00
Owen Anderson 10e52eddb3 Rename FastDSE to just DSE.
llvm-svn: 40668
2007-08-01 06:36:51 +00:00
David Greene c8e6508572 Update generated files.
llvm-svn: 40663
2007-08-01 03:59:32 +00:00
David Greene 17a5dfe6f7 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.

llvm-svn: 40660
2007-08-01 03:43:44 +00:00
Dan Gohman 070a3f94a2 Remove a FIXME comment that wasn't removed when the code it accompanied
was removed.

llvm-svn: 40591
2007-07-30 15:01:09 +00:00
Reid Spencer ec5058eb96 Remove dead option.
llvm-svn: 40415
2007-07-23 04:23:32 +00:00
Reid Spencer c49a5b9952 Fix a sys::Path API error caught by a gcc 4.2 warning.
llvm-svn: 39995
2007-07-18 05:27:33 +00:00
Owen Anderson a603a80607 Turn on FastDSE by default.
Note: FastDSE now equals or exceeds the results of old DSE on all of SPEC2000 and SPEC2006. Unless major problems
show up in the testers, it will likely completely replace old DSE in the near future.

llvm-svn: 39986
2007-07-17 21:59:21 +00:00
Evan Cheng bd9b21f1c5 Change sroa threshold back.
llvm-svn: 39980
2007-07-17 20:07:21 +00:00
Evan Cheng 20b76421ed Temporarily set SROA threshold to 512.
llvm-svn: 39950
2007-07-17 01:52:05 +00:00
Anton Korobeynikov d9625399fb Emit correct linkage. Patch by Roman Samoilov.
llvm-svn: 39751
2007-07-11 19:51:06 +00:00
Reid Spencer 0818f7dbf9 Simplify the handling of the --*flags options. The makefile already gets it
right so there is no need to duplicate logic, just use the values the makefile
provides. 

Eliminate some redundnt -D options from the output.

Fix the help output so it fits on 80 cols.

llvm-svn: 38488
2007-07-10 07:48:09 +00:00
Reid Spencer 1da59dd6dd Makesure the -cppflags also uses the CPP.BaseFlags as the CPP.Defines only
contains some of the defines but not all CPP flags.

llvm-svn: 38487
2007-07-10 07:21:34 +00:00
Gabor Greif 24027b584f finishing touches of bytecode -> bitcode changes. also unbreak Windows
llvm-svn: 37950
2007-07-06 20:28:40 +00:00
Gabor Greif 3d3fc3296e eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.

llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Chris Lattner 622178dfc1 update the .cvs files.
llvm-svn: 37919
2007-07-05 17:27:31 +00:00
Gabor Greif e16561cd5d Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.

llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Devang Patel f5a15dd9da Fix PR1539. Add LoopPassPrinter.
llvm-svn: 37909
2007-07-05 15:32:03 +00:00
Gabor Greif 0e535c3c8e Pretty straightforward replacement of "bytecode" by "bitcode"
performed on tools/ first, in order not to cause lethal damage

llvm-svn: 37877
2007-07-04 21:55:50 +00:00
John Criswell 2660cef6d7 Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Devang Patel 9a259a20b3 Fix PR 1526.
llvm-svn: 37780
2007-06-28 23:09:25 +00:00
David Greene cbc8ddf81a Add support for building with _GLIBCXX_DEBUG. New configure option
--enable-expensive-checks allows the developer to enable runtime
checking that can greatly increase compile time.  Currently it only
turns on _GLIBCXX_DEBUG.  Other expensive debugging checks added later
should be controlled by this configure option.

This patch also updates llvm-config with a --cppflags option to inform
llvm-gcc how to build itself so that it is compatible with an llvm that
was built with _GLIBCXX_DEBUG.

llvm-svn: 37777
2007-06-28 19:36:08 +00:00
Lauro Ramos Venancio ed95f7fcb3 llvm-nm must print the alias symbols.
llvm-svn: 37766
2007-06-27 22:08:09 +00:00
Reid Spencer 36d4c07500 Fix PR1525:
Use a better determinator for identifying constant array initializers that
are or are not zero terminated and generate code appropriately.

llvm-svn: 37720
2007-06-25 16:45:54 +00:00
Chris Lattner cd74c3ea7c Fix pr1448
llvm-svn: 37658
2007-06-19 16:46:48 +00:00
Reid Spencer 1aae9e8e12 Fix PR1517:
Use SmallPtrSet instead of std::vector to eliminate duplicate uses in a
function generated with -gen-function. This prevents the output from having
multiple duplicate declarations of constants and gvals.

llvm-svn: 37616
2007-06-16 20:48:27 +00:00
Reid Spencer 83c15f8a1b Fix PR1516:
When printing the uses of a function (-gen-function only), make sure to
include the constants referenced by intializers of global variables.

llvm-svn: 37615
2007-06-16 20:33:24 +00:00
Nick Lewycky 7aa84fe7c5 Call the correct function name. Patch from Stephane Letz.
llvm-svn: 37614
2007-06-16 16:17:35 +00:00
Lauro Ramos Venancio f04823af30 Fix bugpoint to run -llc-safe with -Xlinker.
llvm-svn: 37483
2007-06-06 23:10:56 +00:00
Chris Lattner e7a1a4c889 if internalize is disabled, don't run the pass at all!
llvm-svn: 37477
2007-06-06 20:51:14 +00:00
Zhou Sheng 2444a9adeb Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.

llvm-svn: 37432
2007-06-05 05:28:26 +00:00
Reid Spencer ac1c2d93f1 Regenerate.
llvm-svn: 37207
2007-05-18 05:48:07 +00:00
Reid Spencer c32d55e17c Initialize variable to null so it has a value in the off chance that a
memory buffer couldn't be allocated.

llvm-svn: 36904
2007-05-07 18:50:07 +00:00
Chris Lattner 9e9a34c6bf use the new MemoryBuffer interfaces to simplify error reporting in clients.
llvm-svn: 36900
2007-05-06 23:45:49 +00:00
Chris Lattner 05be1d44da remove dead option
llvm-svn: 36898
2007-05-06 23:24:42 +00:00
Chris Lattner 69a1f813a2 Fix a buggy conversion from bytecode to bitcode
llvm-svn: 36883
2007-05-06 19:43:09 +00:00
Chris Lattner 9b4a428978 make sure the ofstream for opt's output file is destroyed, so that the bits
actually land on disk.

llvm-svn: 36877
2007-05-06 19:17:23 +00:00
Chris Lattner f5599efb00 switch tools to bitcode from bytecode
llvm-svn: 36872
2007-05-06 09:32:02 +00:00
Chris Lattner 6d80e21a1d switch tools to bitcode instead of bytecode
llvm-svn: 36868
2007-05-06 09:29:57 +00:00
Chris Lattner 8279f7e3c2 this doesn't directly depend on bytecode
llvm-svn: 36854
2007-05-06 05:58:00 +00:00
Chris Lattner e542042f8d add bitcode support.
llvm-svn: 36853
2007-05-06 05:56:58 +00:00
Chris Lattner b52f3aac73 archive library already depends on bc reader
llvm-svn: 36852
2007-05-06 05:53:02 +00:00
Chris Lattner e74845f075 add bitcode support, optimize reading to not read all function bodies just
to get deplibs

llvm-svn: 36851
2007-05-06 05:51:37 +00:00
Chris Lattner 957d090ed1 use an auto_ptr to avoid an explicit delete
llvm-svn: 36850
2007-05-06 05:47:36 +00:00
Chris Lattner f6dd4d7fca add bitcode support
llvm-svn: 36849
2007-05-06 05:47:06 +00:00
Chris Lattner adc9e30a72 Remove the -emit-bytecode option. Noone in the llvm tree uses it, and this
keeps llvm-upgrade a simple "source to source" tool.

llvm-svn: 36848
2007-05-06 05:40:41 +00:00
Chris Lattner ef8f389e08 add bitcode reading support to llvm-nm
llvm-svn: 36847
2007-05-06 05:36:18 +00:00
Chris Lattner 99016c3f2d bitcodify, remove eh cruft
llvm-svn: 36844
2007-05-06 05:21:42 +00:00
Chris Lattner cdda3a4ae5 debugger depends on bcreader, not llvm-db
llvm-svn: 36842
2007-05-06 05:18:37 +00:00
Chris Lattner 27936994bd remove EH cruft, add bitcode support
llvm-svn: 36841
2007-05-06 05:13:17 +00:00
Chris Lattner 2785bdbefd add bitcode reading support, remove eh stuff
llvm-svn: 36840
2007-05-06 04:58:26 +00:00
Chris Lattner 6dd290ad3d add bitcode reading support. Remove EH cruft.
llvm-svn: 36839
2007-05-06 04:55:19 +00:00
Chris Lattner 6147489a09 bitcodify
llvm-svn: 36838
2007-05-06 04:49:55 +00:00
Chris Lattner f693167d68 simplify code
llvm-svn: 36837
2007-05-06 04:43:36 +00:00
Chris Lattner c424ba7ebd add support to llvm-prof for reading from a bitcode file
llvm-svn: 36836
2007-05-06 04:43:00 +00:00
Chris Lattner 0f49a6fe89 if -bitcode is specified, read and write a bitcode file instead of a bytecode file.
llvm-svn: 36830
2007-05-06 02:42:03 +00:00
Chris Lattner 19f599471c add inline asm code
llvm-svn: 36826
2007-05-06 01:50:11 +00:00
Chris Lattner f25f710c4d add a denser encoding for null terminated strings, add a 6-bit abbrev as
well.  This shrinks kc++ from 2724088 to 2717360 bytes.

llvm-svn: 36821
2007-05-06 00:53:07 +00:00
Chris Lattner 4a7ac9fd70 emit spiffy little histograms of codes, if enabled. Don't print averages if
there is only one item.

llvm-svn: 36773
2007-05-05 01:46:49 +00:00
Chris Lattner 9e808cd330 do not charge subblock sizes to the parent block.
llvm-svn: 36772
2007-05-05 01:29:31 +00:00
Chris Lattner 9181ddf91d update to new APIs, make output a bit (haha) nicer
llvm-svn: 36768
2007-05-05 00:17:42 +00:00
Chris Lattner 0b7c5121f7 add support for new codes/block
llvm-svn: 36726
2007-05-04 03:01:41 +00:00
Evan Cheng 779b52e4c4 Added -rsh-host and -rsh-user to support remote execution.
llvm-svn: 36685
2007-05-03 18:36:15 +00:00
Devang Patel 8c78a0bff0 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel e95c6ad802 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel 09f162ca6a Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Chris Lattner 5fab65dbbf add phi
llvm-svn: 36611
2007-05-01 02:43:46 +00:00
Reid Spencer 986b9df04e Augment the verbose output to print out the sub-commands executed.
llvm-svn: 36581
2007-04-29 23:59:47 +00:00
Chris Lattner 3543caacd3 Implement much expanded dumper support. We now print stuff like:
<MODULE_BLOCK NumWords=27 BlockCodeSize=3>
  <TYPE_BLOCK NumWords=7 BlockCodeSize=4>
    <NUMENTRY op0=7>
    <POINTER op0=1>
    <FUNCTION op0=0 op1=2 op2=2 op3=2 op4=2>
    <VECTOR op0=2 op1=3>
    <INTEGER op0=64>
    <VECTOR op0=8 op1=5>
    <INTEGER op0=16>
    <VOID>
...

With work, the operands can be pretty printed symbolically.

llvm-svn: 36579
2007-04-29 21:48:19 +00:00
Chris Lattner 1684cee5a2 add some simple per-block statistics
llvm-svn: 36576
2007-04-29 20:00:02 +00:00
Chris Lattner ca0ea543f5 Implement support to read an arbitrary bitcode file. Next up, dumping the
file symbolically and actually computing statistics.

llvm-svn: 36557
2007-04-29 08:31:14 +00:00
Chris Lattner 0399758b5f very early support for analyzing a bitstream. This opens the file, starts
reading the stream, and detects whether it is LLVM IR or not.

llvm-svn: 36556
2007-04-29 08:12:22 +00:00
Chris Lattner 6694f60bec Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
anything about disk I/O itself.  This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.

This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode.  Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.

I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.

llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Chris Lattner cc18989c14 fit in 80 cols
llvm-svn: 36551
2007-04-29 05:51:00 +00:00
Chris Lattner 4c522b9434 reset errno to zero on entry to the application's main function. This fixes
MultiSource/Applications/minisat in the JIT.

Note that the libsystem stuff should ideally never modify errno.  :(

llvm-svn: 36508
2007-04-27 17:02:33 +00:00
Jeff Cohen bb693dcfb1 Add new option to usage help.
llvm-svn: 36347
2007-04-22 18:33:20 +00:00
Chris Lattner 8ca41bfb57 don't break reading from stdin
llvm-svn: 36336
2007-04-22 06:35:20 +00:00
Chris Lattner 69892b79ce link in bitwriter library
llvm-svn: 36335
2007-04-22 06:31:35 +00:00
Chris Lattner e224446728 teach llvm-dis to read bitcode files
llvm-svn: 36334
2007-04-22 06:31:02 +00:00
Chris Lattner 52e1f0f297 add a temporary -bitcode option, which instructs llvm-as to produce a bitcode file instead of a bytecode file
llvm-svn: 36333
2007-04-22 06:28:58 +00:00
Reid Spencer 4388f0b4fa For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Reid Spencer d1c1ed1cb9 Add the --host-target option.
llvm-svn: 36326
2007-04-22 05:05:36 +00:00
Chris Lattner 8cc95f24a7 remove cruft
llvm-svn: 36268
2007-04-20 04:45:58 +00:00
Reid Spencer 52e4e91284 Regenerate.
llvm-svn: 36106
2007-04-16 03:05:01 +00:00
Reid Spencer 78dffdc5d1 For PR1336:
Functions without names deserve to be created too. This fixes:
test/CodeGen/Generic/vector-constantexpr.ll

llvm-svn: 36105
2007-04-16 03:04:13 +00:00
Reid Spencer 3da4004c34 For PR1336:
When upgrading global vars, look for conflicts with functions as well. This
fixes test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll

llvm-svn: 36103
2007-04-16 02:56:33 +00:00
Reid Spencer 4f7e511a8e Regenerate.
llvm-svn: 36096
2007-04-16 00:40:57 +00:00
Reid Spencer 19a0ff01f9 For PR1336:
Rewrite the upgrade of GEP indices to be a little less obtuse. This fixes
test/Assembler/2002-08-19-BytecodeReader.llx
test/Assembler/2003-08-21-ConstantExprCast-Fold.llx
test/Assembler/2004-01-11-getelementptrfolding.llx

llvm-svn: 36095
2007-04-16 00:39:39 +00:00
Reid Spencer 5899dd1dc3 Make the generated code for ConstantInt nicer.
llvm-svn: 35902
2007-04-11 13:02:56 +00:00
Reid Spencer 56ea4e8ad3 Teach llvm2cpp about packed structure types.
llvm-svn: 35899
2007-04-11 12:41:49 +00:00
Reid Spencer ff6e0eda94 Fix several bugs relating to changes in the LLVM IR API or just outright
typos in the output. This is sufficient to get most of the llvm2cpp tests
working again.

llvm-svn: 35898
2007-04-11 12:28:56 +00:00
Reid Spencer d73f84ed7b Regenerate.
llvm-svn: 35897
2007-04-11 12:10:58 +00:00
Reid Spencer 2844b0a225 Fix a crash-by-unknown-exception caused by attempting to use a null pointer
as the key for a map insertion.

llvm-svn: 35896
2007-04-11 12:10:08 +00:00
Reid Spencer 77df76a3f5 Fix some issues with param attrs.
llvm-svn: 35894
2007-04-11 10:01:32 +00:00
Reid Spencer 3318579108 Add support for parameter attributes.
llvm-svn: 35893
2007-04-11 09:54:08 +00:00
Reid Spencer a472f66dd0 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.

llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Devang Patel ada3ca2234 Enable loop rotate pass.
llvm-svn: 35863
2007-04-10 15:43:36 +00:00
Reid Spencer f51a7050dd Regenerate
llvm-svn: 35813
2007-04-09 06:16:21 +00:00
Reid Spencer 4d4d3f9682 For PR1146:
Adapt handling of parameter attributes to use ParamAttrsList class.

llvm-svn: 35812
2007-04-09 06:15:59 +00:00
Reid Spencer 69e6062f31 Make TempDir a PathWithStatus so we don't have to cast it to one.
llvm-svn: 35772
2007-04-08 20:08:01 +00:00
Reid Spencer 5fb6ee9d6b Avoid temporary construction and potential for corrupted data access.
llvm-svn: 35771
2007-04-08 20:06:05 +00:00
Reid Spencer f20eacbc78 Don't rely on destructed local storage. Thanks, Chris.
llvm-svn: 35769
2007-04-08 19:59:07 +00:00
Reid Spencer 21b76a9b99 For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.

llvm-svn: 35743
2007-04-07 18:53:16 +00:00
Reid Spencer 25603318ff Regenerate.
llvm-svn: 35736
2007-04-07 16:14:01 +00:00
Reid Spencer 33766f8eba For PR1312:
For the short CALL/INVOKE syntax, the signedness of the result type is two
extractions away from the type argument because its a POINTER to function
type, not a function type.

llvm-svn: 35735
2007-04-07 16:10:37 +00:00
Chris Lattner c7de6e0a75 run a late dce pass to clean up extra cruft.
llvm-svn: 35684
2007-04-05 16:50:20 +00:00
Reid Spencer d7799fd17d For PR1302:
Rename LinkItems as NativeLinkItems since it is filled out by the Linker
library to contain only those items deemed to be native.

llvm-svn: 35654
2007-04-04 06:34:22 +00:00
Reid Spencer 69e56c3461 Regenerate
llvm-svn: 35579
2007-04-02 02:08:35 +00:00
Reid Spencer 940fccb088 Upgrade the bit count intrinsics to have an i32 result.
llvm-svn: 35578
2007-04-02 02:08:05 +00:00
Reid Spencer 1bd88bdab3 Regenerate
llvm-svn: 35571
2007-04-02 01:14:00 +00:00
Reid Spencer 86207ee54d Don't upgrade functions that look like a bswap intrinsic but aren't.
llvm-svn: 35570
2007-04-02 01:13:36 +00:00
Reid Spencer ef592214e2 Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming
rules for overloaded intrinsic functions.

llvm-svn: 35565
2007-04-02 00:50:28 +00:00
Reid Spencer d232f311cb Remove some non-sensical logic that prevented llvm-nm from working on any
file other than one named "-".

llvm-svn: 35478
2007-03-29 19:49:07 +00:00
Reid Spencer 200c6f9c3d For PR789:
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.

llvm-svn: 35476
2007-03-29 19:05:44 +00:00
Jeff Cohen 54a781be7d getFileStatus has a new parameter (caught by VC++).
llvm-svn: 35466
2007-03-29 17:29:59 +00:00
Jeff Cohen d578f1f87f Fix problem with llvm-config that prevented JIT from being used on x86_64
systems.

llvm-svn: 35416
2007-03-28 04:45:02 +00:00
Reid Spencer f3200ef9ac For PR1277:
Implement error handling for bytecode parsing.

Patch by Scott Michel.

llvm-svn: 35364
2007-03-26 22:38:01 +00:00
Evan Cheng 085b8d7ae2 Unbreak non-debug builds.
llvm-svn: 35264
2007-03-22 07:43:51 +00:00
Reid Spencer 2f8fa50bb3 Regenerate.
llvm-svn: 35237
2007-03-21 17:27:53 +00:00
Reid Spencer 20337a5e76 For PR1243:
Okay, really fix it this time. Make sure the CurFun.Linkage is set early
and consolidate some duplicate code.

llvm-svn: 35236
2007-03-21 17:26:41 +00:00
Reid Spencer 77e0bba30c Regenerate.
llvm-svn: 35235
2007-03-21 17:15:50 +00:00
Reid Spencer 6ae04faffb For PR1256:
Make Signedness information pervasive throughout all types and values.
There is no easy way to get around this. Because the GEP instruction can
index through an arbitrarily complex value structure, it is necessary to
keep track of signedness information throughout that structure. This change
makes Signedness a full class, capable of representing Signedness in
arbitrarily shaped types. The class is then used throughout llvm-upgrade to
track signedness and differentiate between globals, locals, and functions
based on their signedness.

For PR1243:
This patch also removes bogus warnings about renaming internal globals. It
now only emits such warnings when renaming non-internal globals because
they may affect linkage.

llvm-svn: 35234
2007-03-21 17:14:36 +00:00
Reid Spencer 17e9e8b9af Regenerate.
llvm-svn: 35116
2007-03-15 03:26:42 +00:00
Reid Spencer 74d4d172bd Revert last changes as they introduced other problems.
llvm-svn: 35115
2007-03-15 03:25:34 +00:00
Reid Spencer 2ece31b4ce Regenerate.
llvm-svn: 35113
2007-03-14 23:13:06 +00:00
Reid Spencer c2dd8280e2 The sign information was not propagating into the rename map so only the
last entry stored in the map could be retrieved for a given integer type.
Propagating the sign information required an invasive change to ensure that
all ValueRef (ValID) instances get the right sign information as well. Also,
put in some assertions to ensure the RenameMap always gives us out the type
that is expected.

This fixes PR1256 and
test/Assembler/2007-03-14-UgpradeLocalSignless.ll

llvm-svn: 35112
2007-03-14 23:11:45 +00:00
Reid Spencer 4040130a86 For PR1256:
Carry sign with ValID and make TypeInfo sortable (useful in a map).

llvm-svn: 35111
2007-03-14 23:08:04 +00:00
Jeff Cohen eb9dccf63d Make older versions of bison happy.
llvm-svn: 35099
2007-03-14 15:27:17 +00:00
Devang Patel 69730c96db Now LICM is a LoopPass.
llvm-svn: 35001
2007-03-07 04:41:30 +00:00
Devang Patel 901a27d892 Now LoopUnswitch is a LoopPass.
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Reid Spencer fe5550b2cf Obtain the exit function before execution just in case the module
disappears before we get to calling the exit function.

llvm-svn: 34953
2007-03-06 03:12:55 +00:00
Jeff Cohen b622c11f77 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Reid Spencer e586f2e7f7 1. Handle errors around the ModuleProvider. This is necessary since it is
reading bytecode.
2. The interpreter can delete the ModuleProvider and replace it with
   another so don't depend on it being around after the EE is created.
3. Don't just run llvm_shutdown on exit but actually delete the EE as well.
   This cleans up a vast amount of memory (but not all) that EE retained
   through exit.

llvm-svn: 34888
2007-03-03 18:21:44 +00:00
Reid Spencer 07761199e0 Make output for ConstantInt construction correct for any bitwidth.
llvm-svn: 34809
2007-03-01 20:55:43 +00:00
Chris Lattner 86e36db1bf remove use of deprecated apis
llvm-svn: 34418
2007-02-19 07:41:31 +00:00
Chris Lattner 80b65db862 remove use of deprecated api
llvm-svn: 34416
2007-02-19 07:34:02 +00:00
Anton Korobeynikov d01defedf6 Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Reid Spencer e1d2bcf8ce Add missing break statements!
llvm-svn: 34341
2007-02-16 06:34:39 +00:00
Reid Spencer 09575bac2e For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer d84d35ba70 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner 55fa988d25 eliminate use of vector-related ctors
llvm-svn: 34226
2007-02-13 06:05:43 +00:00
Chris Lattner cb4b07b0b3 regenerate
llvm-svn: 34225
2007-02-13 06:04:17 +00:00
Chris Lattner d37c5ee316 remove use of vector-related ctors
llvm-svn: 34224
2007-02-13 06:03:48 +00:00
Chris Lattner 9788ec53af stop using me thods that take a vector
llvm-svn: 34206
2007-02-12 22:58:38 +00:00
Lauro Ramos Venancio 15f463c291 Fix build error on ARM.
Since CompilerDriver.cpp revision 1.44, llvmc must be linked against LLVMCore.a (llvm::Module::~Module) and LLVMBCReader.a
(llvm::getBytecodeModuleProvider).

llvm-svn: 34196
2007-02-12 18:31:46 +00:00
Chris Lattner ac26f3853a regenerate
llvm-svn: 34188
2007-02-11 21:40:10 +00:00
Chris Lattner 988278c3c3 add #include
llvm-svn: 34187
2007-02-11 21:39:35 +00:00
Reid Spencer bc73875898 Align make log output with the rest of llvm.
llvm-svn: 34150
2007-02-10 15:14:00 +00:00
Reid Spencer 82f223475d Get the use of \ right.
llvm-svn: 34100
2007-02-09 17:18:42 +00:00
Reid Spencer 49785b92f0 Now that gccas and gccld are just schell scripts, adjust the build ordering
for parallel builds so that we space out the large links.

llvm-svn: 34098
2007-02-09 17:02:07 +00:00
Reid Spencer ba09f90ddc End of life for gccld. Remove its source code and enable the generation
of a shell script to stand in its place. The shell script just pawns the
execution off to llvm-ld.

llvm-svn: 34090
2007-02-09 15:21:02 +00:00
Reid Spencer a7bbb0ed70 Write the deprecation message to stderr instead of stdout so that it
doesn't get mingled with the output bytecode.

llvm-svn: 34089
2007-02-09 15:16:59 +00:00
Reid Spencer 2193b85ab0 Write the deprecation message to stderr instead of stdout so that it
doesn't get mingled with the output bytecode.

llvm-svn: 34087
2007-02-09 15:10:26 +00:00
Reid Spencer 690a9f105f Put in a disabled template for when gccld is replaced by the shell script.
llvm-svn: 34076
2007-02-09 03:15:18 +00:00
Reid Spencer 7eca5e3d19 Get the right warning message.
llvm-svn: 34075
2007-02-09 03:12:21 +00:00
Reid Spencer 6c302d8403 New shell script to replace gccld, eventually.
llvm-svn: 34074
2007-02-09 03:09:26 +00:00
Reid Spencer 1ed974aded Clean up error handling.
llvm-svn: 34073
2007-02-09 03:08:06 +00:00
Reid Spencer 5d211e24d9 For PR1153:
Copy a couple more missing options from gccld to llvm-ld.

llvm-svn: 34061
2007-02-08 19:03:11 +00:00
Reid Spencer 55717ece1e For PR1153:
Make llvm-ld more gccld-like by having it run the same set of passes. The
delta was probably due to lack of llvm-ld being maintained. Just another
reason to have only one optimizing linker in in LLVM.

llvm-svn: 34058
2007-02-08 18:13:59 +00:00
Reid Spencer f79d0c2ad8 Regenerate.
llvm-svn: 34050
2007-02-08 09:08:52 +00:00
Reid Spencer f43749d144 Rename a field so there's less confusion between fields of the same name.
llvm-svn: 34049
2007-02-08 09:08:23 +00:00
Reid Spencer 91a76a443f For PR1187:
Rename function scope names that conflict with basic block names.

llvm-svn: 34048
2007-02-08 09:07:25 +00:00
Reid Spencer 47b6d12ef1 For PR1187:
Always rename, never give a redef error. We could check for collapsed type
planes and generate an error if that's not the cause, but the 99.9999
percentile case will be that its the result of collapsed type planes. So,
rather than doing an expensive check, just rename.

llvm-svn: 34047
2007-02-08 08:47:38 +00:00
Reid Spencer c10e463ea7 For PR1187:
Some changes to get the smbd.ll test case working:
1. Move the logic for CSRETCC->sret attribute out of the ResolveDefinitions
   code and into getExistingValue. This resolves it much earlier and works
   in function scope as well.
2. Fix handling of CSRETCC->sret for the store instruction.
3. Rewrite the code for handling renaming to factor in linkage types.
4. Rename a structure filed for a PATypeInfo* so it doesn't get confused
   with a field for a Type*.

llvm-svn: 34043
2007-02-08 08:09:36 +00:00
Bill Wendling 1fef06db82 Avoid assert() in lto. Let linker handle all failures. Use LTO_WRITE_FAILURE
instead of LTO_UNKNOWN.

llvm-svn: 34036
2007-02-08 01:48:28 +00:00
Bill Wendling fe5ee14bdf The new version of how to add passes to emit files. We explicitly call a
function to add the file writers between calls to add the passes.

llvm-svn: 34035
2007-02-08 01:41:07 +00:00
Reid Spencer 709750c3d3 Regenerate for recent changes.
llvm-svn: 34025
2007-02-08 00:21:40 +00:00
Reid Spencer 4095df45db For PR1187:
When a naming conflict arises, allow internal linkage functions to be
renamed without warning or error.

llvm-svn: 34024
2007-02-08 00:21:06 +00:00
Reid Spencer aff5bd0a78 For PR1187:
Allow @ before identifer names. Recognize the i1, i8, i16, i32, i64 keywords
as type names corresponding to bool, ubyte, ushort, uint, and ulong
respectively. While these aren't LLVM 1.9 constructs, permitting the syntax
allows post-1.9 assembly files to be upgraded.

llvm-svn: 34023
2007-02-08 00:19:40 +00:00
Chris Lattner d220dc1426 move an llvmc-specific function out of the bcreader into llvmc.
llvm-svn: 34021
2007-02-07 23:48:32 +00:00
Chris Lattner a0e49f2ead push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:

ModuleProvider *getBytecodeModuleProvider(
  const std::string &Filename,  ///< Name of file to be read
  BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
  std::string* ErrMsg = 0,      ///< Optional error message holder
  BytecodeHandler* H = 0        ///< Optional handler for reader events
);

This is ugly, but allows a client to say:

  getBytecodeModuleProvider("foo", 0);

If they do this, there is no dependency on the compression libraries, saving
codesize.

llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Chris Lattner 216835d688 add an option for timing bc file reading.
llvm-svn: 33977
2007-02-07 04:39:35 +00:00
Reid Spencer 1241d6d5ab For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)

llvm-svn: 33922
2007-02-05 21:19:13 +00:00
Reid Spencer 3c52e275ea For PR411:
Change getNamedFunction -> getFunction
Make llvm-extract run the StripDeadPrototypes pass.

llvm-svn: 33921
2007-02-05 21:17:53 +00:00
Reid Spencer 3aaaa0b2bd For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer 7b4d83c252 Fix grammaro in output message.
llvm-svn: 33885
2007-02-04 22:08:16 +00:00
Reid Spencer bc7e614093 Regenerate.
llvm-svn: 33859
2007-02-04 01:12:11 +00:00
Reid Spencer d9f7298477 For PR1151:
Make llvm-upgrade valgrind clean. Deleting type instances is a really
nasty thing to do to LLVM. This was a hold-over from the re-write.
This fixes test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll and
potentially many other bugs.

llvm-svn: 33858
2007-02-04 01:05:23 +00:00
Reid Spencer d751385a7a Make sure the gccas script is executable.
llvm-svn: 33851
2007-02-04 00:23:51 +00:00
Reid Spencer 8de97bba5a For PR1072:
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.

llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Chris Lattner 7ccf30bb17 add an instcombine pass to clean up after heavy-lifting IP passes
llvm-svn: 33843
2007-02-03 23:06:03 +00:00
Reid Spencer 5458e0e135 Clean this up a bit: hide command unless verbose output requested, echo
a useful comment line, add a clean target.

llvm-svn: 33834
2007-02-03 16:09:12 +00:00
Reid Spencer 697f1104e7 Two improvements:
1. Allow -- as well as - options (Bill Wendling)
2. Pass unrecognized options to opt and let it handle the errors, if any
   (Chris Lattner).

llvm-svn: 33798
2007-02-02 21:49:27 +00:00
Reid Spencer 583c90d4c2 For PR1152:
Step 2: Make plug compatible shell script to replace gccas binary.

llvm-svn: 33787
2007-02-02 15:50:58 +00:00