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

34 Commits

Author SHA1 Message Date
Chandler Carruth
ae65e281f3 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
Fangrui Song
121474a01b Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h}

llvm-svn: 338293
2018-07-30 19:41:25 +00:00
Eugene Zelenko
aaba089afd [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 312679
2017-09-06 23:05:38 +00:00
Mehdi Amini
9ff867f98c [NFC] Header cleanup
Removed some unused headers, replaced some headers with forward class declarations.

Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'

Patch by Eugene Kosov <claprix@yandex.ru>

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266595
2016-04-18 09:17:29 +00:00
Eric Christopher
359dea2a6b Reorganize the C API headers to improve build times.
Type specific declarations have been moved to Type.h and error handling
routines have been moved to ErrorHandling.h. Both are included in Core.h
so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.

llvm-svn: 255965
2015-12-18 01:46:52 +00:00
Alexander Kornienko
f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/


Thanks to Eugene Kosov for the original patch!

llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Erik Eckstein
a768d0b66c Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization.
llvm-svn: 231385
2015-03-05 17:53:00 +00:00
Reid Kleckner
866d12fa1e Add missing <atomic> include to PassRegistry.h
llvm-svn: 231277
2015-03-04 19:06:17 +00:00
Erik Eckstein
87c75844aa Add a lock() function in PassRegistry to speed up multi-thread synchronization.
When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes.
This speeds up multithreaded llvm execution by ~5% (tested with 4 threads).
In an asserts build of llvm this has an even bigger impact.

Note that it's not required to use the lock function.

llvm-svn: 231276
2015-03-04 18:57:11 +00:00
Chandler Carruth
c2e5aca058 [PM] Remove an unused and rather expensive mapping from an analysis
group's interface to all of the implementations of that analysis group.
The groups themselves can and do manage this anyways, the pass registry
needn't involve itself.

llvm-svn: 219097
2014-10-06 00:30:59 +00:00
Chandler Carruth
c9860adb9f [PM] Remove the (deeply misguided) 'unregister' functionality from the
pass registry.

This style of registry is somewhat questionable, but it being
non-monotonic is crazy. No one is (or should be) unloading DSOs with
passes and unregistering them here. I've checked with a few folks and
I don't know of anyone using this functionality or any important use
case where it is necessary.

llvm-svn: 219096
2014-10-06 00:13:25 +00:00
Chandler Carruth
6fb719686c [cleanup] Fix up trailing whitespace and formatting in the pass regitsry
code prior to hacking on it more significantly.

llvm-svn: 219094
2014-10-05 23:59:03 +00:00
Zachary Turner
886b0eebc0 Remove pimpl class from PassRegistry.
Since removeRegistrationListener is no longer called during static
destruction, we can get rid of the pimpl in PassRegistry.

This should clean up the code somewhat, increase clarity, and also
allows us to put the Lock as a member of the class, instead of as a
ManagedStatic.

As part of this change, the PassInfo class is moved from
PassSupport.h to its own file, to eliminate the otherwise circular
header dependency between PassRegistry.h and PassSupport.h

Reviewed by: rnk, dblaikie

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

llvm-svn: 210793
2014-06-12 16:06:51 +00:00
Craig Topper
457de03c6e [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 205831
2014-04-09 06:08:46 +00:00
Chandler Carruth
87f14b4eec Re-sort all of the includes with ./utils/sort_includes.py so that
subsequent changes are easier to review. About to fix some layering
issues, and wanted to separate out the necessary churn.

Also comment and sink the include of "Windows.h" in three .inc files to
match the usage in Memory.inc.

llvm-svn: 198685
2014-01-07 11:48:04 +00:00
Filip Pizlo
dd62846c56 This patch breaks up Wrap.h so that it does not have to include all of
the things, and renames it to CBindingWrapping.h.  I also moved 
CBindingWrapping.h into Support/.

This new file just contains the macros for defining different wrap/unwrap 
methods.

The calls to those macros, as well as any custom wrap/unwrap definitions 
(like for array of Values for example), are put into corresponding C++ 
headers.

Doing this required some #include surgery, since some .cpp files relied 
on the fact that including Wrap.h implicitly caused the inclusion of a 
bunch of other things.

This also now means that the C++ headers will include their corresponding 
C API headers; for example Value.h must include llvm-c/Core.h.  I think 
this is harmless, since the C API headers contain just external function 
declarations and some C types, so I don't believe there should be any 
nasty dependency issues here.

llvm-svn: 180881
2013-05-01 20:59:00 +00:00
Owen Anderson
9e9ae1b048 Attempt to fix valgrind complaining about (benign) leaks in pass registration by having PassRegistry
delete PassInfo objects that were created using new-style initialization.

llvm-svn: 116959
2010-10-20 22:22:30 +00:00
Owen Anderson
56bc6a9391 Do not expose the locking for the PassRegistry in the header. Be careful to
synchronize any method that might lazily initialize the pImpl.

llvm-svn: 114130
2010-09-16 23:32:35 +00:00
Owen Anderson
445e4de610 Since PassRegistry is currently a shared global object, it needs locking. While it might intuitively seem
that all the setup of this class currently happens at static initialization time, this misses the fact
that some later events can cause mutation of the PassRegistrationListeners list, and thus cause race issues.

llvm-svn: 114036
2010-09-15 23:03:33 +00:00
Owen Anderson
ae195f79a4 Minimize #includes in a top-level header.
llvm-svn: 113772
2010-09-13 18:47:42 +00:00
Owen Anderson
94ae132fc8 Fix PR7972, in which the PassRegistry was being leaked. As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.

llvm-svn: 113283
2010-09-07 20:48:10 +00:00
Owen Anderson
7d56c30119 Properly initialize the pImpl member of PassRegistry to zero.
llvm-svn: 113264
2010-09-07 20:13:48 +00:00
Owen Anderson
f7efa840f0 Add doxygen comments for PassRegistry.
llvm-svn: 113262
2010-09-07 20:04:26 +00:00
Owen Anderson
e15120e561 Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.

llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Chris Lattner
92429b2601 fix inconsistent formatting.
llvm-svn: 113121
2010-09-05 22:43:56 +00:00
Owen Anderson
f2fea95f2f Reapply r110396, with fixes to appease the Linux buildbot gods.
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Owen Anderson
f26c7a852f Move the smarts of AnalysisGroup registration into PassRegistry.
llvm-svn: 109019
2010-07-21 17:52:45 +00:00
Owen Anderson
6265d52037 Move the handling of PassRegistrationListener's to PassRegistry.
llvm-svn: 108966
2010-07-20 23:41:56 +00:00
Owen Anderson
2aafb91721 Move more functionality from Pass.cpp to PassRegistry.cpp. This global will go away eventually, but for now we still need it around.
llvm-svn: 108932
2010-07-20 21:22:24 +00:00
Owen Anderson
6db80f9d90 I just fail with SVN today.
llvm-svn: 108888
2010-07-20 19:23:55 +00:00
Owen Anderson
92386f258c Oops.
llvm-svn: 108885
2010-07-20 18:53:25 +00:00