summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Change llvm-cov output formatting to be more similar to gcov.Bob Wilson2013-10-22
| | | | | | | | | | | | - Replaced tabs with proper padding - print() takes two arguments, which are the GCNO and GCDA filenames - Files are listed at the top of output, appended by line 0 - Stripped strings of trailing \0s - Removed last two lines of whitespace in output Patch by Yuchen Wu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193148 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify SCEV comments.Andrew Trick2013-10-22
| | | | | | We handle for(i=n; i>0; i -= s) by canonicalizing within SCEV to for(i=-n; i<0; i += s). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193147 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace (V)MOVZDI2PDIrr/rm instructions with patterns that select ↵Craig Topper2013-10-22
| | | | | | (V)MOVDI2PDIrr/rm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193146 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Thumb2 copy for GPRPair needs to use thumb instructions.Jim Grosbach2013-10-22
| | | | | | | | Use tMOVr instead of plain MOVr. rdar://15193017 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193139 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Clean up copyPhysReg() a bit.Jim Grosbach2013-10-22
| | | | | | No functional change, just cleaning things up for readability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193138 91177308-0d34-0410-b5e6-96231b3b80d8
* TBAA: fix PR17620.Manman Ren2013-10-22
| | | | | | | | We can have a struct type with a single field and the field does not start with 0. In that case, we should correctly update the offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193137 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting/whitespace.Eric Christopher2013-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193135 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the printing of llvm-cov information out from collectLineCounts().Bob Wilson2013-10-22
| | | | | | | | | | collectLineCounts() should only organize the output data. This is done in anticipation of subsequent changes which will pass in GCNO and GCDA filenames into the print function where it is printed similar to the gcov output. Patch by Yuchen Wu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193134 91177308-0d34-0410-b5e6-96231b3b80d8
* FIXME comment shouldn't have been doxygen styleAndrew Kaylor2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling, grammar, and match naming convention for test files.Eric Christopher2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193130 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF Type Hashing: Include reference and rvalue reference type in the ↵David Blaikie2013-10-21
| | | | | | | | declarable summary hashing path More support for 7.25 Part 5. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193129 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF type hashing: begin implementing Step 5, summary hashing in declarable ↵David Blaikie2013-10-21
| | | | | | | | | contexts There are several other tag types that need similar handling but to ensure test coverage they'll be coming incrementally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193126 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add the constraint to NEON scalar mla/mls instructions.Chad Rosier2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193117 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyCFG: Don't duplicate calls to functions marked noduplicate v2Tom Stellard2013-10-21
| | | | | | | v2: - Use CI->cannotDuplicate() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193115 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused TargetLowering field.Matt Arsenault2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193113 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix CodeGen for different size address space GEPsMatt Arsenault2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193111 91177308-0d34-0410-b5e6-96231b3b80d8
* Use more type helper functionsMatt Arsenault2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193109 91177308-0d34-0410-b5e6-96231b3b80d8
* Reuse variableMatt Arsenault2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193107 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build in DIE.cpp with MSVC 2010Reid Kleckner2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193106 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF type hashing: Handle multiple (including recursive) references to the ↵David Blaikie2013-10-21
| | | | | | | | | | same type This uses a map, keeping the type DIE numbering separate from the DIEs themselves - alternatively we could do things the way GCC does if we want to add an integer to the DIE type to record the numbering there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193105 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach SimplifyCFG about address spacesMatt Arsenault2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193104 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix creating bitcasts between address spaces in SCEV.Matt Arsenault2013-10-21
| | | | | | | | The test before wasn't successfully testing this since it was missing the datalayout piece to change the size of the second address space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193102 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused SCEV functionsMatt Arsenault2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193097 91177308-0d34-0410-b5e6-96231b3b80d8
* X86 vector element shift-by-immediate instructions take i8 immediates. MakeLang Hames2013-10-21
| | | | | | | | | | | | | | | | the instruction defenitions and ISEL reflect this. Prior to this patch these instructions took an i32i8imm, and the high bits were dropped during encoding. This led to incorrect behavior for shifts by immediates higher than 255. This patch fixes that issue by detecting large immediate shifts and returning constant zero (for logical shifts) or capping the shift amount at an encodable value (for arithmetic shifts). Fixes <rdar://problem/14968098> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193096 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up some old review feedback.Eric Christopher2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193095 91177308-0d34-0410-b5e6-96231b3b80d8
* Improving MCJIT/RuntimeDyld thread safetyAndrew Kaylor2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193094 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its ↵David Blaikie2013-10-21
| | | | | | | | | | | own enum for ease of use. This allows various variables to be more self-documenting and easier to debug by being of specific types without overlapping enum values. Precommit review by Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193091 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize more linkonce_odr values during LTO.Rafael Espindola2013-10-21
| | | | | | | | | | | When a linkonce_odr value that is on the dso list is not unnamed_addr we can still look to see if anything is actually using its address. If not, it is safe to hide it. This patch implements that by moving GlobalStatus to Transforms/Utils and using it in Internalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193090 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Hash DW_FORM_GNU_str_index as a string.David Blaikie2013-10-21
| | | | | | | | | | Found while adding type safety to the various DWARF enumerations (form, attribute, tag, etc) that caused Clang to warn on an incompletely covered switch. Converting the comment to a default/unreachable uncovered this case of an unsupported form encoding. Seems we were skipping fission strings entirely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193089 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: MUL operation lowering for v8i64Elena Demikhovsky2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193083 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Direct Object Emission support for LD/ST instructions.Matheus Almeida2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193082 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Direct Object Emission support for LDI instructions.Matheus Almeida2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193081 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Direct Object Emission support for MOVE.v.Matheus Almeida2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193080 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Direct Object Emission support for CTCMSA and CFCMSA. Matheus Almeida2013-10-21
| | | | | | | | | | These instructions are logically related as they allow read/write of MSA control registers. Currently MSA control registers are emitted by number but hopefully that will change as soon as GAS starts accepting them by name as that would make the assembly easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193078 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Direct Object Emission of SPLAT instruction.Matheus Almeida2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193077 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][msa] Fix definition of SLD instruction.Matheus Almeida2013-10-21
| | | | | | | | | The second parameter of the SLD intrinsic is the number of columns (GPR) to slide left the source array. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193076 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the predecessor removal logic in r193045.Michael Gottesman2013-10-21
| | | | | | Additionally some small comment/stylistic fixes are included as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193068 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't eliminate a partially redundant load if it's in a landing pad.Bill Wendling2013-10-21
| | | | | | | | | | | | | A landing pad can be jumped to only by the unwind edge of an invoke instruction. If we eliminate a partially redundant load in a landing pad, it will create a basic block that violates this constraint. It then leads to other problems down the line if it tries to merge that basic block with the landing pad. Avoid this by not eliminating the load in a landing pad. PR17621 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193064 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach simplify-cfg how to correctly create covered lookup tables for ↵Michael Gottesman2013-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | switches on iN with N >= 3. One optimization simplify-cfg performs is the converting of switches to lookup tables if the switch has > 4 cases. This is done by: 1. Finding the max/min case value and calculating the switch case range. 2. Create a lookup table basic block. 3. Perform a check in the switch's BB to see if the input value is in the switch's case range. If the input value satisfies said predicate branch to the lookup table BB, otherwise branch to the switch's default destination BB using the default value as the result. The conditional check consists of subtracting the min case value of the table from any input iN value and then ensuring that said value is unsigned less than the size of the lookup table represented as an iN value. If the lookup table is a covered lookup table, the size of the table will be N which is 0 as an iN value. Thus the comparison will be an `icmp ult` of an iN value against 0 which is always false yielding the incorrect result. This patch fixes this problem by recognizing if we have a covered lookup table and if we do, unconditionally jumps to the lookup table BB since the covering property of the lookup table implies no input values could not be handled by said BB. rdar://15268442 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193045 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit prefix data after debug and EH directives.Peter Collingbourne2013-10-20
| | | | | | | | | This ensures that the prefix data is treated as part of the function for the purpose of debug info. This provides a better debugging experience, among other things by allowing a debug info client to correctly look up a function in debug info given a function pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193042 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit DWARF line entries for all data in the instruction stream.Peter Collingbourne2013-10-20
| | | | | | | r182712 attempted to do this, but it failed to handle data emitted via EmitBytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193041 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variable.Benjamin Kramer2013-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193038 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform an intelligent splice of the predecessor with the single successor.Bill Wendling2013-10-19
| | | | | | | | If the predecessor's being spliced into a landing pad, then we need the PHIs to come first and the rest of the predecessor's code to come *after* the landing pad instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193035 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid duplicate search by reusing the iterator.Yaron Keren2013-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193034 91177308-0d34-0410-b5e6-96231b3b80d8
* Added comments from Andrew Kaylor.Yaron Keren2013-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193033 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat.Eric Christopher2013-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193024 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up a few minor performance problems spotted in code review.Eric Christopher2013-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193023 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEV should use NSW to get trip count for positive nonunit stride loops.Andrew Trick2013-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SCEV currently fails to compute loop counts for nonunit stride loops. This comes up frequently. It prevents loop optimization and forces vectorization to insert extra loop checks. For example: void foo(int n, int *x) { for (int i = 0; i < n; i += 3) { x[i] = i; x[i+1] = i+1; x[i+2] = i+2; } } We need to properly handle the case in which limit > INT_MAX-stride. In the above case: n > INT_MAX-3. In this case the loop counter will step beyond the limit and overflow at the same time. However, knowing that signed integer overlow in undefined, we can assume the loop test behavior is arbitrary after overflow. This obeys both C undefined behavior rules, and the more strict LLVM poison value rules. I'm finally fixing this in response to Hal Finkel's persistence. The most probable reason that we never optimized this before is that we were being careful to handle case where the developer expected a side-effect free infinite loop relying on overflow: for (int i = 0; i < n; i += s) { ++j; } return j; If INT_MAX+1 is a multiple of s and n > INT_MAX-s, then we might expect an infinite loop. However there are plenty of ways to achieve this effect without relying on undefined behavior of signed overflow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193015 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark some command line flags as hiddenNadav Rotem2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193013 91177308-0d34-0410-b5e6-96231b3b80d8
* Can we move to C++11 already?Michael J. Spencer2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193007 91177308-0d34-0410-b5e6-96231b3b80d8