summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] clean up commonCastTransforms; NFCSanjay Patel2016-10-261-11/+9
| | | | | | | | 1. Use 'auto' with dyn_cast. 2. Variables start with a capital letter. 3. Use proper punctuation in comments. llvm-svn: 285200
* LegalizeDAG: Support promoting [US]DIV and [US]REM operationsTom Stellard2016-10-261-1/+18
| | | | | | | | | | | | | | | | | | Summary: AMDGPU will need this one i16 is added as a legal type. This is tested by: test/CodeGen/AMDGPU/sdiv.ll test/CodeGen/AMDGPU/sdivrem24.ll test/CodeGen/AMDGPU/udiv.ll test/CodeGen/AMDGPU/udivrem24.ll Reviewers: bogner, efriedma Subscribers: efriedma, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D25699 llvm-svn: 285199
* AMDGPU/SI: Don't emit multi-dword flat memory ops when they might access scratchTom Stellard2016-10-262-2/+41
| | | | | | | | | | | | | | Summary: A single flat memory operations that might access the scratch buffer can only access MaxPrivateElementSize bytes. Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25788 llvm-svn: 285198
* AMDGPU/SI: Remove unnecessary run lines from testTom Stellard2016-10-261-4/+2
| | | | | | | | | | | | | | Summary: This test had run lines disabling/enabling the promote alloca pass, but enabling/disabling promote alloca had no impact on the output. Reviewers: arsenm Subscribers: mgrang, kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25787 llvm-svn: 285197
* [X86] AVX512 fallback for floating-point scalar selectsZvi Rackover2016-10-262-12/+13
| | | | | | | | | | | | | Summary: In the case where of 'select i1 , f32, f32' or select i1, f64, f64 prefer lowering to masked-moves over branches. Fixes pr30561 Reviewers: igorb, aymanmus, delena Differential Revision: https://reviews.llvm.org/D25310 llvm-svn: 285196
* [InstCombine] consolidate zext tests and auto-generate checks; NFCSanjay Patel2016-10-263-48/+59
| | | | llvm-svn: 285195
* [InstCombine] auto-generate better checks; NFCSanjay Patel2016-10-261-90/+125
| | | | llvm-svn: 285194
* [AliasSetTracker] Make AST smarter about intrinsics that don't actually ↵Chad Rosier2016-10-262-0/+69
| | | | | | | | affect memory. Differential Revision: https://reviews.llvm.org/D25969 llvm-svn: 285191
* DebugInfo: support for DWARFv5 DW_AT_alignment attributeVictor Leschuk2016-10-2610-28/+412
| | | | | | | | | | | | * Assume that clang passes non-zero alignment value to DIBuilder only in case when it was forced by C++11 'alignas', C11 '_Alignas' or compiler attribute '__attribute__((aligned (N)))'. * Emit DW_AT_alignment if alignment is specified for type/object. Differential Revision: https://reviews.llvm.org/D24425 llvm-svn: 285189
* [IndVarSimplify][DebugLoc] When widening the exit loop condition, correctly ↵Andrea Di Biagio2016-10-262-0/+13
| | | | | | | | | | | | | | | reuse the debug location of the original comparison. When the loop exit condition is canonicalized as a != compaison, reuse the debug location of the original (non canonical) comparison. Before this patch, the debug location of the new icmp was obtained from the loop latch terminator. This patch fixes the issue by correctly setting the IRBuilder's "current debug location" to the location of the original compare. Differential Revision: https://reviews.llvm.org/D25953 llvm-svn: 285185
* Revert r285181 "DebugInfo: support for DWARFv5 DW_AT_alignment attribute".Vassil Vassilev2016-10-2610-412/+28
| | | | | | The commit broke the builds. llvm-svn: 285183
* DebugInfo: support for DWARFv5 DW_AT_alignment attributeVictor Leschuk2016-10-2610-28/+412
| | | | | | | | | | | | * Assume that clang passes non-zero alignment value to DIBuilder only in case when it was forced by C++11 'alignas', C11 '_Alignas' or compiler attribute '__attribute__((aligned (N)))'. * Emit DW_AT_alignment if alignment is specified for type/object. Differential Revision: https://reviews.llvm.org/D24425 llvm-svn: 285181
* DebugInfo: add bitcode upgrade test for alignment Victor Leschuk2016-10-262-0/+23
| | | | | | Bitcode format was changed in D25073, this adds bitcode upgrade test. llvm-svn: 285179
* [XRay] Be case-insensitive for error stringsDean Michael Berris2016-10-261-1/+1
| | | | | | | On Windows, "no such file or directory" is the default error translation as opposed to the capitalized form on Linux. llvm-svn: 285174
* [AVX-512] Add scalar vfmsub/vfnmsub mask3 intrinsicsCraig Topper2016-10-263-0/+140
| | | | | | | | | | | | Summary: Clang's intrinsic header currently tries to negate the third operand of a vfmadd mask3 in order to create vfmsub, but this fails isel. This patch adds scalar vfmsub and vfnmsub mask3 that we can use instead to avoid the negate. This is consistent with the packed instructions. Reviewers: igorb, delena Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25933 llvm-svn: 285173
* [XRay] Remove unnecessary include of <unistd.h>Dean Michael Berris2016-10-261-1/+0
| | | | llvm-svn: 285171
* [XRay] Remove unnecessary include of <unistd.h>Dean Michael Berris2016-10-261-2/+0
| | | | llvm-svn: 285170
* [XRay] Move specialisations into correct namespaceDean Michael Berris2016-10-261-0/+6
| | | | llvm-svn: 285168
* [XRay] Remove extra `;` to make -wpedantic happyDean Michael Berris2016-10-261-1/+1
| | | | llvm-svn: 285167
* [XRay] Add llvm-xray as a dependency to test/CMakeLists.txtDean Michael Berris2016-10-261-0/+1
| | | | llvm-svn: 285166
* [XRay] Implement `llvm-xray extract`, start of the llvm-xray toolDean Michael Berris2016-10-2620-0/+495
| | | | | | | | | | | | | | | | | | | | Usage: llvm-xray extract <object file> [-o <filename or '-'>] The tool gets the XRay instrumentation map from an object file and turns it into YAML. We first support ELF64 sleds on x86_64 binaries, with provision for supporting other supported platforms and formats later. This is the first of a many-part change to fully implement the `llvm-xray` tool. We also define a subcommand registration and dispatch mechanism to be used by other further subcommand implementations for llvm-xray. Diffusion Revision: https://reviews.llvm.org/D21987 llvm-svn: 285165
* Cloning: Also clone global variable attached metadata.Peter Collingbourne2016-10-262-0/+15
| | | | llvm-svn: 285161
* [libFuzzer] refresh docsKostya Serebryany2016-10-261-16/+9
| | | | llvm-svn: 285157
* Revert "[XRay] Implement `llvm-xray extract`, start of the llvm-xray tool"Dean Michael Berris2016-10-2619-494/+0
| | | | | | Reverts r285155 -- misconfigured tests. llvm-svn: 285156
* [XRay] Implement `llvm-xray extract`, start of the llvm-xray toolDean Michael Berris2016-10-2619-0/+494
| | | | | | | | | | | | | | | | | | Usage: llvm-xray extract <object file> [-o <filename or '-'>] The tool gets the XRay instrumentation map from an object file and turns it into YAML. We first support ELF64 sleds on x86_64 binaries, with provision for supporting other supported platforms and formats later. This is the first of a many-part change to fully implement the `llvm-xray` tool. We also define a subcommand registration and dispatch mechanism to be used by other further subcommand implementations for llvm-xray. llvm-svn: 285155
* Use printf instead of "echo -e" or "echo -n".Rui Ueyama2016-10-262-23/+23
| | | | | | | Not all echo commands support "-e". On the other hand, printf command is in POSIX, so it's more portable than "echo -e". llvm-svn: 285151
* [libFuzzer] simplify the code in TracePC::HandleTrace a bit moreKostya Serebryany2016-10-263-33/+18
| | | | llvm-svn: 285147
* [libFuzzer] simplify the code to print new PCsKostya Serebryany2016-10-264-16/+20
| | | | llvm-svn: 285145
* Utility functions for appending to llvm.used/llvm.compiler.used.Evgeniy Stepanov2016-10-257-100/+76
| | | | llvm-svn: 285143
* [libFuzzer] simplify the code in TracePC::HandleTraceKostya Serebryany2016-10-253-5/+9
| | | | llvm-svn: 285142
* [docs] Avoid repetition of 'considerable' in Error docs.Lang Hames2016-10-251-10/+10
| | | | llvm-svn: 285141
* [docs] Use consistent style for "do more stuff" in Error docs examples.Lang Hames2016-10-251-5/+8
| | | | llvm-svn: 285138
* [docs] Fix yet another Error docs formatting issue...Lang Hames2016-10-251-1/+2
| | | | llvm-svn: 285137
* [docs] Fix a few more Error docs formatting issues.Lang Hames2016-10-251-5/+6
| | | | | | Thanks to Pete Cooper for the review. llvm-svn: 285136
* [libFuzzer] add StandaloneFuzzTargetMain.c and a test for itKostya Serebryany2016-10-255-3/+62
| | | | llvm-svn: 285135
* [docs] Fix a missing code-block in the new Error docs.Lang Hames2016-10-251-8/+10
| | | | llvm-svn: 285134
* [docs] Fix a couple of typos in the new Error docs.Lang Hames2016-10-251-2/+2
| | | | llvm-svn: 285133
* [Sparc] Don't overlap variable-sized allocas with other stack variables.James Y Knight2016-10-254-10/+76
| | | | | | | | | | | | | | | | | | | | On SparcV8, it was previously the case that a variable-sized alloca might overlap by 4-bytes the last fixed stack variable, effectively because 92 (the number of bytes reserved for the register spill area) != 96 (the offset added to SP for where to start a DYNAMIC_STACKALLOC). It's not as simple as changing 96 to 92, because variables that should be 8-byte aligned would then be misaligned. For now, simply increase the allocation size by 8 bytes for each dynamic allocation -- wastes space, but at least doesn't overlap. As the large comment says, doing this more efficiently will require larger changes in llvm. Also adds some test cases showing that we continue to not support dynamic stack allocation and over-alignment in the same function. llvm-svn: 285131
* [codeview] support emitting indirect virtual base class informationBob Haarman2016-10-256-234/+77
| | | | | | | | | | | | | | | | Summary: Fixes PR28281. MSVC lists indirect virtual base classes in the field list of a class, using LF_IVBCLASS records. This change makes LLVM emit such records when processing DW_TAG_inheritance tags with the DIFlagVirtual and (newly introduced) DIFlagIndirect tags. Reviewers: rnk, ruiu, zturner Differential Revision: https://reviews.llvm.org/D25578 llvm-svn: 285130
* [DAGCombiner] Enable (urem x, (shl pow2, y)) -> (and x, (add (shl pow2, y), ↵Simon Pilgrim2016-10-252-48/+11
| | | | | | -1)) combine for splatted vectors llvm-svn: 285129
* [PGO] Fix select instruction annotationRong Xu2016-10-253-4/+61
| | | | | | | | | | | | | | | | Summary: Select instruction annotation in IR PGO uses the edge count to infer the branch count. It's currently placed in setInstrumentedCounts() where no all the BB counts have been computed. This leads to wrong branch weights. Move the annotation after all BB counts are populated. Reviewers: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25961 llvm-svn: 285128
* [X86][SSE] Regenerated known-bits test with srem->urem fixSimon Pilgrim2016-10-251-18/+18
| | | | llvm-svn: 285124
* [DAGCombiner] Enable srem(x.y) -> urem(x,y) combine for vectorsSimon Pilgrim2016-10-252-49/+11
| | | | | | SelectionDAG::SignBitIsZero (via SelectionDAG::computeKnownBits) has supported vectors since rL280927 llvm-svn: 285123
* [docs] Add more Error documentation to the Programmer's Manual.Lang Hames2016-10-251-48/+356
| | | | | | | | This patch updates some of the existing Error examples, expands on the documentation for handleErrors, and includes new sections that cover a number of helpful utilities and common error usage idioms. llvm-svn: 285122
* [X86][SSE] Added vector srem combine testsSimon Pilgrim2016-10-251-0/+123
| | | | llvm-svn: 285121
* [X86][SSE] Added vector urem combine testsSimon Pilgrim2016-10-251-0/+208
| | | | llvm-svn: 285119
* [DAGCombiner] Enable sdiv(x.y) -> udiv(x,y) combine for vectorsSimon Pilgrim2016-10-252-40/+14
| | | | | | SelectionDAG::SignBitIsZero (via SelectionDAG::computeKnownBits) has supported vectors since rL280927 llvm-svn: 285118
* [InstCombine] Resubmit the combine of A->B->A BitCast and fix for pr27996Guozhi Wei2016-10-255-0/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original patch of the A->B->A BitCast optimization was reverted by r274094 because it may cause infinite loop inside compiler https://llvm.org/bugs/show_bug.cgi?id=27996. The problem is with following code xB = load (type B); xA = load (type A); +yA = (A)xB; B -> A +zAn = PHI[yA, xA]; PHI +zBn = (B)zAn; // A -> B store zAn; store zBn; optimizeBitCastFromPhi generates +zBn = (B)zAn; // A -> B and expects it will be combined with the following store instruction to another store zAn Unfortunately before combineStoreToValueType is called on the store instruction, optimizeBitCastFromPhi is called on the new BitCast again, and this pattern repeats indefinitely. optimizeBitCastFromPhi only generates BitCast for load/store instructions, only the BitCast before store can cause the reexecution of optimizeBitCastFromPhi, and BitCast before store can easily be handled by InstCombineLoadStoreAlloca.cpp. So the solution to the problem is if all users of a CI are store instructions, we should not do optimizeBitCastFromPhi on it. Then optimizeBitCastFromPhi will not be called on the new BitCast instructions. Differential Revision: https://reviews.llvm.org/D23896 llvm-svn: 285116
* [X86][SSE] Added vector sdiv combine testsSimon Pilgrim2016-10-251-0/+212
| | | | llvm-svn: 285112
* revert: "Remove debug location from common tail when tail-merging"Robert Lougher2016-10-253-85/+8
| | | | | | | | This reverts r285093, as it caused unexpected buildbot failures on clang-ppc64le-linux, clang-ppc64be-linux, clang-ppc64be-linux-multistage and clang-ppc64be-linux-lnt. Failing test ubsan/TestCases/TypeCheck/vptr.cpp. llvm-svn: 285110
OpenPOWER on IntegriCloud