summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [LVI] A better fix for the assertion error introduced by 267609Philip Reames2016-04-262-10/+22
| | | | | | Essentially, I was using the wrong size function. For types which were sized, but not primitive, I wasn't getting a useful size for the operand and failed an assert. I fixed this, and also added a guard that the input is a sized type. Test case is for the original mistake. I'm not sure how to actually exercise the sized type check. llvm-svn: 267618
* [LVI] Speculative fix for assertion seen in clang botsPhilip Reames2016-04-261-0/+6
| | | | | | I'll clean this up and add a test case shortly. I want to make sure this does actually fix the bots; if not, I'll revert. llvm-svn: 267617
* [LowerExpectIntrinsic] make default likely/unlikely ratio biggerSanjay Patel2016-04-262-10/+22
| | | | | | | | | | We need the default ratio to be sufficiently large that it triggers transforms based on block frequency info (BFI) and plays well with the recently introduced BranchProbability used by CGP. Differential Revision: http://reviews.llvm.org/D19435 llvm-svn: 267615
* Reassociate: Simplify using lambdas. NFCJustin Bogner2016-04-261-17/+7
| | | | llvm-svn: 267614
* [LVI] Infer local facts from unary expressionsPhilip Reames2016-04-262-16/+57
| | | | | | | | | | As pointed out by John Regehr over in http://reviews.llvm.org/D19485, LVI was being incredibly stupid about applying its transfer rules. Rather than gathering local facts from the expression itself, it was simply giving up entirely if one of the inputs was overdefined. This greatly impacts the precision of the overall analysis and makes it far more fragile as well. This patch implements only the unary operation case. Once this is in, I'll implement the same for the binary operations. Differential Revision: http://reviews.llvm.org/D19492 llvm-svn: 267609
* Optimization bisect support in X86-specific passesAndrew Kaylor2016-04-265-3/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D19439 llvm-svn: 267608
* [CodeGen] Add getBuildVector and getSplatBuildVector helpers. NFCI.Ahmed Bougacha2016-04-2613-178/+173
| | | | | | Differential Revision: http://reviews.llvm.org/D17176 llvm-svn: 267606
* Revert "[SimplifyLibCalls] sprintf doesn't copy null bytes"David Majnemer2016-04-262-7/+5
| | | | | | | | | | The destination buffer that sprintf uses is restrict qualified, we do not need to worry about derived pointers referenced via format specifiers. This reverts commit r267580. llvm-svn: 267605
* Try to get ResponseFile.ll passing on Windows after r267556.Nico Weber2016-04-261-2/+4
| | | | llvm-svn: 267599
* Remove more unused variables.Zachary Turner2016-04-261-3/+0
| | | | llvm-svn: 267598
* Masked Store in Loop Vectorizer - bugfixElena Demikhovsky2016-04-262-13/+55
| | | | | | | | Fixed a bug in loop vectorization with conditional store. Differential Revision: http://reviews.llvm.org/D19532 llvm-svn: 267597
* PM: Port Internalize to the new pass managerJustin Bogner2016-04-268-105/+136
| | | | llvm-svn: 267596
* [llvm-pdbdump] Fix version reading on big endian systems.Zachary Turner2016-04-261-1/+2
| | | | llvm-svn: 267595
* Add optimization bisect opt-in calls for Hexagon passesAndrew Kaylor2016-04-2618-1/+52
| | | | | | Differential Revision: http://reviews.llvm.org/D19509 llvm-svn: 267593
* Fix warnings and -Werror build on clang.Zachary Turner2016-04-262-2/+2
| | | | llvm-svn: 267589
* Parse and dump PDB DBI Stream Header InformationZachary Turner2016-04-2611-17/+296
| | | | | | | | | | | | | | | | | | The DBI stream contains a lot of bookkeeping information for other streams. In particular it contains information about section contributions and linked modules. This patch is a first attempt at parsing some of the information out of the DBI stream. It currently only parses and dumps the headers of the DBI stream, so none of the module data or section contribution data is pulled out. This is just a proof of concept that we understand the basic properties of the DBI stream's metadata, and followup patches will try to extract more detailed information out. Differential Revision: http://reviews.llvm.org/D19500 Reviewed By: majnemer, ruiu llvm-svn: 267585
* [Tail duplication] Handle source registers with subregistersKrzysztof Parzyszek2016-04-263-37/+155
| | | | | | | | | | | | | | When a block is tail-duplicated, the PHI nodes from that block are replaced with appropriate COPY instructions. When those PHI nodes contained use operands with subregisters, the subregisters were dropped from the COPY instructions, resulting in incorrect code. Keep track of the subregister information and use this information when remapping instructions from the duplicated block. Differential Revision: http://reviews.llvm.org/D19337 llvm-svn: 267583
* Reapply: "ARM: put correct symbol index on indirect pointers in __thread_ptr.""Tim Northover2016-04-263-3/+8
| | | | | | | A latent bug in llvm-objdump used the wrong format specifier on 32-bit targets, causing the test to fail. This fixes the issue. llvm-svn: 267582
* Internalize: More consistent file header and include guards. NFCJustin Bogner2016-04-261-4/+4
| | | | | | Match the style here to the other headers in Transforms/IPO. llvm-svn: 267581
* [SimplifyLibCalls] sprintf doesn't copy null bytesDavid Majnemer2016-04-262-5/+7
| | | | | | | | | | sprintf doesn't read or copy the terminating null byte from it's string operands. sprintf will append it's own after processing all of the format specifiers. This fixes PR27526. llvm-svn: 267580
* Swift Calling Convention: use %RAX for sret.Manman Ren2016-04-264-20/+40
| | | | | | | We don't need to copy the sret argument into %rax upon return. rdar://25671494 llvm-svn: 267579
* tests: tweak MIR for ARM tests to correct MI issuesSaleem Abdulrasool2016-04-262-5/+7
| | | | | | | | | The Machine Instruction Verifier flagged some issues in the serialized MIR. Adjust the input to correct them. Fixes the remaining portion of PR27480. llvm-svn: 267578
* test: remove some bleeding whitespaceSaleem Abdulrasool2016-04-262-57/+57
| | | | | | Kill bleeding whitespace. NFC llvm-svn: 267577
* [AMDGPU] Move reserved vgpr count for trap handler usage to ↵Konstantin Zhuravlyov2016-04-266-9/+20
| | | | | | | | SIMachineFunctionInfo + minor commenting changes Differential Revision: http://reviews.llvm.org/D19537 llvm-svn: 267573
* [CodeGenPrepare] use branch weight metadata to decide if a select should be ↵Sanjay Patel2016-04-268-41/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | turned into a branch This is part of solving PR27344: https://llvm.org/bugs/show_bug.cgi?id=27344 CGP should undo the SimplifyCFG transform for the same reason that earlier patches have used this same mechanism: it's possible that passes between SimplifyCFG and CGP may be able to optimize the IR further with a select in place. For the TLI hook default, >99% taken or not taken is chosen as the default threshold for a highly predictable branch. Even the most limited HW branch predictors will be correct on this branch almost all the time, so even a massive mispredict penalty perf loss would be overcome by the win from all the times the branch was predicted correctly. As a follow-up, we could make the default target hook less conservative by using the SchedMachineModel's MispredictPenalty. Or we could just let targets override the default by implementing the hook with that and other target-specific options. Note that trying to statically determine mispredict rates for close-to-balanced profile weight data is generally impossible if the HW is sufficiently advanced. Ie, 50/50 taken/not-taken might still be 100% predictable. Finally, note that this patch as-is will not solve PR27344 because the current __builtin_unpredictable() branch weight default values are 4 and 64. A proposal to change that is in D19435. Differential Revision: http://reviews.llvm.org/D19488 llvm-svn: 267572
* Fix build broken due to order of initialization problem.Zachary Turner2016-04-262-4/+5
| | | | llvm-svn: 267571
* Refactor some more PDB reading code into DebugInfoPDB.Zachary Turner2016-04-269-143/+307
| | | | | | | Differential Revision: http://reviews.llvm.org/D19445 Reviewed By: David Majnemer llvm-svn: 267564
* [AMDGPU] Reserve VGPRs for trap handler usage if instructedKonstantin Zhuravlyov2016-04-267-1/+85
| | | | | | Differential Revision: http://reviews.llvm.org/D19235 llvm-svn: 267563
* Use gcc's rules for parsing gcc-style response filesNico Weber2016-04-262-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | In gcc, \ escapes every character in response files. It is true that this makes it harder to mention Windows files in rsp files, but not doing this means clang disagrees with gcc, and also disagrees with the shell (on non-Windows) which rsp file quoting is supposed to match. clang isn't free to choose what to do here. In general, the idea for response files is to take bits of your command line and write them to a file unchanged, and have things work the same way. Since the command line would've been interpreted by the shell, things in the rsp file need to be subject to the same shell quoting rules. People who want to put Windows-style paths in their response files either need to do any of: * escape their backslashes * or use clang-cl which uses cl.exe/cmd.exe quoting rules * pass --rsp-quoting=windows to clang to tell it to use cl.exe/cmd.exe quoting rules for response files. Fixes PR27464. http://reviews.llvm.org/D19417 llvm-svn: 267556
* [AMDGPU] Assembler: basic support for SDWA instructionsSam Kolton2016-04-269-58/+454
| | | | | | | | | | | | | | | Support for SDWA instructions for VOP1 and VOP2 encoding. Not done yet: - converters for support optional operands and modifiers - VOPC - sext() modifier - intrinsics - VOP2b (see vop_dpp.s) - V_MAC_F32 (see vop_dpp.s) Differential Revision: http://reviews.llvm.org/D19360 llvm-svn: 267553
* [X86] PR27502: Fix the LEA optimization pass.Andrey Turetskiy2016-04-263-3/+27
| | | | | | | | Handle MachineBasicBlock as a memory displacement operand in the LEA optimization pass. Differential Revision: http://reviews.llvm.org/D19409 llvm-svn: 267551
* [Sparc] Fix build error introduced by rL267545.Marcin Koscielnicki2016-04-261-1/+1
| | | | llvm-svn: 267549
* [PowerPC] Add support for llvm.thread.pointerMarcin Koscielnicki2016-04-262-0/+27
| | | | | | Differential Revision: http://reviews.llvm.org/D19304 llvm-svn: 267546
* [SPARC] [SSP] Add support for LOAD_STACK_GUARD.Marcin Koscielnicki2016-04-267-1/+73
| | | | | | | | This fixes PR22248 on sparc. Differential Revision: http://reviews.llvm.org/D19386 llvm-svn: 267545
* [SPARC] Add support for llvm.thread.pointer.Marcin Koscielnicki2016-04-263-0/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D19387 llvm-svn: 267544
* ThinLTOCodeGenerator: preserve linkonce when in "MustPreserved" setMehdi Amini2016-04-262-4/+18
| | | | | | | | | If the linker specifically requested for a linkonce to be preserved, we need to make sure we won't drop it even if all the uses in the current module disappear. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267543
* Revert "ARM: put correct symbol index on indirect pointers in __thread_ptr."Renato Golin2016-04-262-7/+2
| | | | | | This reverts commit r267488, as it broke some ARM buildbots. llvm-svn: 267541
* [ppc64] Reenable sibling call optimization on ppc64 since fixed tsan library ↵Chuang-Yu Cheng2016-04-262-1/+2
| | | | | | | | | | | tail-call issue print-stack-trace.cc test failure of compiler-rt has been fixed by r266869 (http://reviews.llvm.org/D19148), so reenable sibling call optimization on ppc64 Reviewers: nemanjai kbarton llvm-svn: 267527
* Align case statements (whitespace-only cleanup)Sanjoy Das2016-04-261-15/+15
| | | | llvm-svn: 267525
* Symbolize operand bundle blocks for bcanalyzerSanjoy Das2016-04-262-0/+35
| | | | | | | | | | Reviewers: joker.eph Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19523 llvm-svn: 267524
* [AArch64] Expand v1i64 and v2i64 ctlz.Craig Topper2016-04-262-0/+31
| | | | | | The default is legal, which results in 'Cannot select' errors. llvm-svn: 267522
* [ARM] Expand vector ctlz_zero_undef so it becomes ctlz.Craig Topper2016-04-262-0/+72
| | | | | | The default is Legal, which results in 'Cannot select' errors. llvm-svn: 267521
* [ARM] Expand v1i64 and v2i64 ctlz.Craig Topper2016-04-262-0/+19
| | | | | | The default is legal, which results in 'Cannot select' errors. llvm-svn: 267520
* Tune basic block annotation algorithm.Dehao Chen2016-04-263-181/+263
| | | | | | | | | | | | | | | Summary: Instead of using maximum IR weight as the basic block weight, this patch uses the voting algorithm to find the most likely weight for the basic block. This can effectively avoid the cases when some IRs are annotated incorrectly due to code motion of the profiled binary. This patch also updates propagate.ll unittest to include discriminator in the input file so that it is testing something meaningful. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19301 llvm-svn: 267519
* [powerpc] mark JIT tests as UNSUPPORTED on powerpc64 big endianBill Seurer2016-04-2624-48/+72
| | | | | | | | | | | | | Some of the JIT tests began failing with "[llvm] r266663 - [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups." on powerpc64 big endian. To get the buildbots running I am marking these as UNSUPPORTED for now. If this is fixed remove the UNSUPPORTED flag "powerpc64-unknown-linux-gnu". In r267516 I marked these as XFAIL but they succeed on some of the bots on stage1. llvm-svn: 267518
* Pass the test file in through stdin instead of by filename.Richard Trieu2016-04-261-1/+1
| | | | | | | | When passed in via filename, this test will fail if the path to the test has the strings "f1" and "f2" in somewhere. Pass the file through stdin to prevent test failures due to coincidences in path names. llvm-svn: 267517
* [powerpc] mark JIT tests as XFAIL on powerpc64 big endianBill Seurer2016-04-2624-24/+48
| | | | | | | | | | Some of the JIT tests began failing with "[llvm] r266663 - [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups." on powerpc64 big endian. To get the buildbots running I am marking these as XFAIL for now. If this is fixed remove the XFAIL flag "powerpc64-unknown-linux-gnu". llvm-svn: 267516
* [SimplifyCFG] Preserve !llvm.mem.parallel_loop_access when mergingHal Finkel2016-04-263-1/+58
| | | | | | | | When SimplifyCFG merges identical instructions from both sides of a diamond, it can preserve !llvm.mem.parallel_loop_access (as it does with most of the other metadata). There's no real data or control dependency change in this case. llvm-svn: 267515
* [LoopVectorize] Don't consider conditional-load dereferenceability for ↵Hal Finkel2016-04-263-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | marked parallel loops I really thought we were doing this already, but we were not. Given this input: void Test(int *res, int *c, int *d, int *p) { for (int i = 0; i < 16; i++) res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; } we did not vectorize the loop. Even with "assume_safety" the check that we don't if-convert conditionally-executed loads (to protect against data-dependent deferenceability) was not elided. One subtlety: As implemented, it will still prefer to use a masked-load instrinsic (given target support) over the speculated load. The choice here seems architecture specific; the best option depends on how expensive the masked load is compared to a regular load. Ideally, using the masked load still reduces unnecessary memory traffic, and so should be preferred. If we'd rather do it the other way, flipping the order of the checks is easy. The LangRef is updated to make explicit that llvm.mem.parallel_loop_access also implies that if conversion is okay. Differential Revision: http://reviews.llvm.org/D19512 llvm-svn: 267514
* [lli] Fix a sign-compare warning.Lang Hames2016-04-261-2/+2
| | | | llvm-svn: 267512
OpenPOWER on IntegriCloud