summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Emit gcov data files to the directory specified in the metadata produced by theNick Lewycky2011-05-041-4/+23
| | | | | | frontend, if applicable. llvm-svn: 130835
* Only read *predecessor once so as to fix a theoretical issue where it changesNick Lewycky2011-04-281-7/+10
| | | | | | | | | | | | | | | | | | | between two reads (threading). Fix an off-by-one in the indirect counter table that I meant to revert after an earlier experiment. Whoops! Implement GCOV_PREFIX. Doesn't handle GCOV_PREFIX_STRIP yet. Fix an off-by-one in string emission. Extra whoops! Tolerate DISubprograms that have null Function*'s attached to them. I don't yet understand what this means, but it happens when you have a global static with a non-trivial constructor/destructor. Fix a crash on switch statements with a single successor (default-only). llvm-svn: 130443
* Rename everything to follow LLVM style ... I think.Nick Lewycky2011-04-261-207/+300
| | | | | | | | | | | | | | Add support for switch and indirectbr edges. This works by densely numbering all blocks which have such terminators, and then separately numbering the possible successors. The predecessors write down a number, the successor knows its own number (as a ConstantInt) and sends that and the pointer to the number the predecessor wrote down to the runtime, who looks up the counter in a per-function table. Coverage data should now be functional, but I haven't tested it on anything other than my 2-file synthetic test program for coverage. llvm-svn: 130186
* In gcov profiling, give all functions an extra unified return block. This isNick Lewycky2011-04-211-5/+17
| | | | | | | necessary since gcov counts transitions between blocks. It can't see if you've run every line in a straight-line function, so we add an edge for it to notice. llvm-svn: 129905
* Fix think-o: emit all 8 bytes of the EOF marker. Also reflow a line in aNick Lewycky2011-04-211-3/+3
| | | | | | comment for 80 columns. llvm-svn: 129904
* Add independent controls for whether GCOV profiling should emit .gcno files orNick Lewycky2011-04-211-4/+16
| | | | | | | instrument the program to emit .gcda. TODO: we should emit slightly different .gcda files when .gcno emission is off. llvm-svn: 129903
* Move the re-stemming function up top and use it where it's currently inlined.Nick Lewycky2011-04-161-15/+25
| | | | | | | | | | Break the arc-profile code out to a function like the notes emission code is, and reorder the functions in the file. The only functionality change is that we no longer modify the Module when the Module has no debug info to use. llvm-svn: 129631
* Rename LineProfiling to GCOVProfiling to more accurately represent what itNick Lewycky2011-04-161-0/+508
does. Also mostly implement it. Still a work-in-progress, but generates legal output on crafted test cases. llvm-svn: 129630
OpenPOWER on IntegriCloud