summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-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
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-8/+8
| | | | | | single attribute in the future. llvm-svn: 170502
* Initialize NoRedZone and remove unused default values.Rafael Espindola2012-12-181-3/+4
| | | | llvm-svn: 170404
* Don't use a red zone for code coverage if the user specified `-mno-red-zone'.Bill Wendling2012-12-101-4/+17
| | | | | | | | | The `-mno-red-zone' flag wasn't being propagated to the functions that code coverage generates. This allowed some of them to use the red zone when that wasn't allowed. <rdar://problem/12843084> llvm-svn: 169754
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-6/+6
| | | | | | | | | | | | | | | | | 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
* Plug a memory leak in the GCOV profiling emitter, which never released the ↵Benjamin Kramer2012-11-171-5/+5
| | | | | | edge table memory. llvm-svn: 168259
* Back out r166591, not sure why this made it through since I cancelled the ↵Micah Villmow2012-10-241-4/+3
| | | | | | command. Bleh, sorry about this! llvm-svn: 166596
* Delete a directory that wasn't supposed to be checked in yet.Micah Villmow2012-10-241-3/+4
| | | | llvm-svn: 166591
* Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling2012-10-101-6/+2
| | | | | | attribute object and add it appropriately. No functionality change. llvm-svn: 165595
* Use the enum value of the attributes when adding them to the attributes builder.Bill Wendling2012-10-091-2/+2
| | | | llvm-svn: 165494
* Convert to using the Attributes::Builder interface.Bill Wendling2012-10-091-2/+6
| | | | llvm-svn: 165465
* s/__llvm_gcov_flush/__gcov_flush/gBill Wendling2012-09-171-4/+4
| | | | llvm-svn: 164040
* Remove comment.Bill Wendling2012-09-141-1/+1
| | | | llvm-svn: 163945
* Use Nick's suggestion of storing a large NULL into the GV instead of memset, ↵Bill Wendling2012-09-131-18/+10
| | | | | | which requires TargetData. llvm-svn: 163799
* Introduce the __llvm_gcov_flush function.Bill Wendling2012-09-131-6/+56
| | | | | | | | | | This function writes out the current values of the counters and then resets them. This can be used similarly to the __gcov_flush function to sync the counters when need be. For instance, in a situation where the application doesn't exit. <rdar://problem/12185886> llvm-svn: 163757
* Pass by pointer and not std::string.Bill Wendling2012-08-301-2/+2
| | | | llvm-svn: 162888
* Revert r162855 in favor of changing clang to emit the absolute coverage file ↵Bill Wendling2012-08-301-19/+7
| | | | | | path. llvm-svn: 162883
* Use the full path to output the .gcda file.Bill Wendling2012-08-291-7/+19
| | | | | | | | This lets the user run the program from a different directory and still have the .gcda files show up in the correct place. <rdar://problem/12179524> llvm-svn: 162855
* Use ArrayRef instead of SmallVector when passing vector into function.Bill Wendling2012-08-291-4/+3
| | | | llvm-svn: 162851
* Don't reinsert the 'atexit' function if it already exists.Bill Wendling2012-06-301-2/+1
| | | | llvm-svn: 159491
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-9/+9
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-281-1/+1
| | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-1/+1
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* Register the gcov "writeout" at init time. Don't list this as a d'tor. Instead,Bill Wendling2012-06-011-2/+22
| | | | | | | | | | | | inject some code in that will run via the "__mod_init_func" method that registers the gcov "writeout" function to execute at exit time. The problem is that the "__mod_term_func" method of specifying d'tors is deprecated on Darwin. And it can lead to some ambiguities when dealing with multiple libraries. <rdar://problem/11110106> llvm-svn: 157852
* Implement the indirect counter increment code in a better way. Instead ofBill Wendling2012-05-281-53/+72
| | | | | | | | replicating the code for every place it's needed, we instead generate a function that does that for us. This function is local to the executable, so there shouldn't be any writing violations. llvm-svn: 157564
* The llvm_gcda_increment_indirect_counter function writes to the arguments thatBill Wendling2012-05-251-17/+57
| | | | | | | | | | | | | | are passed in. However, those arguments may be in a write-protected area, as far as the runtime library is concerned. For instance, the data could be placed into a 'linkedit' section, which isn't writable. Emit the code from llvm_gcda_increment_indirect_counter directly into the function instead. Note: The code for this is ugly, and can lead to bloat. We should look into simplifying this code instead of having all of these branches. <rdar://problem/11181370> llvm-svn: 157505
* Expose a switch for the new gcov format.Nick Lewycky2011-12-061-2/+3
| | | | llvm-svn: 145880
* Place the "cfg checksum" around a test. This was recently added in April 2011 toNick Lewycky2011-11-271-67/+67
| | | | | | | | | | | | | gcc, though I thought it was older (my gcc 4.4 has it as a local patch. Whoops!) This fixes PR10589. Also add some debugging statements. Remove GcnoFiles, the mapping from CompilationUnit to raw_ostream. Now that we start by iterating over each CU and descending into them, there's no need to maintain a mapping. llvm-svn: 145208
* If simple ownership works then friendship is not required.Devang Patel2011-09-201-2/+1
| | | | llvm-svn: 140169
* Update GCOVLines to provide interfaces to write line table and calculate ↵Devang Patel2011-09-201-13/+17
| | | | | | complete length. llvm-svn: 140167
* Update comment.Devang Patel2011-09-201-2/+1
| | | | llvm-svn: 140156
* Use StringRef instead of std::string.Devang Patel2011-09-201-1/+1
| | | | llvm-svn: 140154
* Eliminate unnecessary copy of FileName from GCOVLines. Devang Patel2011-09-201-7/+6
| | | | | | GCOVLines is always accessed through a StringMap where the key is FileName. llvm-svn: 140151
* There is no need to write a local utility routine to find subprogram info if ↵Devang Patel2011-09-201-10/+1
| | | | | | the utility routine is already available in DebugInfo. llvm-svn: 140145
* The edge from DISubprogram to DICompileUnit has been removed in recent versionsNick Lewycky2011-08-181-1/+1
| | | | | | of debug info. llvm-svn: 137972
* Do not use DebugInfoFinder. Extract debug info directly from llvm.dbg.cu ↵Devang Patel2011-08-171-159/+162
| | | | | | named mdnode. llvm-svn: 137890
* Use the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>'Bill Wendling2011-08-161-2/+2
| | | | | | check for a LandingPadInst. llvm-svn: 137745
* A few places where we want to skip the landingpad instruction for insertion.Bill Wendling2011-08-161-1/+3
| | | | llvm-svn: 137712
* Use the correct for for the version. It's little endian and my brain isBill Wendling2011-07-261-1/+1
| | | | | | | obviously big endian. :-) PR10502 llvm-svn: 136111
* Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to useJay Foad2011-07-221-2/+1
| | | | | | ArrayRef. llvm-svn: 135761
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-10/+10
| | | | llvm-svn: 135375
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-5/+4
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp llvm-svn: 134949
* De-constify Types in FunctionType::get().Jay Foad2011-07-111-5/+4
| | | | llvm-svn: 134888
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-221-2/+2
| | | | | | that takes an ArrayRef. llvm-svn: 133615
* Conditionalize the format of the GCOV files by target type. Darwin uses the 4.2Bill Wendling2011-05-171-10/+19
| | | | | | format. llvm-svn: 131503
* The computation of string length is not that complicated. Fix it, again. :)Nick Lewycky2011-05-051-1/+1
| | | | llvm-svn: 130967
* Update the gcov version used slightly, to make it stop causing modern gcov's toNick Lewycky2011-05-051-13/+20
| | | | | | crash. llvm-svn: 130911
* Remove dead function.Nick Lewycky2011-05-051-5/+0
| | | | llvm-svn: 130903
* When the path wasn't emitted by the frontend, discard any path on the sourceNick Lewycky2011-05-051-6/+11
| | | | | | filename. llvm-svn: 130897
OpenPOWER on IntegriCloud