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

117 Commits

Author SHA1 Message Date
Craig Topper
0e2ab5732c [C++] Use 'nullptr'. Tools edition.
llvm-svn: 207176
2014-04-25 04:24:47 +00:00
Ahmed Charles
52ce0c101e Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
Chandler Carruth
ee051af6e2 [cleanup] Move the Dominators.h and Verifier.h headers into the IR
directory. These passes are already defined in the IR library, and it
doesn't make any sense to have the headers in Analysis.

Long term, I think there is going to be a much better way to divide
these matters. The dominators code should be fully separated into the
abstract graph algorithm and have that put in Support where it becomes
obvious that evn Clang's CFGBlock's can use it. Then the verifier can
manually construct dominance information from the Support-driven
interface while the Analysis library can provide a pass which both
caches, reconstructs, and supports a nice update API.

But those are very long term, and so I don't want to leave the really
confusing structure until that day arrives.

llvm-svn: 199082
2014-01-13 09:26:24 +00:00
NAKAMURA Takumi
955efe24ce [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
Will Dietz
2703980be5 Add missing #include's to cctype when using isdigit/alpha/etc.
llvm-svn: 192519
2013-10-12 00:55:57 +00:00
Rafael Espindola
35fe018057 keep only the StringRef version of getFileOrSTDIN.
llvm-svn: 184826
2013-06-25 05:28:34 +00:00
Guy Benyei
92dac48079 Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.
llvm-svn: 175006
2013-02-12 21:21:59 +00:00
Bill Wendling
cd3cef8f1d Update with attribute group IDs.
llvm-svn: 174847
2013-02-10 23:17:10 +00:00
Chris Lattner
8d845237cb switch llvm-bcanalyzer onto the new cursor APIs, allowing deletion of
the old ReadRecord methods.

llvm-svn: 172952
2013-01-20 02:50:32 +00:00
Chris Lattner
e8ec50e5cb fix method name.
llvm-svn: 172921
2013-01-19 21:37:14 +00:00
Chandler Carruth
800daa7d3d Sort the #include lines for tools/...
Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

llvm-svn: 169252
2012-12-04 10:44:52 +00:00
Bill Wendling
74a6d23aba Add back support for reading and parsing 'deplibs'.
This is for backwards compatibility for pre-3.x bc files. The code reads the
code, but does nothing with it.

llvm-svn: 168779
2012-11-28 08:41:48 +00:00
Bill Wendling
bdeb3167f1 Remove the dependent libraries feature.
The dependent libraries feature was never used and has bit-rotted. Remove it.

llvm-svn: 168694
2012-11-27 09:55:56 +00:00
Joerg Sonnenberger
0883439b39 Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

llvm-svn: 166767
2012-10-26 10:49:15 +00:00
Roman Divacky
85348270cd Stop casting away const qualifier needlessly.
llvm-svn: 163258
2012-09-05 22:26:57 +00:00
Jan Wen Voung
dded44f8b5 Fix a bug.
llvm-svn: 163242
2012-09-05 20:56:00 +00:00
Jan Wen Voung
b8aa3ea9c3 revert the additional stuff.
llvm-svn: 163241
2012-09-05 20:55:57 +00:00
Jan Wen Voung
cdc254176c Clean up llvm-bcanalyzer to print to consistent streams.
Avoid interleaving fprintf(stderr,...) and outs() << ...;

Also add a column to show "bytes-per" for each record.

llvm-svn: 163240
2012-09-05 20:55:54 +00:00
Chris Lattner
688f466fd4 fix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for errors).
llvm-svn: 153065
2012-03-19 23:40:48 +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
Bill Wendling
fa3b7c42a8 [unwind removal] Remove a the obsolete 'unwind' enum value.
llvm-svn: 149911
2012-02-06 21:55:35 +00:00
Chris Lattner
d52c923a50 Add bitcode reader and writer support for ConstantDataAggregate, which
should be feature complete now.  Lets see if it works.

llvm-svn: 149215
2012-01-30 00:51:16 +00:00
David Blaikie
8d47bb30e3 Remove unnecessary default cases in switches that cover all enum values.
llvm-svn: 147855
2012-01-10 16:47:17 +00:00
Daniel Dunbar
30d6a45140 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Chad Rosier
e3225d38e4 Update bcanalyzer to handle new USELIST_BLOCK/USELIST_CODE_ENTRY.
llvm-svn: 146079
2011-12-07 21:45:13 +00:00
Chris Lattner
03be469732 remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible back to 3.0
llvm-svn: 145164
2011-11-27 05:48:27 +00:00
Daniel Dunbar
efa02a0c3d LLVMBuild: Add description files for the LLVM tools.
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Chad Rosier
1caee0fa23 Remove some cruft from the BitcodeWriter, while still maintaining backward
compatibility in the BitcodeReader.

llvm-svn: 143598
2011-11-03 00:14:01 +00:00
Daniel Dunbar
81780d9982 build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Chris Lattner
a106725fc5 Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead 
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.  
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

llvm-svn: 134829
2011-07-09 17:41:24 +00:00
Chris Lattner
dd6d168c92 Drop the "2" suffix on some enums.
llvm-svn: 133274
2011-06-17 18:17:37 +00:00
Chris Lattner
04d8431b16 remove support for a bunch of obsolete instruction encodings
and other backward compatibility hacks.

llvm-svn: 133273
2011-06-17 18:09:11 +00:00
Chris Lattner
d59a556c3a Remove some "2" suffixes from the metadata enums now that "1" is gone.
llvm-svn: 133269
2011-06-17 17:50:30 +00:00
Chris Lattner
c7bf0d0128 remove bitcode reader support for LLVM 2.7 metadata encoding.
llvm-svn: 133268
2011-06-17 17:48:53 +00:00
NAKAMURA Takumi
a4eec0fe83 llvm-bcanalyzer.cpp: Tweak format string to suppress warnings on mingw32-g++.
llvm-svn: 127858
2011-03-18 03:21:04 +00:00
Chris Lattner
90800350dd fix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!
llvm-svn: 125367
2011-02-11 05:50:01 +00:00
Michael J. Spencer
86f6a9ac6e MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
Dan Gohman
d5b1cf4bc8 Give CurStreamType's enum a name. This works around what is apparently
a bug in Apple GCC 4.0.

llvm-svn: 121409
2010-12-09 20:35:40 +00:00
Michael J. Spencer
15483143ec Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
llvm-svn: 121379
2010-12-09 17:36:48 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Michael J. Spencer
90f807fda5 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Dan Gohman
a9936d3f97 Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.

llvm-svn: 113557
2010-09-09 23:12:39 +00:00
Dan Gohman
ea23bfd45c Remove an unused command-line option.
llvm-svn: 111367
2010-08-18 17:20:51 +00:00
Dan Gohman
f4d2b52ffe Make llvm-bcanalyzer print out the full enum name for all metadata
code ids, not just some of them.

llvm-svn: 108543
2010-07-16 18:28:07 +00:00
Chris Lattner
c2f273b52d Add special case bitcode support for DebugLoc. This avoids
having the bitcode writer materialize mdnodes for all the
debug location tuples when writing out the bc file and 
stores the information in a more compact form.  For example,
the -O0 -g bc file for combine.c in 176.gcc shrinks from
739392 to 512096 bytes.

This concludes my planned short-term debug info work.

llvm-svn: 100261
2010-04-03 02:17:50 +00:00
Chris Lattner
6fb3f169c8 add a couple missing enum names.
llvm-svn: 100257
2010-04-03 01:05:24 +00:00
Chris Lattner
276811b58a Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Daniel Dunbar
827ef5a368 Make llvm-bcanalyzer percentages more readable.
llvm-svn: 82772
2009-09-25 16:04:21 +00:00
Daniel Dunbar
e963728182 Strip trailing whitespace.
llvm-svn: 82771
2009-09-25 16:03:57 +00:00