Commit Graph

48 Commits

Author SHA1 Message Date
Peter Collingbourne
1d815cac84 LibDriver, llvm-lib: introduce.
llvm-lib is intended to be a lib.exe compatible utility that also
understands bitcode. The implementation lives in a library so that
lld can use it to implement /lib.

Differential Revision: http://reviews.llvm.org/D10297

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239434 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-09 21:50:22 +00:00
Chandler Carruth
2349136630 [PM] Create a separate library for high-level pass management code.
This will provide the analogous replacements for the PassManagerBuilder
and other code long term. This code is extracted from the opt tool
currently, and I plan to extend it as I build up support for using the
new pass manager in Clang and other places.

Mailing this out for review in part to let folks comment on the terrible names
here. A brief word about why I chose the names I did.

The library is called "Passes" to try and make it clear that it is a high-level
utility and where *all* of the passes come together and are registered in
a common library. I didn't want it to be *limited* to a registry though, the
registry is just one component.

The class is a "PassBuilder" but this name I'm less happy with. It doesn't
build passes in any traditional sense and isn't a Builder-style API at all. The
class is a PassRegisterer or PassAdder, but neither of those really make a lot
of sense. This class is responsible for constructing passes for registry in an
analysis manager or for population of a pass pipeline. If anyone has a better
name, I would love to hear it. The other candidate I looked at was
PassRegistrar, but that doesn't really fit either. There is no register of all
the passes in use, and so I think continuing the "registry" analog outside of
the registry of pass *names* and *types* is a mistake. The objects themselves
are just objects with the new pass manager.

Differential Revision: http://reviews.llvm.org/D8054

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231556 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-07 09:02:36 +00:00
Zachary Turner
50418a0ac4 Move DebugInfo to DebugInfo/DWARF.
In preparation for adding PDB support to LLVM, this moves the
DWARF parsing code to its own subdirectory under DebugInfo, and
renames LLVMDebugInfo to LLVMDebugInfoDWARF.

This is purely a mechanical / build system change.

Differential Revision: http://reviews.llvm.org/D7269
Reviewed by: Eric Christopher

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227586 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 18:07:45 +00:00
Justin Bogner
c0f3b72555 ProfileData: Introduce the InstrProfReader interface and a text reader
This introduces the ProfileData library and updates llvm-profdata to
use this library for reading profiles. InstrProfReader is an abstract
base class that will be subclassed for both the raw instrprof data
from compiler-rt and the efficient instrprof format that will be used
for PGO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204482 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-21 17:24:48 +00:00
Justin Bogner
efa9416a21 Back out Profile library and dependent commits
Chandler voiced some concern with checking this in without some
discussion first. Reverting for now.

This reverts r203703, r203704, r203708, and 203709.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203723 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 22:00:57 +00:00
Justin Bogner
02da814a94 Profile: Add a library for the instrumentation based profiling format
This provides a library to work with the instrumentation based
profiling format that is used by clang's -fprofile-instr-* options and
by the llvm-profdata tool. This is a binary format, rather than the
textual one that's currently in use.

The tests are in the subsequent commits that use this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203703 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 20:14:05 +00:00
Peter Collingbourne
cb6684b63b Introduce line editor library.
This library will be used by clang-query. I can imagine LLDB becoming another
client of this library, so I think LLVM is a sensible place for it to live.
It wraps libedit, and adds tab completion support.

The code is loosely based on the line editor bits in LLDB, with a few
improvements:

 - Polymorphism for retrieving the list of tab completions, based on
   the concept pattern from the new pass manager.

 - Tab completion doesn't corrupt terminal output if the input covers
   multiple lines. Unfortunately this can only be done in a truly horrible
   way, as far as I can tell. But since the alternative is to implement our
   own line editor (which I don't think LLVM should be in the business of
   doing, at least for now) I think it may be acceptable.

 - Includes a fallback for the case where the user doesn't have libedit
   installed.

Note that this uses C stdio, mainly because libedit also uses C stdio.

Differential Revision: http://llvm-reviews.chandlerc.com/D2200

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200595 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31 23:46:14 +00:00
Bill Wendling
6a4860af7a Reformat Makefile. No other changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193675 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-30 04:03:03 +00:00
Peter Collingbourne
cc48854d5d Move LTO support library to a component, allowing it to be tested
more reliably across platforms.  Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 23:52:22 +00:00
Rafael Espindola
8496faea07 Move lib/Archive to tools/llvm-ar.
llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 15:47:20 +00:00
Chandler Carruth
7fc162f893 Split out the IRReader header and the utility functions it provides into
its own library. These functions are bridging between the bitcode reader
and the ll parser which are in different libraries. Previously we didn't
have any good library to do this, and instead played fast and loose with
a "header only" set of interfaces in the Support library. This really
doesn't work well as evidenced by the recent attempt to add timing logic
to the these routines.

As part of this, make them normal functions rather than weird inline
functions, and sink the implementation into the library. Also clean up
the header to be nice and minimal.

This requires updating lots of build system dependencies to specify that
the IRReader library is needed, and several source files to not
implicitly rely upon the header file to transitively include all manner
of other headers.

If you are using IRReader.h, this commit will break you (the header
moved) and you'll need to also update your library usage to include
'irreader'. I will commit the corresponding change to Clang momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177971 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 02:25:37 +00:00
Chandler Carruth
c2c50cdcdc Rename VMCore directory to IR.
Aside from moving the actual files, this patch only updates the build
system and the source file comments under lib/... that are relevant.

I'll be updating other docs and other files in smaller subsequnet
commits.

While I've tried to test this, but it is entirely possible that there
will still be some build system fallout.

Also, note that I've not changed the library name itself: libLLVMCore.a
is still the library name. I'd be interested in others' opinions about
whether we should rename this as well (I think we should, just not sure
what it might break)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171359 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 09:10:48 +00:00
Michael J. Spencer
96a564f2be Copy clang/Driver/<Option parsing stuff> to llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169344 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-05 00:29:32 +00:00
Eric Christopher
eae5a13078 Remove more of llvmc and dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140121 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20 00:34:27 +00:00
Benjamin Kramer
72c0d7fdd3 Sketch out a DWARF parser.
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.

It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139627 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 19:42:23 +00:00
Michael J. Spencer
68b3f0c40e Add LLVMObject Library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 03:21:41 +00:00
Chris Lattner
dbf75e813e remove llvm-db: it is completely broken and if anyone wants to do a debugger,
they should not base it on llvm-db (which not following almost any "best practices").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 02:29:51 +00:00
Mikhail Glushenkov
86a3510a68 LLVMC doesn't need ENABLE_PIC to build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74783 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-04 03:54:54 +00:00
Daniel Dunbar
74deeb84bd Don't build LLVMC when configured with --disable-pic (it needs requires shared
module support to build).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 21:12:26 +00:00
Daniel Dunbar
ecc63f8687 Start flushing out MCContext.
- Lives inside new library lib/MC (LLVMMC.a)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 22:01:43 +00:00
Mikhail Glushenkov
f188178a2f Reorganize llvmc code.
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change
the build system accordingly. Makes it easier for projects using LLVM to build
their own llvmc-based drivers.

Tested with objdir != srcdir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:01:14 +00:00
Misha Brukman
9b8f542e27 Removed trailing whitespace from Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 16:44:42 +00:00
Chris Lattner
fc643c5e88 remove attribution from lib Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:09:26 +00:00
Chris Lattner
6593380c0e build lib/Archive instead of lib/Bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36887 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:50:06 +00:00
Chris Lattner
6742b4df5c build the bitcode dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36332 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 06:26:05 +00:00
Reid Spencer
832254e1c2 Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 02:16:23 +00:00
Reid Spencer
dd1aac36a1 Make some changes suggested by Chris:
1. Remove the LLVM_DO_NOT_BUILD feature (not needed any more)
2. Ensure that lib/VMCore gets built first. This needs to be done because
   VMCore now uses tblgen to generate the Intrinsics header which are
   needed in other libraries. In parallel builds, this can cause problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 22:55:35 +00:00
Chris Lattner
7044aac97c Use DIRS here instead of PARALLEL_DIRS, as VMCore has to be built before the
other dirs (for Intrinsics.gen).  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28372 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:54:48 +00:00
Reid Spencer
9d969b8328 Add the Linker library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17763 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:54:41 +00:00
Misha Brukman
3559a93f5e Wrap long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 01:34:42 +00:00
Chris Lattner
0f2aecef5a CBackend is no longer here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11416 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:29:37 +00:00
Chris Lattner
6dddfff750 Add new dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10686 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-05 05:25:59 +00:00
John Criswell
e488e9360b Added LLVM copyright notice to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:26:57 +00:00
John Criswell
a496777cc5 Removed Support directory. It now lives in llvm/support/lib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8739 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 16:10:43 +00:00
Brian Gaeke
dbff77238f Add ExecutionEngine directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8371 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:39:49 +00:00
Brian Gaeke
b1c125e2cd Reoptimizer has moved to reopt cvs module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8018 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 20:32:04 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
ec9962e44a Compile sub-directories in parallel, because they don't have interdependencies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3808 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 03:25:58 +00:00
Anand Shukla
26022027be added Reoptimizer in Makefile DIRS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3515 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-27 22:05:53 +00:00
Sumant Kowshik
9ddc86c6e5 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2552 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-08 18:09:58 +00:00
Chris Lattner
3c9e93b7e5 Moved assembly writer library into its own top level directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2162 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 19:42:33 +00:00
Chris Lattner
59b6b8e0b3 Move stuff out of the Optimizations directories into the appropriate Transforms
directories.  Eliminate the opt namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1520 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 23:17:48 +00:00
Chris Lattner
5a2f8ba018 Compile the transforms directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@776 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 07:04:00 +00:00
Chris Lattner
f6374bfd69 Move the sparc target to a new lib/Target directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@562 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 03:55:11 +00:00
Chris Lattner
ea1c7b6f7d Make sure we build all of the code!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 21:04:03 +00:00
Chris Lattner
d9c03441b5 Moved LLC subdir to the tools top level directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:33:01 +00:00
Vikram S. Adve
4e1aeca8c9 Added CodeGen, LLC, and Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:40:37 +00:00
Chris Lattner
009505452b Initial revision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-06 20:29:01 +00:00