Commit Graph

1961 Commits

Author SHA1 Message Date
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
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