summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid copies of std::strings and APInt/APFloats where we only read from itBenjamin Kramer2016-06-081-2/+2
| | | | | | | | As suggested by clang-tidy's performance-unnecessary-copy-initialization. This can easily hit lifetime issues, so I audited every change and ran the tests under asan, which came back clean. llvm-svn: 272126
* [PM] Port GCOVProfiler pass to the new pass managerXinliang David Li2016-06-051-1/+13
| | | | llvm-svn: 271823
* [PM] code refactoring /NFCXinliang David Li2016-06-052-73/+83
| | | | llvm-svn: 271822
* [pgo] extend r271532 to darwin platformXinliang David Li2016-06-031-4/+4
| | | | llvm-svn: 271746
* [esan|wset] Optionally assume intra-cache-line accessesDerek Bruening2016-06-031-2/+16
| | | | | | | | | | | | | | | | | | Summary: Adds an option -esan-assume-intra-cache-line which causes esan to assume that a single memory access touches just one cache line, even if it is not aligned, for better performance at a potential accuracy cost. Experiments show that the performance difference can be 2x or more, and accuracy loss is typically negligible, so we turn this on by default. This currently applies just to the working set tool. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits Differential Revision: http://reviews.llvm.org/D20978 llvm-svn: 271743
* [esan] Specify which tool via a global variableDerek Bruening2016-06-031-0/+13
| | | | | | | | | | | | | | | Summary: Adds a global variable to specify the tool, to support handling early interceptors that invoke instrumented code and require shadow memory to be initialized prior to __esan_init() being invoked. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits Differential Revision: http://reviews.llvm.org/D20973 llvm-svn: 271715
* [esan|cfrag] Instrument GEP instr for struct field access.Qin Zhao2016-06-031-0/+61
| | | | | | | | | | | | | | | | | Summary: Instrument GEP instruction for counting the number of struct field address calculation to approximate the number of struct field accesses. Adds test struct_field_count_basic.ll to test the struct field instrumentation. Reviewers: bruening, aizatsky Subscribers: junbuml, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening Differential Revision: http://reviews.llvm.org/D20892 llvm-svn: 271619
* [esan|cfrag] Create the cfrag struct array for the runtimeQin Zhao2016-06-021-5/+115
| | | | | | | | | | | | | | Summary: Fills the cfrag struct variable with an array of struct information variables. Reviewers: aizatsky, bruening Subscribers: bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin Differential Revision: http://reviews.llvm.org/D20661 llvm-svn: 271547
* [profile] value profiling bug fix -- missing icall targets in profile-useXinliang David Li2016-06-021-1/+7
| | | | | | | | | | | | | | | | | Inline virtual functions has linkeonceodr linkage (emitted in comdat on supporting targets). If the vtable for the class is not emitted in the defining module, function won't be address taken thus its address is not recorded. At the mercy of the linker, if the per-func prf_data from this module (in comdat) is picked at link time, we will lose mapping from function address to its hash val. This leads to missing icall promotion. The second test case (currently disabled) in compiler_rt (r271528): instrprof-icall-prom.test demostrates the bug. The first profile-use subtest is fine due to linker order difference. With this change, no missing icall targets is found in instrumented clang's raw profile. llvm-svn: 271532
* make icall pass name consistent /NFCXinliang David Li2016-06-021-3/+3
| | | | llvm-svn: 271467
* [asan] Rename *UAR* into *UseAfterReturn*Vitaly Buka2016-06-021-7/+7
| | | | | | | | | | | | | | | Summary: To improve readability. PR27453 Reviewers: kcc, eugenis, aizatsky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20761 llvm-svn: 271447
* [esan|cfrag] Create the skeleton of cfrag variable for the runtimeQin Zhao2016-05-311-19/+90
| | | | | | | | | | | | | | | | | Summary: Creates a global variable containing preliminary information for the cache-fragmentation tool runtime. Passes a pointer to the variable (null if no variable is created) to the compilation unit init and exit routines in the runtime. Reviewers: aizatsky, bruening Subscribers: filcab, kubabrecka, bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin Differential Revision: http://reviews.llvm.org/D20541 llvm-svn: 271298
* Add a comment about why we need to buffer the attribute changes.Sean Silva2016-05-281-0/+3
| | | | llvm-svn: 271097
* Small cleanup.Sean Silva2016-05-281-6/+6
| | | | | | | Centralize assertion. Clean up max loop. llvm-svn: 271094
* Inline this into its only use. NFC.Sean Silva2016-05-281-10/+5
| | | | | | | The name was out of date at this point and it seems simple enough to have in-line. llvm-svn: 271093
* Bring back r271090 in a way that doesn't depend on r271089.Sean Silva2016-05-281-0/+1
| | | | llvm-svn: 271092
* Revert r271089 and r271090.Sean Silva2016-05-281-30/+43
| | | | | | | | | | | | | | It was triggering an msan bot. Revert "[IRPGO] Set the function entry count metadata." This reverts commit r271090. Revert "[IRPGO] Centralize the function attribute inliner hint logic. NFC." This reverts commit r271089. llvm-svn: 271091
* [IRPGO] Set the function entry count metadata.Sean Silva2016-05-281-0/+1
| | | | llvm-svn: 271090
* [IRPGO] Centralize the function attribute inliner hint logic. NFC.Sean Silva2016-05-281-43/+29
| | | | | | This keeps the logic in the same function. llvm-svn: 271089
* [asan] Add option to enable asan-use-after-scope from clang.Vitaly Buka2016-05-271-5/+10
| | | | | | | | | | | | | | Clang will have -fsanitize-address-use-after-scope flag. PR27453 Reviewers: kcc, eugenis, aizatsky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20750 llvm-svn: 271067
* Use StringRef::startswith instead of find(...) == 0.Benjamin Kramer2016-05-271-3/+3
| | | | | | It's faster and easier to read. llvm-svn: 271018
* Reapply r270865 -- previous bot failure is unrelatedXinliang David Li2016-05-271-1/+1
| | | | llvm-svn: 271014
* Apply clang-tidy's misc-move-constructor-init throughout LLVM.Benjamin Kramer2016-05-271-2/+2
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270997
* Attach profile summary in IR based instrumentation pass.Easwaran Raman2016-05-261-1/+8
| | | | | | Differential revision: http://reviews.llvm.org/D20655 llvm-svn: 270933
* Revert 270865 -- unexplained bot failure on linux/ppcleXinliang David Li2016-05-261-1/+1
| | | | llvm-svn: 270876
* Use new interface in Triple /NFCXinliang David Li2016-05-261-1/+1
| | | | llvm-svn: 270865
* Use new triple API to check if comdat is supportedXinliang David Li2016-05-251-1/+1
| | | | llvm-svn: 270727
* [X86][SSE] Replace (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) lossless conversion ↵Simon Pilgrim2016-05-251-2/+0
| | | | | | | | | | intrinsics with generic IR Followup to D20528 clang patch, this removes the (V)CVTDQ2PD(Y) and (V)CVTPS2PD(Y) llvm intrinsics and auto-upgrades to sitofp/fpext instead. Differential Revision: http://reviews.llvm.org/D20568 llvm-svn: 270678
* [esan|wset] EfficiencySanitizer working set tool fastpathDerek Bruening2016-05-251-0/+104
| | | | | | | | | | | | | | | | | Summary: Adds fastpath instrumentation for esan's working set tool. The instrumentation for an intra-cache-line load or store consists of an inlined write to shadow memory bits for the corresponding cache line. Adds a basic test for this instrumentation. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits Differential Revision: http://reviews.llvm.org/D20483 llvm-svn: 270640
* [esan] Add calls from the ctor/dtor to the runtime libraryDerek Bruening2016-05-241-5/+42
| | | | | | | | | | | | | | | | | | | | | Summary: Adds createEsanInitToolGV for creating a tool-specific variable passed to the runtime library. Adds dtor "esan.module_dtor" and inserts calls from the dtor to "__esan_exit" in the runtime library. Updates the EfficiencySanitizer test. Patch by Qin Zhao. Reviewers: aizatsky Subscribers: bruening, kcc, vitalybuka, eugenis, llvm-commits Differential Revision: http://reviews.llvm.org/D20488 llvm-svn: 270627
* [profile] Fix runtime hook linkage bug for COFFXinliang David Li2016-05-241-0/+2
| | | | | | | | | Patch by: Johan Engelen the user hook has linkonceODR linkage and it needs to be in comdatAny group. llvm-svn: 270596
* tune lowering parameter for small apps (sjeng)Xinliang David Li2016-05-231-2/+3
| | | | llvm-svn: 270480
* [profile] Static counter allocation for value profiling (part-1)Xinliang David Li2016-05-211-12/+96
| | | | | | Differential Revision: http://reviews.llvm.org/D20459 llvm-svn: 270336
* [esan] Use ModulePass for EfficiencySanitizerPass.Derek Bruening2016-05-201-9/+17
| | | | | | | | | | | | | | | | | Summary: Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to better support global variable creation for a forthcoming struct field counter tool. Patch by Qin Zhao. Reviewers: aizatsky Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc Differential Revision: http://reviews.llvm.org/D20458 llvm-svn: 270263
* Retry^3 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-192-20/+27
| | | | | | | | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Changes since the initial commit: - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. - Remove the base ProfError class to work around an MSVC ICE. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 270020
* minor cleanup /NFCXinliang David Li2016-05-171-4/+2
| | | | llvm-svn: 269839
* Simple refactoring /NFCXinliang David Li2016-05-171-8/+15
| | | | llvm-svn: 269829
* Revert "Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""Vedant Kumar2016-05-162-27/+20
| | | | | | | | This reverts commit r269694. MSVC says: error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition llvm-svn: 269700
* Retry^2 "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-162-20/+27
| | | | | | | | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Changes since the initial commit: - Address undefined-var-template warning. - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269694
* [PM] Port indirect call promotion pass to new pass managerXinliang David Li2016-05-161-0/+9
| | | | llvm-svn: 269660
* Move helper classes into anonymous namespaces. NFC.Benjamin Kramer2016-05-151-0/+2
| | | | llvm-svn: 269591
* Rename pass name to prepare to new PM porting /NFCXinliang David Li2016-05-152-9/+11
| | | | llvm-svn: 269586
* Revert "Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC""Chandler Carruth2016-05-142-27/+20
| | | | | | | This reverts commit r269491. It triggers warnings with Clang, breaking builds for -Werror users including several build bots. llvm-svn: 269547
* [MSan] [PowerPC] Implement PowerPC64 vararg helper.Marcin Koscielnicki2016-05-131-0/+161
| | | | | | Differential Revision: http://reviews.llvm.org/D20000 llvm-svn: 269518
* Retry "[ProfileData] (llvm) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-132-20/+27
| | | | | | | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Changes since the initial commit: - Fix error message printing in llvm-profdata. - Check errors in loadTestingFormat() + annotateAllFunctions(). - Defer error handling in InstrProfIterator to InstrProfReader. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269491
* Revert "(HEAD -> master, origin/master, origin/HEAD) [ProfileData] (llvm) ↵Vedant Kumar2016-05-132-27/+20
| | | | | | | | Use Error in InstrProf and Coverage, NFC" This reverts commit r269462. It fails two llvm-profdata tests. llvm-svn: 269466
* [ProfileData] (llvm) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-132-20/+27
| | | | | | | | | Transition InstrProf and Coverage over to the stricter Error/Expected interface. Differential Revision: http://reviews.llvm.org/D19901 llvm-svn: 269462
* [PGO] Add flags to control IRPGO warnings.Rong Xu2016-05-131-3/+18
| | | | | | | | | | | | | Currently there is no reasonable way to control the warnings in the 'use' phase of the IRPGO pass. This is problematic because the output can be somewhat spammy. This patch adds some flags which allow us to optionally disable these warnings. The current upstream behavior will remain the default. Patch by Jake VanAdrighem (jvanadrighem@gmail.com) Differential Revision: http://reviews.llvm.org/D20195 llvm-svn: 269437
* Return a StringRef from getSection.Rafael Espindola2016-05-111-1/+1
| | | | | | This is similar to how getName is handled. llvm-svn: 269218
* [PGO] Use WeakAny linkage for __llvm_profile_raw_versionRong Xu2016-05-111-1/+1
| | | | | | | Use WeakAny linkage instead of LinkOnceAny, as the symbol can be removed with LinkOnceAny in O2 (not referenced). llvm-svn: 269146
OpenPOWER on IntegriCloud