aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InstCount.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2017-07-18[Analysis] RemoveTotalMemInst counting in InstCount to avoid reading back ↵Craig Topper1-8/+0
other Statistic variables Summary: Previously, we counted TotalMemInst by reading certain instruction counters before and after calling visit and then finding the difference. But that wouldn't be thread safe if this same pass was being ran on multiple threads. This list of "memory instructions" doesn't make sense to me as it includes call/invoke and is missing atomics. This patch removes the counter all together. Reviewers: hfinkel, chandlerc, davide Reviewed By: davide Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D33608 llvm-svn: 308260
2017-06-06Sort the remaining #include lines in include/... and lib/....Chandler Carruth1-2/+1
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
2015-06-23Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko1-1/+1
Apparently, the style needs to be agreed upon first. llvm-svn: 240390
2015-06-19Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko1-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
2014-04-22[Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth1-1/+2
definition below all the header #include lines, lib/Analysis/... edition. This one has a bit extra as there were *other* #define's before #include lines in addition to DEBUG_TYPE. I've sunk all of them as a block. llvm-svn: 206843
2014-04-15[C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper1-1/+1
instead of comparing to nullptr. llvm-svn: 206243
2014-03-06[Layering] Move InstVisitor.h into the IR library as it is prettyChandler Carruth1-1/+1
obviously coupled to the IR. llvm-svn: 203064
2014-03-05[C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper1-3/+3
class. llvm-svn: 202945
2013-01-02Move all of the header files which are involved in modelling the LLVM IRChandler Carruth1-3/+3
into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth1-2/+2
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
2012-11-30Move the InstVisitor utility into VMCore where it belongs. It heavilyChandler Carruth1-1/+1
depends on the IR infrastructure, there is no sense in it being off in Support land. This is in preparation to start working to expand InstVisitor into more special-purpose visitors that are still generic and can be re-used across different passes. The expansion will go into the Analylis tree though as nothing in VMCore needs it. llvm-svn: 168972
2010-10-19Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson1-1/+3
exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
2010-10-07Now with fewer extraneous semicolons!Owen Anderson1-1/+1
llvm-svn: 115996
2010-08-15Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis1-1/+1
llvm-svn: 111102
2010-08-14Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis1-1/+1
llvm-svn: 111082
2010-08-06Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson1-1/+1
llvm-svn: 110460
2010-08-06Revert r110396 to fix buildbots.Owen Anderson1-1/+1
llvm-svn: 110410
2010-08-05Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson1-1/+1
address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
2010-07-21Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson1-2/+2
llvm-svn: 109045
2009-12-23Change dbgs() back to errs() as Chris requested.David Greene1-1/+1
llvm-svn: 92086
2009-12-23Convert debug messages to use dbgs(). Generally this meansDavid Greene1-1/+2
s/errs/dbgs/g except for certain special cases. llvm-svn: 92039
2009-10-26Remove FreeInst.Victor Hernandez1-2/+2
Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
2009-10-25Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky1-1/+0
VISIBILITY_HIDDEN removal. llvm-svn: 85043
2009-10-25Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky1-2/+1
Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
2009-10-17Remove MallocInst from LLVM Instructions.Victor Hernandez1-2/+2
llvm-svn: 84299
2009-08-23Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner1-1/+1
update all code that this affects. llvm-svn: 79830
2009-08-23eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner1-2/+2
This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
2009-07-14llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin1-1/+1
This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
2009-07-11Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin1-1/+2
and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
2009-06-05Remove some unnecessary #includes.Dan Gohman1-1/+0
llvm-svn: 72948
2008-09-04Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman1-1/+1
llvm-svn: 55779
2008-05-13Clean up the use of static and anonymous namespaces. This turned upDan Gohman1-4/+4
several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
2008-03-20Restore isCFGOnly property of various analysis passes.Devang Patel1-1/+1
llvm-svn: 48579
2008-03-19PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel1-2/+2
llvm-svn: 48554
2008-03-19Do not use virtual function to identify an analysis pass.Devang Patel1-5/+1
llvm-svn: 48520
2008-03-18Identify Analysis pass.Devang Patel1-0/+4
Do not run analysis pass again if analysis info is still available. This fixes PR1441. llvm-svn: 48476
2007-12-29Remove attribution from file headers, per discussion on llvmdev.Chris Lattner1-2/+2
llvm-svn: 45418
2007-05-06Fix typo in comment.Nick Lewycky1-1/+1
llvm-svn: 36873
2007-05-03Drop 'const'Devang Patel1-2/+2
llvm-svn: 36662
2007-05-02Use 'static const char' instead of 'static const int'.Devang Patel1-2/+2
Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
2007-05-01Do not use typeinfo to identify pass in pass manager.Devang Patel1-0/+4
llvm-svn: 36632
2007-02-05Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduceReid Spencer1-1/+3
LLVM's footprint and speed up linking. llvm-svn: 33941
2006-12-19eliminate static ctors from StatisticsChris Lattner1-6/+8
llvm-svn: 32697
2006-12-07Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling1-1/+1
now cerr, cout, and NullStream resp. llvm-svn: 32298
2006-12-06Detemplatize the Statistic class. The only type it is instantiated withChris Lattner1-5/+5
is 'unsigned'. llvm-svn: 32279
2006-11-28Removed some of the iostream #includes. Moved towards converting to usingBill Wendling1-2/+3
llvm streams llvm-svn: 31983
2006-08-27Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner1-2/+2
llvm-svn: 29921
2006-01-22Add explicit iostream #includesChris Lattner1-0/+1
llvm-svn: 25513
2005-10-24expose a ctorChris Lattner1-0/+3
llvm-svn: 23924