summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Convert liveness tracking to work on a sub-register level instead of just ↵Andrew Trick2013-12-137-234/+241
| | | | | | register units. llvm-svn: 197253
* [AArch64] Simplify the Neon Scalar3Same patterns for floating-point reciprocalChad Rosier2013-12-131-91/+65
| | | | | | | | | step, floating-point reciprocal square root step, floating-point absolute difference, and integer/floating-point compare instructions. Also, move the scalar general arithmetic operation patterns closer to similar code. No functional change intended. llvm-svn: 197250
* Assume defaults to produce smaller datalayout strings.Rafael Espindola2013-12-136-26/+10
| | | | llvm-svn: 197249
* Fix pr18235.Rafael Espindola2013-12-134-39/+29
| | | | | | | | | | The cpp backend is not a reasonable fallback for a missing target. It is a very special backend, so it is reasonable to use it only if explicitly requested. While at it, simplify the interface a bit. llvm-svn: 197241
* [SystemZ] Optimize X [!=]= Y in cases where X - Y or Y - X is also computedRichard Sandiford2013-12-132-0/+41
| | | | | | | In those cases it's better to compare the result of the subtraction against zero. llvm-svn: 197239
* [SystemZ] Make more use of TMHHRichard Sandiford2013-12-132-25/+162
| | | | | | | | | | This originally came about after noticing that InstCombine turns some of the TMHH (icmp (and...), ...) tests into plain comparisons. Since there is no instruction to compare with a 64-bit immediate, TMHH is generally better than an ordered comparison for the cases that it can handle. llvm-svn: 197238
* test commit.Iain Sandoe2013-12-131-1/+1
| | | | | | Amend a comment. llvm-svn: 197237
* [SystemZ] Extend integer absolute selectionRichard Sandiford2013-12-136-4/+252
| | | | | | | | This patch makes more use of LPGFR and LNGFR. It builds on top of the LTGFR selection from r197234. Most of the tests are motivated by what InstCombine would produce. llvm-svn: 197236
* [SystemZ] Add a structure to represent a selected comparisonRichard Sandiford2013-12-131-175/+180
| | | | | | | | | | | ...in an attempt to rein back the increasingly complex selection code. A knock-on effect is that ICmpType is exposed from the outset, which slightly simplifies adjustSubwordCmp. The code is no piece of art even after this change, but at least it should be slightly better. No behavioral change intended. llvm-svn: 197235
* [SystemZ] Make more use of LTGFRRichard Sandiford2013-12-132-0/+79
| | | | | | | | | | | | InstCombine turns (sext (trunc)) into (ashr (shl)), then converts any comparison of the ashr against zero into a comparison of the shl against zero. This makes sense in itself, but we want to undo it for z, since the sign- extension instruction has a CC-setting form. I've included tests for both the original and InstCombined variants, but the former already worked. The patch fixes the latter. llvm-svn: 197234
* X86: When lowering shl_parts, don't emit shift amounts larger than the bit ↵Benjamin Kramer2013-12-132-2/+38
| | | | | | | | | | | | | width. While it's safe for the X86-specific shift nodes, dag combining will kill generic nodes. Insert an AND to make it safe, isel will nuke it as x86's shift instructions have an implicit AND. Fixes PR16108, which contains a contraption to hit this case in between constant folders. llvm-svn: 197228
* Enabling thumb2 mode used to force support for armv6t2. Replace thisJoerg Sonnenberger2013-12-1382-93/+99
| | | | | | with a temporary assertion and adjust the various test cases. llvm-svn: 197224
* [mips] Add checks for alignment and maximum displacements for most of theMatheus Almeida2013-12-136-5/+729
| | | | | | | | | | | branch instructions for mips and micromips instruction sets thus avoiding the situation of generating branches to undesired locations if offsets cannot be encoded. This patch also checks if a fixup cannot be applied and returns a fatal error if that's the case. llvm-svn: 197223
* Add ARM to release instructionsRenato Golin2013-12-131-0/+6
| | | | llvm-svn: 197220
* [inliner] Fix PR18206 by preventing inlining functions that call setjmpChandler Carruth2013-12-132-15/+58
| | | | | | | | | | | | | through an invoke instruction. The original patch for this was written by Mark Seaborn, but I've reworked his test case into the existing returns_twice test case and implemented the fix by the prior refactoring to actually run the cost analysis over invoke instructions, and then here fixing our detection of the returns_twice attribute to work for both calls and invokes. We never noticed because we never saw an invoke. =[ llvm-svn: 197216
* [inliner] Completely change (and fix) how the inline cost analysisChandler Carruth2013-12-132-37/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handles terminator instructions. The inline cost analysis inheritted some pretty rough handling of terminator insts from the original cost analysis, and then made it much, much worse by factoring all of the important analyses into a separate instruction visitor. That instruction visitor never visited the terminator. This works fine for things like conditional branches, but for many other things we simply computed The Wrong Value. First example are unconditional branches, which should be free but were counted as full cost. This is most significant for conditional branches where the condition simplifies and folds during inlining. We paid a 1 instruction tax on every branch in a straight line specialized path. =[ Oh, we also claimed that the unreachable instruction had cost. But it gets worse. Let's consider invoke. We never applied the call penalty. We never accounted for the cost of the arguments. Nope. Worse still, we didn't handle the *correctness* constraints of not inlining recursive invokes, or exception throwing returns_twice functions. Oops. See PR18206. Sadly, PR18206 requires yet another fix, but this refactoring is at least a huge step in that direction. llvm-svn: 197215
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-1310-98/+33
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197210. llvm-svn: 197211
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-1310-33/+98
| | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. Recommitted as r197197 to reproduce the failure and reverted as r197199 Turns out there was unstable ordering in the type unit dumping code. Fixed by using MapVector in DWARFContext to store the debug_types comdat sections. llvm-svn: 197210
* Change stack probing code for MingW.Kai Nacke2013-12-133-15/+13
| | | | | | | | | Since gcc 4.6 the compiler uses ___chkstk_ms which has the same semantics as the MS CRT function __chkstk. This simplifies the prologue generation a bit. Reviewed by Rafael Espíndola. llvm-svn: 197205
* Object/COFF: ExportAddressTableEntry is a union of two RVAs.Rui Ueyama2013-12-131-1/+1
| | | | | | | The previous definition was wrong. See Microsoft PE/COFF specification section 5.3.2. llvm-svn: 197204
* Revert "DebugInfo: Move type units into the debug_types section with ↵David Blaikie2013-12-138-93/+29
| | | | | | | | appropriate comdat grouping and type unit headers" This reverts commit r197197. llvm-svn: 197199
* llvm-cov: Added -b option for branch probabilities.Yuchen Wu2013-12-136-37/+355
| | | | | | | | | | | This option tells llvm-cov to print out branch probabilities when a basic block contains multiple branches. It also prints out some function summary info including the number of times the function enters, the percent of time it returns, and how many blocks were executed. Also updated tests. llvm-svn: 197198
* DebugInfo: Move type units into the debug_types section with appropriate ↵David Blaikie2013-12-138-29/+93
| | | | | | | | | | | | | | | | | | | comdat grouping and type unit headers This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. This commit originally got jumbled up with another build-breaking commit and I can't find the failures I thought this caused anymore. Recommitting to hopefully get some clean buildbot results to work from. I have a sneaking suspicion there's unstable output in the comdat group output of MCStreamer... llvm-svn: 197197
* Fix spelling in comment in test: "themselve" -> "themselves"Mark Seaborn2013-12-121-1/+1
| | | | llvm-svn: 197180
* Fix a use-after-free error in GlobalOpt CleanupConstantGlobalUsersHal Finkel2013-12-122-2/+43
| | | | | | | | | | | | GlobalOpt's CleanupConstantGlobalUsers function uses a worklist array to manage constant users to be visited. The pointers in this array need to be weak handles because when we delete a constant array, we may also be holding a pointer to one of its elements (or an element of one of its elements if we're dealing with an array of arrays) in the worklist. Fixes PR17347. llvm-svn: 197178
* Initialize the barrier pass llvm::initializeIPOHal Finkel2013-12-121-0/+1
| | | | | | | | | The barrier pass is a temporary hack, and should go away soon. Nevertheless, if we don't initialize it, then opt will not understand -barrier, and this will break bugpoint (because when it dumps the passes from the default pass manager -barrier will be there). llvm-svn: 197177
* Removed llvm-cov.test from Other folder.Yuchen Wu2013-12-123-4/+0
| | | | | | More comprehensive llvm-cov tests were added to tools/llvm-cov. llvm-svn: 197175
* Simplify the datalayout string of ARM and AArch64.Rafael Espindola2013-12-122-4/+4
| | | | | | | | No functionality change. Reviewed by Tim Northover. llvm-svn: 197172
* Simplify the SystemZ datalayout string.Rafael Espindola2013-12-121-2/+1
| | | | | | Reviewed by Richard Sandiford. llvm-svn: 197170
* Use "a" instead of "a0" in DataLayout.Rafael Espindola2013-12-124-4/+4
| | | | | | It means exactly the same and is just a bit shorter. llvm-svn: 197169
* Fix Typo.Rafael Espindola2013-12-121-1/+1
| | | | llvm-svn: 197168
* Convert the other getHostByName implementations to StringRef.Rafael Espindola2013-12-121-5/+5
| | | | llvm-svn: 197166
* Switch to the new MingW ABI.Rafael Espindola2013-12-123-9/+9
| | | | | | | GCC 4.7 changed the MingW ABI. On the LLVM side it means that sret functions don't pop the stack. llvm-svn: 197163
* [AArch64] Removed unnecessary copy patterns with v1fx types.Chad Rosier2013-12-125-33/+9
| | | | | | | | | | | | | | - Copy patterns with float/double types are enough. - Fix typos in test case names that were using v1fx. - There is no ACLE intrinsic that uses v1f32 type. And there is no conflict of neon and non-neon ovelapped operations with this type, so there is no need to support operations with this type. - Remove v1f32 from FPR32 register and disallow v1f32 as a legal type for operations. Patch by Ana Pazos! llvm-svn: 197159
* Return a StringRef from getHostCPUName.Rafael Espindola2013-12-122-2/+2
| | | | llvm-svn: 197158
* [cleanup] Remove trailing whitespace before I start changing this file.Chandler Carruth2013-12-121-1/+1
| | | | llvm-svn: 197149
* PowerPC: add Linux triple to TLS testsTim Northover2013-12-122-0/+3
| | | | | | The tests were failing on OS X. llvm-svn: 197146
* Added new X86 patterns to select SSE scalar fp arithmetic instructions fromAndrea Di Biagio2013-12-122-0/+298
| | | | | | | | | | | | | | | | | | | | | | a vector packed single/double fp operation followed by a vector insert. The effect is that the backend coverts the packed fp instruction followed by a vectro insert into a SSE or AVX scalar fp instruction. For example, given the following code: __m128 foo(__m128 A, __m128 B) { __m128 C = A + B; return (__m128) {c[0], a[1], a[2], a[3]}; } previously we generated: addps %xmm0, %xmm1 movss %xmm1, %xmm0 we now generate: addss %xmm1, %xmm0 llvm-svn: 197145
* Remove some dead codeRichard Barton2013-12-121-2/+0
| | | | llvm-svn: 197144
* typo in commentGabor Greif2013-12-121-2/+2
| | | | llvm-svn: 197136
* [AArch64]Fix the problem that AArch64 backend fails to select ↵Hao Liu2013-12-122-3/+87
| | | | | | scalar_to_vector of vector types having more than one element. llvm-svn: 197135
* Swap around EXPECT_EQ() arguments orders for more natural gtest Failure messagesAlp Toker2013-12-121-8/+8
| | | | | | | | | Somewhat counterintuitively the first arg in gtest is treated as the expectation. No change to the tests themselves. llvm-svn: 197124
* Add missing escape characters to the new Regex::escape() functionAlp Toker2013-12-122-21/+11
| | | | | | | | | The old AddFixedStringToRegEx() it was based on got away with this for the longest time, but the problem became easy to spot after the cleanup in r197096. Also add a quick unit test to cover regex escaping. llvm-svn: 197121
* Check for null pointer before dereferencing. A careless typo on my part.Reed Kotler2013-12-121-2/+2
| | | | | | | I don't know why this did not show up earlier. This code has been around for ages. llvm-svn: 197119
* Fix Incorrect CHECK message [0-31]+ in test case.Kevin Qin2013-12-1216-323/+323
| | | | | | | In regular expression, [0-31]+ equals to [0-3]+, not the number from 0 to 31. So change it to [0-9]+. llvm-svn: 197113
* Resubmit r196544: Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, ↵Yi Jiang2013-12-124-3/+55
| | | | | | x) ―> __exp10(x) llvm-svn: 197109
* Add TargetLibraryInfo in LTO passes builderYi Jiang2013-12-122-0/+23
| | | | llvm-svn: 197105
* Remove unused multiclass from PPCInstrInfo.tdHal Finkel2013-12-121-14/+0
| | | | llvm-svn: 197100
* Improve instruction scheduling for the PPC POWER7Hal Finkel2013-12-128-3/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aside from a few minor latency corrections, the major change here is a new hazard recognizer which focuses on better dispatch-group formation on the POWER7. As with the PPC970's hazard recognizer, the most important thing it does is avoid load-after-store hazards within the same dispatch group. It uses the POWER7's special dispatch-group-terminating nop instruction (instead of inserting multiple regular nop instructions). This new hazard recognizer makes use of the scheduling dependency graph itself, built using AA information, to robustly detect the possibility of load-after-store hazards. significant test-suite performance changes (the error bars are 99.5% confidence intervals based on 5 test-suite runs both with and without the change -- speedups are negative): speedups: MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2 -0.55171% +/- 0.333168% MultiSource/Benchmarks/TSVC/CrossingThresholds-dbl/CrossingThresholds-dbl -17.5576% +/- 14.598% MultiSource/Benchmarks/TSVC/Reductions-dbl/Reductions-dbl -29.5708% +/- 7.09058% MultiSource/Benchmarks/TSVC/Reductions-flt/Reductions-flt -34.9471% +/- 11.4391% SingleSource/Benchmarks/BenchmarkGame/puzzle -25.1347% +/- 11.0104% SingleSource/Benchmarks/Misc/flops-8 -17.7297% +/- 9.79061% SingleSource/Benchmarks/Shootout-C++/ary3 -35.5018% +/- 23.9458% SingleSource/Regression/C/uint64_to_float -56.3165% +/- 25.4234% SingleSource/UnitTests/Vectorizer/gcc-loops -18.5309% +/- 6.8496% regressions: MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000 18.351% +/- 12.156% SingleSource/Benchmarks/Shootout-C++/methcall 27.3086% +/- 14.4733% llvm-svn: 197099
* Add isBarrier to SDepHal Finkel2013-12-121-0/+6
| | | | | | | | SDep had is* functions for the other kinds of order dependencies (isMustAlias, isWeak, isArtificial, etc.), but not for barrier. Upcoming commits in the PowerPC backend will make use of this function. llvm-svn: 197098
OpenPOWER on IntegriCloud