summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
Commit message (Collapse)AuthorAgeFilesLines
...
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-122-6/+5
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-122-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-111-1/+1
| | | | llvm-svn: 134893
* 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
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-201-1/+2
| | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
* fix the varargs version of StructType::get to not require an LLVMContext, ↵Chris Lattner2011-06-181-1/+1
| | | | | | | | making usage much cleaner. llvm-svn: 133364
* 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
* Remove unused variables caught by GCC's -Wunused-but-set-variable.Benjamin Kramer2011-05-031-2/+0
| | | | llvm-svn: 130755
* 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
* Remove unused STL header includes.Jay Foad2011-04-232-2/+0
| | | | llvm-svn: 130068
* 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
* Mark some functions as used which are used within debug-only code. ThisChandler Carruth2011-04-181-0/+3
| | | | | | silences Clang's -Wunused-function when building in release mode. llvm-svn: 129709
* Fix cmake build.Rafael Espindola2011-04-161-1/+1
| | | | llvm-svn: 129632
* 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-163-218/+509
| | | | | | | does. Also mostly implement it. Still a work-in-progress, but generates legal output on crafted test cases. llvm-svn: 129630
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* lib/Transforms/Instrumentation/CMakeLists.txt: Add LineProfiling.cpp to fix ↵NAKAMURA Takumi2011-04-121-0/+1
| | | | | | up r129340. llvm-svn: 129343
* Add support for line profiling. Very work-in-progress.Nick Lewycky2011-04-122-0/+218
| | | | | | | | | | Use debug info in the IR to find the directory/file:line:col. Each time that location changes, bump a counter. Unlike the existing profiling system, we don't try to look at argv[], and thusly don't require main() to be present in the IR. This matches GCC's technique where you specify the profiling flag when producing each .o file. The runtime library is minimal, currently just calling printf at program shutdown time. The API is designed to make it possible to emit GCOV data later on. llvm-svn: 129340
* Consider ConstantAggregateZero as well as ConstantArray/Struct.Nick Lewycky2011-04-121-5/+7
| | | | llvm-svn: 129338
* Don't include Operator.h from InstrTypes.h.Jay Foad2011-04-111-0/+1
| | | | llvm-svn: 129271
* Add a function for profiling to run at shutdown. Unlike the existing API, thisNick Lewycky2011-04-082-3/+40
| | | | | | | can be used even when main() isn't present in the Module, but it means that you don't get to read argv[]. llvm-svn: 129163
* Fix typos. Adjust some whitespace for style. No functionality change.Nick Lewycky2011-04-052-14/+14
| | | | llvm-svn: 128924
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+2
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-2/+4
| | | | llvm-svn: 128535
* Implementation of path profiling.Andrew Trick2011-01-297-17/+1448
| | | | | | | | | | Modified patch by Adam Preuss. This builds on the existing framework for block tracing, edge profiling and optimal edge profiling. See -help-hidden for new flags. For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs. llvm-svn: 124515
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-192-2/+6
| | | | | | | | | | | | | | | | | 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
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-1/+6
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-072-2/+2
| | | | llvm-svn: 115996
* Add initialization routines for Instrumentation.Owen Anderson2010-10-072-0/+32
| | | | llvm-svn: 115971
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-131-6/+0
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-101-0/+6
| | | | llvm-svn: 113632
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-062-2/+2
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-062-2/+2
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-052-2/+2
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-212-5/+5
| | | | llvm-svn: 109045
* use setArgOperandGabor Greif2010-06-281-6/+6
| | | | llvm-svn: 107004
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-4/+4
| | | | llvm-svn: 106542
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-4/+4
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-4/+4
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-4/+4
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-4/+4
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
OpenPOWER on IntegriCloud