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

27 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
Adrian Prantl
076a6683eb Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

  for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done

Differential Revision: https://reviews.llvm.org/D46290

llvm-svn: 331272
2018-05-01 15:54:18 +00:00
Benjamin Kramer
c2de5980d3 Do a sweep over move ctors and remove those that are identical to the default.
All of these existed because MSVC 2013 was unable to synthesize default
move ctors. We recently dropped support for it so all that error-prone
boilerplate can go.

No functionality change intended.

llvm-svn: 284721
2016-10-20 12:20:28 +00:00
George Burgess IV
18a81ad83c [CFLAA] Simplify CFLGraphBuilder. NFC.
This patch simplifies the graph builder by encoding nodes as {Value,
Dereference Level} pairs. This lets us kill edge types, and allows us to
get rid of hacks in StratifiedSets (like addAttrsBelow/...). This
simplification also allows us to remove InstantiatedRelations and
InstantiatedAttrs.

Patch by Jia Chen.

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

llvm-svn: 275122
2016-07-11 22:59:09 +00:00
George Burgess IV
d8c7f2ea26 [CFLAA] Split out more things from CFLSteens. NFC.
"More things" = StratifiedAttrs and various bits like interprocedural
summaries.

Patch by Jia Chen.

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

llvm-svn: 274592
2016-07-06 00:47:21 +00:00
George Burgess IV
c897c1e32a [CFLAA] Split the CFL graph out from CFLSteens. NFC.
Patch by Jia Chen.

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

llvm-svn: 274591
2016-07-06 00:36:12 +00:00
George Burgess IV
6298b8c82e [CFLAA] Propagate StratifiedAttrs in interproc. analysis.
This patch also has a refactor that kills StratifiedAttr, and leaves us
with StratifiedAttrs, because having both was mildly redundant.

This patch makes us correctly handle stratified attributes when doing
interprocedural analysis. It also adds another attribute, AttrCaller,
which acts like AttrUnknown. We can filter out AttrCaller values when
during interprocedural analysis, since the caller should have
information about what arguments it's passing to its callee.

Patch by Jia Chen.

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

llvm-svn: 273636
2016-06-24 01:00:03 +00:00
George Burgess IV
a8e24cd205 Attempt #2 to unbreak bots broken by r273596.
Some of the bots running GCC 4.7 seem to be having trouble with lambdas
that explicitly capture `this`. Relevant-looking bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137

llvm-svn: 273613
2016-06-23 20:59:13 +00:00
George Burgess IV
bc4d541115 [CFLAA] Use better interprocedural function summaries.
Previously, we just unified any arguments that seemed to be related to
each other. With this patch, we now respect dereference levels, etc.
which should make us substantially more accurate. Proper handling of
StratifiedAttrs will be done in a later patch.

Patch by Jia Chen.

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

llvm-svn: 273596
2016-06-23 18:55:23 +00:00
George Burgess IV
8ffcde5567 [CFLAA] Tag arguments as escaped instead of unknown.
This patch also includes some refactoring.

Prior to this patch, we tagged all CFLAA attributes as unknown. This is
suboptimal, since it meant that any Value used as an argument would be
considered to alias any other Value that existed.

Now that we have the machinery to tag sets below the set for an
arbitrary value with attributes, it's okay to be less conservative with
arguments. (Specifically, we still tag the set under an argument with
unknown).

Patch by Jia Chen.

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

llvm-svn: 272690
2016-06-14 18:12:28 +00:00
George Burgess IV
f70bbc0aad [CFLAA] Handle global/arg attrs more sanely.
Prior to this patch, we used argument/global stratified attributes in
order to note that a value could have come from either dereferencing a
global/arg, or from the assignment from a global/arg.

Now, AttrUnknown is placed on sets when we see a dereference, instead of
the global/arg attributes. This allows us to be more aggressive in the
future when we see global/arg attributes without AttrUnknown.

Patch by Jia Chen.

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

llvm-svn: 272335
2016-06-09 23:15:04 +00:00
George Burgess IV
f290b7e77d Attempt #2 to appease the buildbots.
MSVC calls the copy ctor on StratifiedSets for some reason. So,
undelete it.

llvm-svn: 272184
2016-06-08 17:56:35 +00:00
George Burgess IV
cecc1da17f Try to appease buildbots.
r272064 apparently made them angry. This undoes some changes made in
r272064 (defaulting move ctors) to make them happy again.

llvm-svn: 272173
2016-06-08 17:27:14 +00:00
George Burgess IV
f518c20475 [CFLAA] Kill dead code/fix comments in StratifiedSets.
Also use default/delete instead of hand-written ctors.

Thanks to Jia Chen for bringing this stuff up.

llvm-svn: 272064
2016-06-07 21:41:18 +00:00
George Burgess IV
62da20254e [CFLAA] Add AttrEscaped, remove bit twiddling functions.
This patch does a few things:

- Unifies AttrAll and AttrUnknown (since they were used for more or less
  the same purpose anyway).

- Introduces AttrEscaped, an attribute that notes that a value escapes
  our analysis for a given set, but not that an unknown value flows into
  said set.

- Removes functions that take bit indices, since we also had functions
  that took bitsets, and the use of both (with similar names) was
  unclear and bug-prone.

Patch by Jia Chen.

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

llvm-svn: 272040
2016-06-07 18:35:37 +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
George Burgess IV
01989e03ff [CFLAA] Fix up code style a bit. NFC.
llvm-svn: 266262
2016-04-13 23:27:37 +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
David Blaikie
60e6c80905 Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard
library's associative container insert function.

This lead to updating SmallSet::insert to return pair<iterator, bool>,
and then to update SmallPtrSet::insert to return pair<iterator, bool>,
and then to update all the existing users of those functions...

llvm-svn: 222334
2014-11-19 07:49:26 +00:00
Hal Finkel
5c25f70da3 [CFLAA] And even more MSVC fixes
Remove a couple more initializer lists and constexpr dependencies.

llvm-svn: 216998
2014-09-02 23:50:01 +00:00
Hal Finkel
7480b4d2e0 [CFLAA] More cleanup for MSVC
Remove more initializer lists, etc.

llvm-svn: 216994
2014-09-02 23:29:48 +00:00
Hal Finkel
5e34c59d10 [CFLAA] No initializer lists for MSVC
MSVC 2012 does not understand initializer lists; remove them.

llvm-svn: 216991
2014-09-02 22:52:30 +00:00
Hal Finkel
c195a929be [CFLAA] Remove tautological comparison
Fixes this (the warning is right, the unsigned value is not negative):
lib/Analysis/StratifiedSets.h:689:53: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
  bool inbounds(StratifiedIndex N) const { return N >= 0 && N < Links.size(); }

llvm-svn: 216987
2014-09-02 22:36:58 +00:00
Hal Finkel
27b7d42cf2 [CFLAA] LLVM_CONSTEXPR -> const
The number is just a constant, and this should make MSVC happy (or at least
happier).

llvm-svn: 216981
2014-09-02 22:26:06 +00:00
Hal Finkel
38b9f2c79f [CFLAA] constexpr -> LLVM_CONSTEXPR
Attempt to fix the MSVC build by not using constexpr.

llvm-svn: 216979
2014-09-02 22:13:00 +00:00
Hal Finkel
0ad5c26d4b Add a CFL Alias Analysis implementation
This provides an implementation of CFL alias analysis (including some
supporting data structures). Currently, we don't have any extremely fancy
features, sans some interprocedural analysis (i.e. no field sensitivity, etc.),
and we do best sitting behind BasicAA + TBAA. In such a configuration, we take
~0.6-0.8% of total compile time, and give ~7-8% NoAlias responses to queries
TBAA and BasicAA couldn't answer when bootstrapping LLVM. In testing this on
other projects, we've seen up to 10.5% of queries dropped by BasicAA+TBAA
answered with NoAlias by this algorithm.

Patch by George Burgess IV (with minor modifications by me -- mostly adapting
some BasicAA tests), thanks!

llvm-svn: 216970
2014-09-02 21:43:13 +00:00