summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/Inputs
Commit message (Collapse)AuthorAgeFilesLines
* test: change argumentSaleem Abdulrasool2015-10-121-1/+1
| | | | | | | This failed on AArch64 due to the type mismatch using int instead of __builtin_va_list. llvm-svn: 250112
* test: Give instrumentation based profiling tests their own directoryJustin Bogner2014-03-112-177/+0
| | | | | | | | These tests are logically related, but they're spread about several different CodeGen directories. Consolidate them in one place to make them easier to manage. llvm-svn: 203541
* PGO: rename profile data files from .pgodata to .profdata.Bob Wilson2014-03-062-0/+0
| | | | | | | These tests were added before we had settled on using a .profdata extension for the profile data files. Renaming them now for consistency. llvm-svn: 203166
* PGO: Use the main file name to help distinguish functions with local linkage.Bob Wilson2014-03-061-0/+4
| | | | | | | | | | | | In addition, for all functions, use the name from the llvm::Function to identify the function in the profile data. Compute that "function name", including the file name for local functions, once when assigning the PGO counters and store it in the CodeGenPGO class. Move the code to add InlineHint and Cold attributes out of StartFunction(), because the "function name" string isn't available at that point. llvm-svn: 203075
* Add a testcase for r202437.Bob Wilson2014-02-281-0/+6
| | | | llvm-svn: 202468
* Change PGO instrumentation to compute counts in a separate AST traversal.Bob Wilson2014-02-171-36/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we made one traversal of the AST prior to codegen to assign counters to the ASTs and then propagated the count values during codegen. This patch now adds a separate AST traversal prior to codegen for the -fprofile-instr-use option to propagate the count values. The counts are then saved in a map from which they can be retrieved during codegen. This new approach has several advantages: 1. It gets rid of a lot of extra PGO-related code that had previously been added to codegen. 2. It fixes a serious bug. My original implementation (which was mailed to the list but never committed) used 3 counters for every loop. Justin improved it to move 2 of those counters into the less-frequently executed breaks and continues, but that turned out to produce wrong count values in some cases. The solution requires visiting a loop body before the condition so that the count for the condition properly includes the break and continue counts. Changing codegen to visit a loop body first would be a fairly invasive change, but with a separate AST traversal, it is easy to control the order of traversal. I've added a testcase (provided by Justin) to make sure this works correctly. 3. It improves the instrumentation overhead, reducing the number of counters for a loop from 3 to 1. We no longer need dedicated counters for breaks and continues, since we can just use the propagated count values when visiting breaks and continues. To make this work, I needed to make a change to the way we count case statements, going back to my original approach of not including the fall-through in the counter values. This was necessary because there isn't always an AST node that can be used to record the fall-through count. Now case statements are handled the same as default statements, with the fall-through paths branching over the counter increments. While I was at it, I also went back to using this approach for do-loops -- omitting the fall-through count into the loop body simplifies some of the calculations and make them behave the same as other loops. Whenever we start using this instrumentation for coverage, we'll need to add the fall-through counts into the counter values. llvm-svn: 201528
* PGO: fix a bug in parsing pgo data.Manman Ren2014-02-151-0/+3
| | | | | | | | When a function has a single counter, we will offset the pointer by 1 when parsing the next function. If a function has multiple counters, we are okay after skipping rest of the counters. llvm-svn: 201456
* PGO: instrumentation based profiling sets function attributes.Manman Ren2014-02-051-0/+39
| | | | | | | | | | | | | | | We collect a maximal function count among all functions in the pgo data file. For functions that are hot, we set its InlineHint attribute. For functions that are cold, we set its Cold attribute. We currently treat functions with >= 30% of the maximal function count as hot and functions with <= 1% of the maximal function count are treated as cold. These two numbers are from preliminary tuning on SPEC. This commit should not affect non-PGO builds and should boost performance on instrumentation based PGO. llvm-svn: 200874
* CodeGen: Fix tracking of PGO counters for the logical or operatorJustin Bogner2014-01-231-0/+12
| | | | | | | This adds tests for both logical or and for logical and, which was already correct. llvm-svn: 199865
* CodeGen: Initial instrumentation based PGO implementationJustin Bogner2014-01-061-0/+127
| | | | llvm-svn: 198640
* Add testcase for r148375!Nick Lewycky2012-01-181-0/+9
llvm-svn: 148378
OpenPOWER on IntegriCloud