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

146 Commits

Author SHA1 Message Date
Sanjoy Das
d429dd288c [ADT][CMake][AutoConf] Fail-fast iterators for DenseMap
Summary:
This patch is an attempt at making `DenseMapIterator`s "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host `DenseMap` deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.

Enabling fail-fast iterators breaks the LLVM C++ ABI, so they are
predicated on `LLVM_ENABLE_ABI_BREAKING_CHECKS`.
`LLVM_ENABLE_ABI_BREAKING_CHECKS` by default flips with
`LLVM_ENABLE_ASSERTS`, but can be clamped to ON or OFF using the CMake /
autoconf build system.

Reviewers: chandlerc, dexonsmith, rnk, zturner

Subscribers: llvm-commits

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

llvm-svn: 233310
2015-03-26 19:25:01 +00:00
Adam Nemet
9a119a2574 [docs] Fix copy-and-paste bug in def-use example
This appeared when the example was converted to use range-based loop in
r207755.

llvm-svn: 232509
2015-03-17 17:51:58 +00:00
Justin Bogner
29a9e0dab9 docs: Mention that assertions must be enabled to use the -stats flag
Patch by Rob Stewart. Thanks!

llvm-svn: 230144
2015-02-21 20:53:36 +00:00
Sean Silva
169a4f208a [docs] Use slightly more proper .rst markup
Again, I'd like to emphasize to everyone that this sort of markup change
is *not* what you should be concerned about when writing docs. Focus on
*content*.

I applaud Chandler for focusing on the fantastic content of this new
section!

llvm-svn: 227305
2015-01-28 10:36:41 +00:00
Chandler Carruth
27602132b1 Introduce a section to the programmers manual about type hierarchies,
polymorphism, and virtual dispatch.

This is essentially trying to explain the emerging design techniques
being used in LLVM these days somewhere more accessible than the
comments on a particular piece of infrastructure. It covers the
"concepts-based polymorphism" that caused some confusion during initial
reviews of the new pass manager as well as the tagged-dispatch mechanism
used pervasively in LLVM and Clang.

Perhaps most notably, I've tried to provide some criteria to help
developers choose between these options when designing new pieces of
infrastructure.

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

llvm-svn: 227292
2015-01-28 03:04:54 +00:00
Hans Wennborg
95fbe0c01e ProgrammersManual.rst: fix a typo
llvm-svn: 226367
2015-01-17 03:19:21 +00:00
Sylvestre Ledru
7bf0243f90 Update my previous commit to fit 80 cols...
llvm-svn: 218448
2014-09-25 10:58:16 +00:00
Sylvestre Ledru
6742db270f Details that -debug-only is not available when LLVM is built with --enable-optimized
llvm-svn: 218447
2014-09-25 10:57:00 +00:00
Robin Morisset
e583310c3b Fix typos in comments, NFC
Summary: Just fixing comments, no functional change.

Test Plan: N/A

Reviewers: jfb

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 216784
2014-08-29 21:53:01 +00:00
Hans Wennborg
6372e2f370 ProgrammersManual: the flag is called -debug-only
llvm-svn: 216316
2014-08-23 04:34:58 +00:00
Duncan P. N. Exon Smith
2ae51d315c Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."
This reverts commit r213474 (and r213475), which causes a miscompile on
a stage2 LTO build.  I'll reply on the list in a moment.

llvm-svn: 213562
2014-07-21 17:06:51 +00:00
Manuel Jacob
8e924ddc40 [C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
Summary: This patch introduces two new iterator ranges and updates existing code to use it.  No functional change intended.

Test Plan: All tests (make check-all) still pass.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

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

llvm-svn: 213474
2014-07-20 09:10:11 +00:00
Reid Kleckner
cabffe9de0 Remove rules against std::function from the programmer's manual
Clarify that llvm::function_ref is like StringRef for callables.

llvm-svn: 213326
2014-07-17 22:43:00 +00:00
Duncan P. N. Exon Smith
920db48687 ADT: Add MapVector::remove_if
Add a `MapVector::remove_if()` that erases items in bulk in linear time,
as opposed to quadratic time for repeated calls to `MapVector::erase()`.

llvm-svn: 213090
2014-07-15 20:24:56 +00:00
Duncan P. N. Exon Smith
d7051f69aa ADT: Fix MapVector::erase()
Actually update the changed indexes in the map portion of `MapVector`
when erasing from the middle.  Add a unit test that checks for this.

Note that `MapVector::erase()` is a linear time operation (it was and
still is).  I'll commit a new method in a moment called
`MapVector::remove_if()` that deletes multiple entries in linear time,
which should be slightly less painful.

llvm-svn: 213084
2014-07-15 18:32:30 +00:00
Chandler Carruth
35b7259047 Re-apply r211287: Remove support for LLVM runtime multi-threading.
I'll fix the problems in libclang and other projects in ways that don't
require <mutex> until we sort out the cygwin situation.

llvm-svn: 211900
2014-06-27 15:13:01 +00:00
NAKAMURA Takumi
5859670717 Revert r211287, "Remove support for LLVM runtime multi-threading."
libclang still requires it on cygming, lack of incomplete <mutex>.

llvm-svn: 211592
2014-06-24 13:36:31 +00:00
Zachary Turner
9a5ecb8c07 Remove support for LLVM runtime multi-threading.
After a number of previous small iterations, the functions
llvm_start_multithreaded() and llvm_stop_multithreaded() have
been reduced essentially to no-ops.  This change removes them
entirely.

Reviewed by: rnk, dblaikie

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

llvm-svn: 211287
2014-06-19 18:18:23 +00:00
Zachary Turner
f2125306e7 Kill the LLVM global lock.
This patch removes the LLVM global lock, and updates all existing
users of the global lock to use their own mutex.    None of the
existing users of the global lock were protecting code that was
mutually exclusive with any of the other users of the global
lock, so its purpose was not being met.

Reviewed by: rnk

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

llvm-svn: 211277
2014-06-19 16:17:42 +00:00
Zachary Turner
c472800bde Revert r211066, 211067, 211068, 211069, 211070.
These were committed accidentally from the wrong branch before having
a review sign-off.

llvm-svn: 211072
2014-06-16 22:49:41 +00:00
Zachary Turner
62412c08c3 Programmer's Manual changes.
llvm-svn: 211070
2014-06-16 22:40:48 +00:00
Dan Liew
d70aaf7bb7 Fix a typo made in Programmer's Manual made in r210354. Spotted
by Paul Robinson.

llvm-svn: 210363
2014-06-06 18:44:21 +00:00
Dan Liew
4457237d32 Mention the IRBuilder in Programmer's Manual with a few small examples.
llvm-svn: 210354
2014-06-06 17:25:47 +00:00
Alexey Samsonov
48f8c76a27 Fix markup for -debug-only option
llvm-svn: 210300
2014-06-05 23:12:43 +00:00
Alp Toker
83f29343d8 GraphWriter: detect graph viewer programs at runtime
Replace the crufty build-time configure checks for program paths with
equivalent runtime logic.

This lets users install graphing tools as needed without having to reconfigure
and rebuild LLVM, while eliminating a long chain of inappropriate compile
dependencies that included GUI programs and the windowing system.

Additional features:

 * Support the OS X 'open' command to view graphs generated by any of the
   Graphviz utilities. This is an alternative to the Graphviz OS X UI which is
   no longer available on Mountain Lion.

 * Produce informative log output upon failure to indicate which programs can
   be installed to view graphs.

Ping me if this doesn't work for your particular environment.

llvm-svn: 210001
2014-06-02 01:40:04 +00:00
Richard Smith
7e2199ed8d Update programmers manual to cover llvm::function_ref, and add a note to the
coding standard suggesting using it instead of the (unavailable) std::function.

llvm-svn: 208067
2014-05-06 07:45:39 +00:00
Richard Smith
9b09c391dd Revert accidentally-committed files.
llvm-svn: 208034
2014-05-06 01:46:26 +00:00
Richard Smith
55381ccf0a Re-commit r208025, reverted in r208030, with a fix for a conformance issue
which GCC detects and Clang does not!

llvm-svn: 208033
2014-05-06 01:44:26 +00:00
Yaron Keren
cfca49d424 Updated Doxygen link for InstIterator.h.
llvm-svn: 207906
2014-05-03 12:06:13 +00:00
Yaron Keren
18e58e8a43 InstIterator.h lives in llvm/IR.
llvm-svn: 207903
2014-05-03 11:30:49 +00:00
Yaron Keren
fbcd004fb7 Code style fix from Duncan P. N. Exon Smith.
llvm-svn: 207831
2014-05-02 08:26:30 +00:00
Yaron Keren
4d91bb779b Update post-r203364 http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140303/207915.html
and ranged for loops.

http://reviews.llvm.org/D3582

llvm-svn: 207755
2014-05-01 12:33:26 +00:00
Nico Weber
69fb7a1c3e "Mac OS/X" -> "Mac OS X" spelling fixes for llvm.
Patch from Sean McBride <sean@rogue-research.com>!

llvm-svn: 203258
2014-03-07 18:08:54 +00:00
Chandler Carruth
63713e9f95 [Modules] Move ValueMap to the IR library. While this class does not
directly care about the Value class (it is templated so that the key can
be any arbitrary Value subclass), it is in fact concretely tied to the
Value class through the ValueHandle's CallbackVH interface which relies
on the key type being some Value subclass to establish the value handle
chain.

Ironically, the unittest is already in the right library.

llvm-svn: 202824
2014-03-04 11:26:31 +00:00
Paul Robinson
602bf7c61a Typos. (Test commit.)
llvm-svn: 194720
2013-11-14 18:47:23 +00:00
Benjamin Kramer
f0b52f2712 IR headers moved to llvm/IR some aeons ago, update documentation.
llvm-svn: 185854
2013-07-08 19:59:35 +00:00
Sean Silva
04c7342f29 [docs] The STL "binary search" has a non-obvious name.
std::lower_bound is the canonical "binary search" in the STL
(std::binary_search generally is not what you want). The name actually
makes a lot of sense (and also has a beautiful symmetry with the
std::upper_bound algorithm). The name is nonetheless non-obvious.

Also, remove mention of "radix search". It's not even clear how that
would work in the context of a sorted vector. AFAIK "radix search" only
makes sense when you have a trie-like data structure.

llvm-svn: 178376
2013-03-29 21:57:47 +00:00
Sean Silva
57d35d0952 [docs] Slight reword for precision.
The new wording cannot be construed as suggesting the use of
SmallVectorImpl<T> as e.g. a class member (just because the class
happens to be in an interface).

llvm-svn: 177778
2013-03-22 23:52:38 +00:00
Sean Silva
b845938bd3 [docs] Document usage of SmallVectorImpl in interfaces.
llvm-svn: 177775
2013-03-22 23:41:29 +00:00
Michael Ilseman
ef3b757d74 Docs for SparseMultiSet
llvm-svn: 173092
2013-01-21 21:46:32 +00:00
Dmitri Gribenko
b654055f0c Documentation: replace some non-ASCII characters by equivalent markup
llvm-svn: 172917
2013-01-19 20:34:20 +00:00
Sean Silva
e593654d4f docs: Fix long standing linking antipattern.
Before we learned about :doc:, we used :ref: and put a dummy link at the
top of each page. Don't do that anymore.

This fixes PR14891 as a special case.

llvm-svn: 172162
2013-01-11 02:28:08 +00:00
Chris Lattner
54ebbf925c remove the rest of the "written by" lines in the documentation. It is
against the developer policy to include this sort of thing as SVN blame
already captures this in a far more fine-grained way.

llvm-svn: 172109
2013-01-10 21:24:04 +00:00
Sean Silva
324ad000f4 docs: Fix broken link.
llvm-svn: 169211
2012-12-04 03:45:27 +00:00
Sean Silva
f90055f9cd docs: Fix dead link.
Apparently Dinkumware are no longer hosting their nice reference
manuals. Thankfully, `cppreference.com` can fill that role well.

llvm-svn: 169210
2012-12-04 03:30:36 +00:00
Sean Silva
684c7e3c6b docs: Convert ProgrammersManual to reST.
Patch by Alexander Zinenko!

llvm-svn: 169208
2012-12-04 03:20:08 +00:00