summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/StratifiedSets.h
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | 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
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-10/+10
| | | | | | | | | | | | | | | | 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
* Do a sweep over move ctors and remove those that are identical to the default.Benjamin Kramer2016-10-201-11/+2
| | | | | | | | | | 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
* [CFLAA] Simplify CFLGraphBuilder. NFC.George Burgess IV2016-07-111-34/+1
| | | | | | | | | | | | | | 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
* [CFLAA] Split out more things from CFLSteens. NFC.George Burgess IV2016-07-061-19/+9
| | | | | | | | | | | "More things" = StratifiedAttrs and various bits like interprocedural summaries. Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21964 llvm-svn: 274592
* [CFLAA] Split the CFL graph out from CFLSteens. NFC.George Burgess IV2016-07-061-0/+2
| | | | | | | | Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21963 llvm-svn: 274591
* [CFLAA] Propagate StratifiedAttrs in interproc. analysis.George Burgess IV2016-06-241-6/+9
| | | | | | | | | | | | | | | | | 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
* Attempt #2 to unbreak bots broken by r273596.George Burgess IV2016-06-231-2/+2
| | | | | | | | 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
* [CFLAA] Use better interprocedural function summaries.George Burgess IV2016-06-231-0/+20
| | | | | | | | | | | | | 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
* [CFLAA] Tag arguments as escaped instead of unknown.George Burgess IV2016-06-141-1/+1
| | | | | | | | | | | | | | | | | | | 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
* [CFLAA] Handle global/arg attrs more sanely.George Burgess IV2016-06-091-0/+11
| | | | | | | | | | | | | | | | 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
* Attempt #2 to appease the buildbots.George Burgess IV2016-06-081-3/+3
| | | | | | | MSVC calls the copy ctor on StratifiedSets for some reason. So, undelete it. llvm-svn: 272184
* Try to appease buildbots.George Burgess IV2016-06-081-3/+8
| | | | | | | r272064 apparently made them angry. This undoes some changes made in r272064 (defaulting move ctors) to make them happy again. llvm-svn: 272173
* [CFLAA] Kill dead code/fix comments in StratifiedSets.George Burgess IV2016-06-071-87/+23
| | | | | | | | Also use default/delete instead of hand-written ctors. Thanks to Jia Chen for bringing this stuff up. llvm-svn: 272064
* [CFLAA] Add AttrEscaped, remove bit twiddling functions.George Burgess IV2016-06-071-14/+0
| | | | | | | | | | | | | | | | | | | | | 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
* [NFC] Header cleanupMehdi Amini2016-04-181-3/+0
| | | | | | | | | | | | | | 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
* [CFLAA] Fix up code style a bit. NFC.George Burgess IV2016-04-131-167/+164
| | | | llvm-svn: 266262
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | 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
* Update SetVector to rely on the underlying set's insert to return a ↵David Blaikie2014-11-191-1/+1
| | | | | | | | | | | | | 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
* [CFLAA] And even more MSVC fixesHal Finkel2014-09-021-2/+1
| | | | | | Remove a couple more initializer lists and constexpr dependencies. llvm-svn: 216998
* [CFLAA] More cleanup for MSVCHal Finkel2014-09-021-2/+2
| | | | | | Remove more initializer lists, etc. llvm-svn: 216994
* [CFLAA] No initializer lists for MSVCHal Finkel2014-09-021-2/+3
| | | | | | MSVC 2012 does not understand initializer lists; remove them. llvm-svn: 216991
* [CFLAA] Remove tautological comparisonHal Finkel2014-09-021-1/+1
| | | | | | | | 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
* [CFLAA] LLVM_CONSTEXPR -> constHal Finkel2014-09-021-1/+1
| | | | | | | The number is just a constant, and this should make MSVC happy (or at least happier). llvm-svn: 216981
* [CFLAA] constexpr -> LLVM_CONSTEXPRHal Finkel2014-09-021-2/+3
| | | | | | Attempt to fix the MSVC build by not using constexpr. llvm-svn: 216979
* Add a CFL Alias Analysis implementationHal Finkel2014-09-021-0/+691
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
OpenPOWER on IntegriCloud