summaryrefslogtreecommitdiffstats
path: root/clang/test/Profile/cxx-linkage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [PGO] cc1 option name change for profile instrumentationRong Xu2016-02-041-1/+1
| | | | | | | | | | | | This patch changes cc1 option -fprofile-instr-generate to an enum option -fprofile-instrument={clang|none}. It also changes cc1 options -fprofile-instr-generate= to -fprofile-instrument-path=. The driver level option -fprofile-instr-generate and -fprofile-instr-generate= remain intact. This change will pave the way to integrate new PGO instrumentation in IR level. Review: http://reviews.llvm.org/D16730 llvm-svn: 259811
* [PGO] test case cleanupsXinliang David Li2016-01-281-4/+8
| | | | | | | 1. Make test case more focused and robust by focusing on what to be tested (linkage, icall) -- make it easier to validate 2. Testing linkages of data and counter variables instead of names. Counters and data are more relavant to be tested. llvm-svn: 259067
* [PGO] make profile prefix even shorter and more readableXinliang David Li2015-12-151-4/+4
| | | | llvm-svn: 255587
* [PGO] Shorten profile symbol prefixesXinliang David Li2015-12-141-4/+4
| | | | | | | | | | (test case update) Profile symbols have long prefixes which waste space and creating pressure for linker. This patch shortens the prefixes to minimal length without losing verbosity. Differential Revision: http://reviews.llvm.org/D15503 llvm-svn: 255576
* InstrProf: Make profile variables private to reduce binary size overheadJustin Bogner2015-03-201-2/+2
| | | | | | | | | | | | When we instrument a program for profiling, we copy the linkage of an instrumented function so that our datastructures merge in the same way as the function. This avoids redundant copies for things like linkonce, but ends up emitting names we never need to reference for normal and internal symbols. Promoting internal and external linkage to private for these variables reduces the size overhead of profiling drastically. llvm-svn: 232799
* InstrProf: Simplify a couple of tests after r230383Justin Bogner2015-02-241-20/+4
| | | | | | | | | Most of the checks in these two tests were actually testing the behaviour of the instrprof LLVM pass. Now that we're testing that specifically in LLVM's test suite, it's better if we only test the frontend's behaviour here. llvm-svn: 230387
* InstrProf: Use LLVM's -instrprof pass for profilingJustin Bogner2014-12-081-6/+7
| | | | | | | | The logic for lowering profiling counters has been moved to an LLVM pass. Emit the intrinsics rather than duplicating the whole pass in clang. llvm-svn: 223683
* InstrProf: Set profile data to visibility hiddenDuncan P. N. Exon Smith2014-05-161-12/+12
| | | | | | | | | | | | | Shared objects are fairly broken for InstrProf right now -- a follow-up commit in compiler-rt will fix the rest of this. The main problem here is that at link time, profile data symbols in the shared object might get used instead of symbols from the main executable, creating invalid profile data sections. <rdar://problem/16918688> llvm-svn: 208939
* InstrProf: Calculate a better function hashDuncan P. N. Exon Smith2014-04-161-4/+4
| | | | | | | | | | | | | | | | | | The function hash should change when control flow changes. This patch hashes the type of each AST node that affects counters, rather than just counting how many there are. These types are combined into a small enumerator that currently has 16 values. The new hash algorithm packs the enums for consecutively visited types into a `uint64_t`. In order to save space for new types, the types are assumed to be 6-bit values (instead of 4-bit). In order to minimize overhead for functions with little control flow, the `uint64_t` is used directly as a hash if it never fills up; if it does, it's passed through an MD5 context. <rdar://problem/16435801> llvm-svn: 206397
* InstrProf: Emit runtime hook directly in IRGenDuncan P. N. Exon Smith2014-03-281-1/+7
| | | | | | | | | | | | | | | | | | -u behaviour is apparently not portable between linkers (see cfe-commits discussions for r204379 and r205012). I've moved the logic to IRGen, where it should have been in the first place. I don't have a Linux system to test this on, so it's possible this logic *still* doesn't pull in the instrumented profiling runtime on Linux. I'm in the process of getting tests going on the compiler-rt side (llvm-commits "[PATCH] InstrProf: Add initial compiler-rt test"). Once we have tests for the full flow there, the runtime logic should get a whole lot less brittle. <rdar://problem/16458307> llvm-svn: 205023
* PGO: Change runtime prefix from pgo to profileDuncan P. N. Exon Smith2014-03-201-13/+13
| | | | | | | | | | | These functions are in the profile runtime. PGO comes later. Unfortunately, there's only room for 16 characters in a Darwin section, so use __llvm_prf_ instead of __llvm_profile_ for section names. <rdar://problem/15943240> llvm-svn: 204390
* CodeGen: Include a function hash in instrumentation based profilingJustin Bogner2014-03-181-5/+5
| | | | | | | | | The hash itself is still the number of counters, which isn't all that useful, but this separates the API changes from the actual implementation of the hash and will make it easier to transition to the ProfileData library once it's implemented. llvm-svn: 204186
* PGO: Statically generate data structuresDuncan P. N. Exon Smith2014-03-171-0/+30
In instrumentation-based profiling, we need a set of data structures to represent the counters. Previously, these were built up during static initialization. Now, they're shoved into a specially-named section so that they show up as an array. As a consequence of the reorganizing symbols, instrumentation data structures for linkonce functions are now correctly coalesced. This is the first step in a larger project to minimize runtime overhead and dependencies in instrumentation-based profilng. The larger picture includes removing all initialization overhead and making the dependency on libc optional. <rdar://problem/15943240> llvm-svn: 204080
OpenPOWER on IntegriCloud