1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
Dmitri Gribenko
2eaa3b382c Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.

llvm-svn: 173923
2013-01-30 12:05:05 +00:00
Nick Kledzik
2516df02eb Initial implementation of a utility for converting native data
structures to and from YAML using traits.  The first client will
be the test suite of lld.  The documentation will show up at:

   http://llvm.org/docs/YamlIO.html

llvm-svn: 170019
2012-12-12 20:46:15 +00:00
Joerg Sonnenberger
230b3a77a8 Don't explicitly require RTTI and EH.
llvm-svn: 166772
2012-10-26 12:15:29 +00:00
Sean Silva
c87a3dcb20 Revert r165652: "Remove unnecessary RTTI from the build."
... Apparently the RTTI is still necessary for some reason.

llvm-svn: 165654
2012-10-10 20:50:36 +00:00
Sean Silva
0fd7ecba19 Remove unnecessary RTTI from the build.
llvm-svn: 165652
2012-10-10 20:27:20 +00:00
Nick Kledzik
f4e550e004 Initial commit of new FileOutputBuffer support class.
Since the llvm::sys::fs::map_file_pages() support function it relies on
is not yet implemented on Windows, the unit tests for FileOutputBuffer 
are currently conditionalized to run only on unix.

llvm-svn: 161099
2012-08-01 02:29:50 +00:00
Seth Cantrell
1cc53344a6 platform support for counting column widths and checking isprint
llvm-svn: 154944
2012-04-17 20:03:03 +00:00
Manuel Klimek
47de8bd0ef Goodbye, JSONParser...
llvm-svn: 154930
2012-04-17 17:21:17 +00:00
Michael J. Spencer
2f9beb2374 Add YAML parser to Support.
llvm-svn: 153977
2012-04-03 23:09:22 +00:00
Chandler Carruth
cc9b4516cb Rewrite LLVM's generalized support library for hashing to follow the API
of the proposed standard hashing interfaces (N3333), and to use
a modified and tuned version of the CityHash algorithm.

Some of the highlights of this change:
 -- Significantly higher quality hashing algorithm with very well
    distributed results, and extremely few collisions. Should be close to
    a checksum for up to 64-bit keys. Very little clustering or clumping of
    hash codes, to better distribute load on probed hash tables.
 -- Built-in support for reserved values.
 -- Simplified API that composes cleanly with other C++ idioms and APIs.
 -- Better scaling performance as keys grow. This is the fastest
    algorithm I've found and measured for moderately sized keys (such as
    show up in some of the uniquing and folding use cases)
 -- Support for enabling per-execution seeds to prevent table ordering
    or other artifacts of hashing algorithms to impact the output of
    LLVM. The seeding would make each run different and highlight these
    problems during bootstrap.

This implementation was tested extensively using the SMHasher test
suite, and pased with flying colors, doing better than the original
CityHash algorithm even.

I've included a unittest, although it is somewhat minimal at the moment.
I've also added (or refactored into the proper location) type traits
necessary to implement this, and converted users of GeneralHash over.

My only immediate concerns with this implementation is the performance
of hashing small keys. I've already started working to improve this, and
will continue to do so. Currently, the only algorithms faster produce
lower quality results, but it is likely there is a better compromise
than the current one.

Many thanks to Jeffrey Yasskin who did most of the work on the N3333
paper, pair-programmed some of this code, and reviewed much of it. Many
thanks also go to Geoff Pike Pike and Jyrki Alakuijala, the original
authors of CityHash on which this is heavily based, and Austin Appleby
who created MurmurHash and the SMHasher test suite.

Also thanks to Nadav, Tobias, Howard, Jay, Nick, Ahmed, and Duncan for
all of the review comments! If there are further comments or concerns,
please let me know and I'll jump on 'em.

llvm-svn: 151822
2012-03-01 18:55:25 +00:00
Jay Foad
d6a7f724f4 Update for the removal of Hashing.cpp.
llvm-svn: 151249
2012-02-23 09:33:44 +00:00
Talin
777c85d862 Hashing.h - utilities for hashing various data types.
llvm-svn: 150890
2012-02-18 21:00:49 +00:00
Derek Schuff
f522835510 Enable streaming of bitcode
This CL delays reading of function bodies from initial parse until
materialization, allowing overlap of compilation with bitcode download.

llvm-svn: 149918
2012-02-06 22:30:29 +00:00
Douglas Gregor
1b572cae6f Move Clang's file-level locking facility over to LLVM's support
library, since it doesn't really have anything to do with Clang.

llvm-svn: 149203
2012-01-29 20:15:10 +00:00
Chandler Carruth
1663697160 Fix up the CMake build for the new files added in r146960, they're
likely to stay either way that discussion ends up resolving itself.

llvm-svn: 146966
2011-12-20 08:42:11 +00:00
Manuel Klimek
2f7cf4e64b Adds a JSON parser and a benchmark (json-bench) to catch performance regressions.
llvm-svn: 146735
2011-12-16 13:09:10 +00:00
Benjamin Kramer
fcc23eeec7 Add the DataExtractor utility class.
It is an endian-aware helper that can read data from a StringRef. It will
come in handy for DWARF parsing. This class is inspired by LLDB's
DataExtractor, but is stripped down to the bare minimum needed for DWARF.

Comes with unit tests!

llvm-svn: 139626
2011-09-13 19:42:16 +00:00
Evan Cheng
420bf5446c Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Jakub Staszak
b4bffb255a Add BlockFrequency class.
llvm-svn: 135992
2011-07-25 22:24:51 +00:00
Chandler Carruth
ace8fa5233 Move TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
The header file was already properly located. The previous need for it
in Support had to do with the version string printing which was fixed in
r135757.

Also update build dependencies where libraries that needed the
functionality of the Target library (in the form of the TargetRegistry)
were picking it up via Support. This is pretty pervasive, essentially
every TargetInfo library (ARMInfo, etc) uses TargetRegistry, making it
depend on Target. All of these were previously just sneaking by.

llvm-svn: 135760
2011-07-22 08:16:53 +00:00
Andrew Trick
4591f882c2 Branch profiling: floating-point avoidance.
Patch by: Jakub Staszak!

Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.

llvm-svn: 132867
2011-06-11 01:05:22 +00:00
Rafael Espindola
0a9911d920 Revert my previous patch. The cmake build had already been fixed.
llvm-svn: 131606
2011-05-19 00:02:45 +00:00
Rafael Espindola
587fa89510 Fix the cmake build.
llvm-svn: 131602
2011-05-18 23:56:40 +00:00
Jakob Stoklund Olesen
26b4e8ec0a Add ADT/IntEqClasses.h as a light-weight implementation of EquivalenceClasses.h.
This implementation already exists as ConnectedVNInfoEqClasses in
LiveInterval.cpp, and it seems to be generally useful to have a light-weight way
of forming equivalence classes of small integers.

IntEqClasses doesn't allow enumeration of the elements in a class.

llvm-svn: 122293
2010-12-21 00:04:46 +00:00
Michael J. Spencer
3885add959 Support: Remove Alarm. It is unused (via local grep and google code search).
llvm-svn: 121160
2010-12-07 18:41:59 +00:00
Michael J. Spencer
8ac563a538 Support: Add PathV2 implementation.
llvm-svn: 120329
2010-11-29 22:28:51 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Jakob Stoklund Olesen
52d6dd3079 Add ADT/IntervalMap.
This is a sorted interval map data structure for small keys and values with
automatic coalescing and bidirectional iteration over coalesced intervals.

Except for coalescing intervals, it provides similar functionality to std::map.
It is however much more compact for small keys and values, and hopefully faster
too.

The container object itself can hold the first few intervals without any
allocations, then it switches to a cache conscious B+-tree representation. A
recycling allocator can be shared between many containers, even between
containers holding different types.

The IntervalMap is initially intended to be used with SlotIndex intervals for:

- Backing store for LiveIntervalUnion that is smaller and faster than std::set.

- Backing store for LiveInterval with less overhead than std::vector for typical
  intervals and O(N log N) merging of large intervals. 99% of virtual registers
  need 4 entries or less and would benefit from the small object optimization.

- Backing store for LiveDebugVariable which doesn't exist yet, but will track
  debug variables during register allocation.

This is a work in progress. Missing items are:

- Performance metrics.
- erase().
- insert() shrinkage.
- clear().
- More performance metrics.
- Simplification and detemplatization.

llvm-svn: 119787
2010-11-19 04:47:19 +00:00
Jakob Stoklund Olesen
254cd4bc4d Revert "Add ADT/IntervalMap.", GCC doesn't like it.
This reverts r119772.

llvm-svn: 119773
2010-11-19 01:21:03 +00:00
Jakob Stoklund Olesen
7d82c5c710 Add ADT/IntervalMap.
This is a sorted interval map data structure for small keys and values with
automatic coalescing and bidirectional iteration over coalesced intervals.

Except for coalescing intervals, it provides similar functionality to std::map.
It is however much more compact for small keys and values, and hopefully faster
too.

The container object itself can hold the first few intervals without any
allocations, then it switches to a cache conscious B+-tree representation. A
recycling allocator can be shared between many containers, even between
containers holding different types.

The IntervalMap is initially intended to be used with SlotIndex intervals for:

- Backing store for LiveIntervalUnion that is smaller and faster than std::set.

- Backing store for LiveInterval with less overhead than std::vector for typical
  intervals and O(N log N) merging of large intervals. 99% of virtual registers
  need 4 entries or less and would benefit from the small object optimization.

- Backing store for LiveDebugVariable which doesn't exist yet, but will track
  debug variables during register allocation.

This is a work in progress. Missing items are:

- Performance metrics.
- erase().
- insert() shrinkage.
- clear().
- More performance metrics.
- Simplification and detemplatization.

llvm-svn: 119772
2010-11-19 01:14:40 +00:00
Oscar Fuentes
a6ffccab95 Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
2010-10-17 02:26:16 +00:00
John Thompson
87f1278fd9 Unbreak cmake build.
llvm-svn: 116003
2010-10-07 23:12:15 +00:00
Oscar Fuentes
eb27a44982 Removed a bunch of unnecessary target_link_libraries.
llvm-svn: 114999
2010-09-28 22:39:14 +00:00
Benjamin Kramer
482435cdb0 Update CMake build.
llvm-svn: 111669
2010-08-20 18:56:46 +00:00
Douglas Gregor
4e0ad2b35b Unbreak my CMake build, say you'll compile for me again...
llvm-svn: 109598
2010-07-28 17:17:46 +00:00
Daniel Dunbar
956f97134b ADT: Add DAGDeltaAlgorithm, which is a DAG minimization algorithm built on top of the standard 'delta debugging' algorithm.
- This can give substantial speedups in the delta process for inputs we can construct dependency information for.

llvm-svn: 105612
2010-06-08 16:21:22 +00:00
Douglas Gregor
37e54f9d4d De-bork CMake build
llvm-svn: 92003
2009-12-23 17:03:46 +00:00
Chris Lattner
eee37b7ba5 now that libsystem no longer uses SmallVector, we can move
SmallVectorBase::grow_pod out of line, finally satisfying PR3758.

llvm-svn: 91529
2009-12-16 08:44:24 +00:00
Daniel Dunbar
63e2201f3e Add an implementation of the delta debugging algorithm.
- This is a pretty slow / memory intensive implementation, and I will likely
   change it to an iterative model, but it works.

llvm-svn: 90447
2009-12-03 11:12:42 +00:00
Daniel Dunbar
60e1dee7fa Add StringRef::{rfind, rsplit}
llvm-svn: 82087
2009-09-16 22:38:48 +00:00
Ted Kremenek
e98d47cdfe Update CMake files.
llvm-svn: 81577
2009-09-11 21:49:45 +00:00
Ted Kremenek
8d7530f61e Update CMake files.
llvm-svn: 80680
2009-09-01 17:01:02 +00:00
Torok Edwin
21897521c1 Add regular expression matching support, based on OpenBSD regexec()/regcomp()
implementation.

llvm-svn: 80493
2009-08-30 08:24:09 +00:00
Oscar Fuentes
3fc9e4150d CMake: updated list of source files.
llvm-svn: 79959
2009-08-25 00:02:29 +00:00
Oscar Fuentes
709a42b7eb CMake: Updated library dependencies and list of source files.
llvm-svn: 79876
2009-08-23 23:59:15 +00:00
Ted Kremenek
3b2c07bc88 Update CMake files.
llvm-svn: 77709
2009-07-31 18:50:22 +00:00
Daniel Dunbar
bc0b1a1506 Update CMake
llvm-svn: 76957
2009-07-24 07:04:49 +00:00
Ted Kremenek
e6322544c4 Update CMake file.
llvm-svn: 75746
2009-07-15 05:39:55 +00:00
Ted Kremenek
094e45cef0 Update CMake file.
llvm-svn: 75677
2009-07-14 20:44:17 +00:00
Mike Stump
99dbf32ce2 Fix build.
llvm-svn: 74936
2009-07-07 18:52:14 +00:00