Commit Graph

2220 Commits

Author SHA1 Message Date
Anton Korobeynikov
5027652b8a First step of implementing PR1538: move llvm2cpp logic to new 'target'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 22:29:24 +00:00
Bill Wendling
480311b548 Use the Create static method for some of these objects. They no longer
have public constructors. This should fix PR2246.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 07:13:17 +00:00
Owen Anderson
d2368dc344 Move MemCpyOpt after GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 07:12:26 +00:00
Evan Cheng
c290a5b9ff Added command line option -no-lazy to disable JIT lazy compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50095 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 06:51:41 +00:00
Owen Anderson
ecbc963eda Add MemCpyOpt to LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 03:57:36 +00:00
Gabor Greif
f1f12f91e8 fix some residual old API that fell thru the cracks of the conversion script, closes http://llvm.org/bugs/show_bug.cgi?id=2246
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50062 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 21:31:55 +00:00
Owen Anderson
eb60fb9c1f Use GVN in LTO instead of GCSE+LoadVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 07:51:07 +00:00
Chris Lattner
1d40281ae6 Add jump threading to liblto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:31:40 +00:00
Chris Lattner
e12d8e422d run the jump threading pass in llvm-ld also
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:28:40 +00:00
Chris Lattner
2510c3b70f enable jump threading pass by default. This causes no miscompilations
and can significantly shrinkify some code, particularly from C++ land.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:22:09 +00:00
Duncan Sands
fa191e4cd4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 12:03:38 +00:00
Dan Gohman
33ef2bb268 Fix a memory leak in llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 15:56:26 +00:00
Owen Anderson
6bc41e8a74 Revert r49614. As Dan pointed out, some of these aren't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:38:21 +00:00
Owen Anderson
386ea355e7 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:15:17 +00:00
Evan Cheng
5d4ed3ba11 Move memcpy / memset optimization pass after GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49457 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 01:33:05 +00:00
Owen Anderson
a723d1e48f Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 08:23:16 +00:00
Tanya Lattner
cb76b12a3a Remove llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49347 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 18:32:47 +00:00
Duncan Sands
e2c4304654 Use Intrinsic::getDeclaration in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49338 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 13:45:04 +00:00
Bill Wendling
58f3bcdbb9 Remove tabs. Patch by Mike Stump!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 05:47:52 +00:00
Gabor Greif
051a950000 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Torok Edwin
af4fc28b56 -fPIC is required on x86-64 when building shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 12:42:29 +00:00
Devang Patel
e27847056d Reenable running StripSymbols when EH is on.
Dale fixed EH.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49192 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 21:30:06 +00:00
Dale Johannesen
dedf502fba Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:10:52 +00:00
Chris Lattner
038112a4e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 18:04:03 +00:00
Chris Lattner
8c2ec51a7f stop building llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 18:58:05 +00:00
Anton Korobeynikov
5f2e499520 Honour another bunch of parameter attributes in llvm2cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 11:25:49 +00:00
Anton Korobeynikov
e818717e0c Honour ByVal parameter attribute in llvm2cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 11:15:01 +00:00
Mikhail Glushenkov
4d9c9e9d31 Another test commit (with git-svn)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 21:37:43 +00:00
Mikhail Glushenkov
56ba12c497 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 21:18:58 +00:00
Anton Korobeynikov
1cf962b874 Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 18:53:36 +00:00
Tanya Lattner
6fefa6a12b Disable building llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 05:05:58 +00:00
Andrew Lenharth
df4613ced2 With debug info, there are nameless constant global values. do not crash when we hit one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 22:16:14 +00:00
Bill Wendling
16b412c6e2 Small format/grammar changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48723 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 05:58:47 +00:00
Bill Wendling
ae851b63af Grammar Nazi strikes! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 05:55:54 +00:00
Anton Korobeynikov
ac67b7ea8f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-23 08:57:20 +00:00
Andrew Lenharth
230293b4c5 style and spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:32:43 +00:00
Andrew Lenharth
50b5742157 llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 20:49:51 +00:00
Chris Lattner
58d74910c6 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 17:45:29 +00:00
Andrew Lenharth
c77e4d1569 only extract main if the user didn't specify anything to extract
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 20:10:54 +00:00
Andrew Lenharth
6a021a4dda make error message reflect default search function name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 20:07:24 +00:00
Andrew Lenharth
d245a8ae47 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48015 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 19:51:57 +00:00
Tanya Lattner
8f3153e217 Renable lto2 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47845 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 17:32:40 +00:00
Nick Kledzik
873570e0ef suppress extra -install_name on Tiger. The 10.4 tools don't support it. Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47817 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 06:33:06 +00:00
Nick Lewycky
fc82fabe00 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 02:48:09 +00:00
Nick Lewycky
33a834a6f6 Also handle "getresult".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 21:47:06 +00:00
Tanya Lattner
e5101bf52c Disable lto because its broken on tiger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47783 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 07:36:30 +00:00
Nick Kledzik
1f008a88f9 stop building lto on all platforms. Start building lto2 on Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 19:31:29 +00:00
Nick Kledzik
4ed55ceeaf also pass -compatibility_version when linking shared object for Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47747 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 02:01:34 +00:00
Andrew Lenharth
63b8c1f6f1 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28 22:24:48 +00:00
Nick Kledzik
ef194ed740 fixes from review of first commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 22:25:36 +00:00
Nick Kledzik
cfd72797b5 use PROJ_SRC_DIR so this builds with Apple style builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 22:23:46 +00:00
Nick Kledzik
77595fc356 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 20:26:43 +00:00
Bill Wendling
584c3bf650 Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47596 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 10:46:10 +00:00
Dale Johannesen
22c3979fca Split ParameterAttributes.h, putting the complicated
stuff into ParamAttrsList.h.  Per feedback from
ParamAttrs changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47504 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-22 22:17:59 +00:00
Devang Patel
ef00f9d377 Add -disable-output option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47422 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21 01:41:25 +00:00
Anton Korobeynikov
44a2a79f18 Get rid of hash_map in llvmc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:28:26 +00:00
Anton Korobeynikov
a27694d7aa And final pack of warnings silencing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:27:04 +00:00
Anton Korobeynikov
ae9f3a3b7c Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:08:44 +00:00
Dale Johannesen
0d51e7ec0d Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet).  Clean up
interfaces to reference ParameterAttributes consistently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47342 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-19 21:38:47 +00:00
Dan Gohman
39564499c4 Fix a missing space in the description of the find-bugs option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47271 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18 17:15:45 +00:00
Nick Lewycky
1d1ef14248 PR2027, Fix bugpoint's -find-bugs option, clean up the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 05:01:46 +00:00
Devang Patel
5252ae6eca Begin setting features for target based on target triple string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07 22:32:50 +00:00
Devang Patel
0e50128099 Do not set time out, lets assume assembler will do its job in reasonable amount of time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46718 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04 21:16:10 +00:00
Devang Patel
bc9ed593d7 Do not strip symbols when EH is ON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02 01:32:38 +00:00
Devang Patel
59c8d8ae89 Supply appropriate arch info to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:19:31 +00:00
Devang Patel
21b70b237d Enable exception handling if it is supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 17:43:03 +00:00
Chris Lattner
3992f5231a Add support for frameworks. Patch by Shantonu Sen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27 22:58:59 +00:00
Devang Patel
5e563c3264 - Introduces versioning macro LLVM_LTO_VERSION
- Communicate symbol visibility
- Communicate code generation model


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 23:52:34 +00:00
Chris Lattner
03a1c7ae3d Fix llvm-ld -Xlinker, patch by Daniel Teske!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09 01:01:17 +00:00
Chris Lattner
4a6a6f21f3 Fix PR1797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08 04:26:20 +00:00
Chris Lattner
234d529e58 remove attribution from a variety of miscellaneous files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45425 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 22:59:10 +00:00
Chris Lattner
cf78659a82 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45424 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:47:37 +00:00
Chris Lattner
4c06e0d8a5 remove attributions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:46:15 +00:00
Chris Lattner
21c62da287 remove attributions from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:44:31 +00:00
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Gordon Henriksen
194c90ed2a Fixing several transforms which would drop the collector attribute
when copying functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 22:16:06 +00:00
Seo Sanghyeon
dc32d19c1c Actually parse q operation in llvm-ar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45353 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 13:53:47 +00:00
Devang Patel
fe085f3fde Revert my previous check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 01:46:01 +00:00
Devang Patel
e3611871cb Add lto version check mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45238 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 00:24:01 +00:00
Christopher Lamb
4374f8e208 regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45085 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:17:35 +00:00
Christopher Lamb
43ad6b3e0d 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:12:55 +00:00
Christopher Lamb
fe63fb986d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 08:59:05 +00:00
Chris Lattner
b25a0934cc Fix accidental commit by Bill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44729 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09 00:27:38 +00:00
Bill Wendling
041b3f8356 Reverting 44702. It wasn't correct to rename them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-08 23:58:46 +00:00
Duncan Sands
a3355ffb3d 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03 20:06:50 +00:00
Duncan Sands
757d243167 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 18:19:18 +00:00
Duncan Sands
afa3b6da11 Add some convenience methods for querying attributes, and
use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44403 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28 17:07:01 +00:00
Ted Kremenek
f248f0db12 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 17:53:54 +00:00
Duncan Sands
dc024674ff 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 13:23:08 +00:00
Nick Lewycky
6fa98b1320 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 06:47:06 +00:00
Chris Lattner
120119da13 Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44051 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13 18:22:33 +00:00
Gordon Henriksen
4e1be6d5ea Deleting redundant copy of block extractor pass. See also PR1775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 01:54:05 +00:00
Chris Lattner
4a444c717d Fix PR1739.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43286 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 04:35:54 +00:00
Chris Lattner
706a5e6124 add a 'don't use me' marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-22 19:41:46 +00:00
Gordon Henriksen
4b2b9402c5 Switching TargetMachineRegistry to use the new generic Registry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:28:48 +00:00
Dan Gohman
82f209e421 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43016 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-15 21:10:03 +00:00
Dan Gohman
82a13c9c48 Move the space in overview output for commands out of each of the
commands and into the common code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 15:45:12 +00:00
Dale Johannesen
4292d1c02a minor long double related changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42439 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 18:06:58 +00:00
Dale Johannesen
9d5f456077 Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 03:30:33 +00:00
Dale Johannesen
3f6eb7419d 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).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 18:32:33 +00:00
Owen Anderson
d06eb2c879 Turn GVN on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 22:23:52 +00:00
Dale Johannesen
cdd509aecd Apply feedback from previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41774 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 21:07:57 +00:00
Dale Johannesen
43421b3dd7 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.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 18:13:44 +00:00
Devang Patel
305743df72 Enable loop index split pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 20:46:58 +00:00
David Greene
5fd22a84fd Update generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41706 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 18:46:50 +00:00
David Greene
418a04ec9b Revert this because the interface hasn't been updated yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41703 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 17:15:07 +00:00
David Greene
f0e856077c Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41702 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 17:00:44 +00:00
David Greene
b8f74793b9 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 15:46:09 +00:00
David Greene
f1355a55f8 Update InvokeInst to work like CallInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 19:04:21 +00:00
David Greene
ae5115dd44 Update .cvs file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41106 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-15 17:58:51 +00:00
Reid Spencer
5c1b53399f Don't build llvm-stub twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-13 00:25:47 +00:00
Reid Spencer
d2887e4dcd Separate program name from error message with a :
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 21:19:01 +00:00
Reid Spencer
c52ca08c56 Terminate an error message with a newline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40943 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 21:17:59 +00:00
David Greene
ba1a750f1d Make this code more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 16:57:55 +00:00
Chandler Carruth
022021951b Regenerating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40808 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-04 01:56:21 +00:00
Chandler Carruth
6994040a95 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40807 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-04 01:51:18 +00:00
Reid Spencer
22256f482d Adjust for new CallInst constructor interface.
This fixes test/Feature/llvm2cpp.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40714 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 03:30:26 +00:00
Owen Anderson
f6a05f949f Rename FastDSE to just DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:36:51 +00:00
David Greene
718fda37a7 Update generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 03:59:32 +00:00
David Greene
52eec54820 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 03:43:44 +00:00
Dan Gohman
d47cab81b6 Remove a FIXME comment that wasn't removed when the code it accompanied
was removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40591 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 15:01:09 +00:00
Reid Spencer
0a4c8de81c Remove dead option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 04:23:32 +00:00
Reid Spencer
cbb7ec7396 Fix a sys::Path API error caught by a gcc 4.2 warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-18 05:27:33 +00:00
Owen Anderson
b63c7b695f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 21:59:21 +00:00
Evan Cheng
74b1e1424c Change sroa threshold back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39980 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 20:07:21 +00:00
Evan Cheng
a8b9a7b924 Temporarily set SROA threshold to 512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-17 01:52:05 +00:00
Anton Korobeynikov
02e2152d02 Emit correct linkage. Patch by Roman Samoilov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 19:51:06 +00:00
Reid Spencer
087d90e912 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 07:48:09 +00:00
Reid Spencer
4a2c083bdd Makesure the -cppflags also uses the CPP.BaseFlags as the CPP.Defines only
contains some of the defines but not all CPP flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38487 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 07:21:34 +00:00
Gabor Greif
db5565a1f5 finishing touches of bytecode -> bitcode changes. also unbreak Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 20:28:40 +00:00
Gabor Greif
e75ca3d809 eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 13:38:17 +00:00
Chris Lattner
f87bd845da update the .cvs files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37919 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 17:27:31 +00:00
Gabor Greif
a99be51bf5 Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 17:07:56 +00:00
Devang Patel
56fb164540 Fix PR1539. Add LoopPassPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 15:32:03 +00:00
Gabor Greif
8ff70c2635 Pretty straightforward replacement of "bytecode" by "bitcode"
performed on tools/ first, in order not to cause lethal damage


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 21:55:50 +00:00
John Criswell
e644ef7b09 Convert .cvsignore files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 16:35:07 +00:00
Devang Patel
28552da9c3 Fix PR 1526.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37780 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 23:09:25 +00:00
David Greene
a696d24ad2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37777 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 19:36:08 +00:00
Lauro Ramos Venancio
4a828eeed3 llvm-nm must print the alias symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37766 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 22:08:09 +00:00
Reid Spencer
c38adbb846 Fix PR1525:
Use a better determinator for identifying constant array initializers that
are or are not zero terminated and generate code appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37720 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-25 16:45:54 +00:00
Chris Lattner
3f931b8c0e Fix pr1448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 16:46:48 +00:00
Reid Spencer
a4d71f09ff 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37616 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-16 20:48:27 +00:00
Reid Spencer
ab24b4cf70 Fix PR1516:
When printing the uses of a function (-gen-function only), make sure to
include the constants referenced by intializers of global variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-16 20:33:24 +00:00
Nick Lewycky
8946fe1776 Call the correct function name. Patch from Stephane Letz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37614 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-16 16:17:35 +00:00
Lauro Ramos Venancio
497391ad8d Fix bugpoint to run -llc-safe with -Xlinker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 23:10:56 +00:00
Chris Lattner
037a704f4f if internalize is disabled, don't run the pass at all!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 20:51:14 +00:00
Zhou Sheng
febca3499e Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37432 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-05 05:28:26 +00:00
Reid Spencer
7eea8ff06d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37207 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 05:48:07 +00:00
Reid Spencer
295b1ceb4f Initialize variable to null so it has a value in the off chance that a
memory buffer couldn't be allocated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36904 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 18:50:07 +00:00
Chris Lattner
065344dfd5 use the new MemoryBuffer interfaces to simplify error reporting in clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 23:45:49 +00:00
Chris Lattner
c57ed8b298 remove dead option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 23:24:42 +00:00
Chris Lattner
421e51603a Fix a buggy conversion from bytecode to bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36883 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:43:09 +00:00
Chris Lattner
d44ae90fc8 make sure the ofstream for opt's output file is destroyed, so that the bits
actually land on disk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:17:23 +00:00
Chris Lattner
744879ea01 switch tools to bitcode from bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:32:02 +00:00
Chris Lattner
44dadffe4b switch tools to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:29:57 +00:00
Chris Lattner
5e3c9f96d7 this doesn't directly depend on bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36854 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:58:00 +00:00
Chris Lattner
bb3f3d357f add bitcode support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36853 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:56:58 +00:00
Chris Lattner
a8653f3522 archive library already depends on bc reader
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:53:02 +00:00
Chris Lattner
5e8edbbf11 add bitcode support, optimize reading to not read all function bodies just
to get deplibs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36851 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:51:37 +00:00
Chris Lattner
db9cbeb240 use an auto_ptr to avoid an explicit delete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36850 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:47:36 +00:00
Chris Lattner
03b6963762 add bitcode support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36849 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:47:06 +00:00
Chris Lattner
e3c55a52f8 Remove the -emit-bytecode option. Noone in the llvm tree uses it, and this
keeps llvm-upgrade a simple "source to source" tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36848 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:40:41 +00:00
Chris Lattner
4d5aad2d99 add bitcode reading support to llvm-nm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36847 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:36:18 +00:00
Chris Lattner
b958ba3761 bitcodify, remove eh cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:21:42 +00:00
Chris Lattner
9356b1aa54 debugger depends on bcreader, not llvm-db
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36842 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:18:37 +00:00
Chris Lattner
c48e1db214 remove EH cruft, add bitcode support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36841 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:13:17 +00:00
Chris Lattner
c1e6d68698 add bitcode reading support, remove eh stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36840 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:58:26 +00:00
Chris Lattner
1a7354082a add bitcode reading support. Remove EH cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36839 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:55:19 +00:00
Chris Lattner
68d4922adf bitcodify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:49:55 +00:00
Chris Lattner
0f4ed87c9c simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36837 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:43:36 +00:00
Chris Lattner
592488a4ef add support to llvm-prof for reading from a bitcode file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36836 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:43:00 +00:00
Chris Lattner
b330e38f4a if -bitcode is specified, read and write a bitcode file instead of a bytecode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 02:42:03 +00:00
Chris Lattner
c5ff2cc3de add inline asm code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36826 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 01:50:11 +00:00
Chris Lattner
cb3d91b05b add a denser encoding for null terminated strings, add a 6-bit abbrev as
well.  This shrinks kc++ from 2724088 to 2717360 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36821 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:53:07 +00:00
Chris Lattner
b1e85b58f0 emit spiffy little histograms of codes, if enabled. Don't print averages if
there is only one item.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36773 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 01:46:49 +00:00
Chris Lattner
44b0f10721 do not charge subblock sizes to the parent block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 01:29:31 +00:00
Chris Lattner
1772b12d13 update to new APIs, make output a bit (haha) nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 00:17:42 +00:00
Chris Lattner
cd5b7d7c9d add support for new codes/block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 03:01:41 +00:00
Evan Cheng
34e400ebe6 Added -rsh-host and -rsh-user to support remote execution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36685 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 18:36:15 +00:00
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Chris Lattner
8f92668f53 add phi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36611 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 02:43:46 +00:00
Reid Spencer
3b726396ab Augment the verbose output to print out the sub-commands executed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36581 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 23:59:47 +00:00
Chris Lattner
b30c925046 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 21:48:19 +00:00
Chris Lattner
4238d474b4 add some simple per-block statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36576 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 20:00:02 +00:00
Chris Lattner
32de6330f1 Implement support to read an arbitrary bitcode file. Next up, dumping the
file symbolically and actually computing statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36557 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 08:31:14 +00:00
Chris Lattner
45e0f890f8 very early support for analyzing a bitstream. This opens the file, starts
reading the stream, and detects whether it is LLVM IR or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36556 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 08:12:22 +00:00
Chris Lattner
c453f76e2b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36554 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 07:54:31 +00:00
Chris Lattner
63db485b79 fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-29 05:51:00 +00:00
Chris Lattner
020403209a 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.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-27 17:02:33 +00:00
Jeff Cohen
b5594e3066 Add new option to usage help.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36347 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 18:33:20 +00:00
Chris Lattner
197cceaaac don't break reading from stdin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36336 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:35:20 +00:00
Chris Lattner
395439bb22 link in bitwriter library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36335 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:31:35 +00:00
Chris Lattner
b3ca3622bb teach llvm-dis to read bitcode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36334 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:31:02 +00:00
Chris Lattner
27bb3af61c add a temporary -bitcode option, which instructs llvm-as to produce a bitcode file instead of a bytecode file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36333 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:28:58 +00:00
Reid Spencer
4f859aa532 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 05:46:44 +00:00
Reid Spencer
3b87d6a7b5 Add the --host-target option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36326 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 05:05:36 +00:00
Chris Lattner
9c81664f6e remove cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 04:45:58 +00:00
Reid Spencer
e59f4931f4 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36106 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 03:05:01 +00:00