summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GlobalISel: Verify G_GEPMatt Arsenault2019-02-052-0/+48
| | | | llvm-svn: 353209
* [CMake] Support compiler-rt builtins library in testsPetr Hosek2019-02-055-5/+15
| | | | | | | | | | | | | | | | | | | | We're building tests with -nostdlib which means that we need to explicitly include the builtins library. When using libgcc (default) we can simply include -lgcc_s on the link line, but when using compiler-rt builtins we need a complete path to the builtins library. This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY, so we just need to pass that path to lit and if config.compiler_rt is true, link it to the test. Prior to this patch, running tests when compiler-rt is being used as the builtins library was broken as all tests would fail to link, but with this change running tests when compiler-rt bultins library is being used should be supported. Differential Revision: https://reviews.llvm.org/D56701 llvm-svn: 353208
* [AMDGPU] Consider XOR in waterfall loop as a terminatorScott Linder2019-02-052-1/+116
| | | | | | | | Ensure the XOR in the waterfall loop for indirect addressing is considered a terminator. Differential Revision: https://reviews.llvm.org/D57703 llvm-svn: 353207
* [libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdefLouis Dionne2019-02-055-37/+11
| | | | | | | | | | | When the whole test only works starting at some version of the Standard, use UNSUPPORTED lit markup instead of #ifdef TEST_STD_VER. This provides more visibility into the test suite. Reviewed as https://reviews.llvm.org/D57704. Thanks to Andrey Maksimov for the patch. llvm-svn: 353206
* [sanitizer] Fix unused function 'unpoison_passwd'Vitaly Buka2019-02-051-12/+4
| | | | llvm-svn: 353205
* [DEBUG_INFO][NVPTX] Generate correct data about variable address class.Alexey Bataev2019-02-053-0/+57
| | | | | | | | | | | | | | | | | | | | | Summary: Added ability to generate correct debug info data about the variable address class. Currently, for all the locals and globals the default values are used, ADDR_local_space(6) for locals and ADDR_global_space(5) for globals. The values are taken from the table in https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf. We need to emit correct data for address classes of, at least, shared and constant globals. Currently, all these variables are treated by the cuda-gdb debugger as the variables in the global address space and, thus, it require manual data type casting. Reviewers: echristo, probinson Subscribers: jholewinski, aprantl, cfe-commits Differential Revision: https://reviews.llvm.org/D57162 llvm-svn: 353204
* [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.Alexey Bataev2019-02-055-11/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: According to https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf, the compiler should emit the DW_AT_address_class attribute for all variable and parameter. It means, that DW_AT_address_class attribute should be used in the non-standard way to support compatibility with the cuda-gdb debugger. Clang is able to generate the information about the variable address class. This information is emitted as the expression sequence `DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef`. The patch tries to find all such expressions and transform them into `DW_AT_address_class <DWARF Address Space>` if target is NVPTX and the debugger is gdb. If the expression is not found, then default values are used. For the local variables <DWARF Address Space> is set to ADDR_local_space(6), for the globals <DWARF Address Space> is set to ADDR_global_space(5). The values are taken from the table in the same section 5.2. CUDA-Specific DWARF Definitions. Reviewers: echristo, probinson Subscribers: jholewinski, aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D57157 llvm-svn: 353203
* AMDGPU: Fix assert on trunc from bitcast of build_vectorMatt Arsenault2019-02-052-3/+19
| | | | | | | | | The v2i64 argument is lowered to a bitcast of v4i32 build_vector. This would then attempt to use the i32-element as the source of the vector truncate. This really would need to collect 2 elements from the build_vector to produce the intended truncate. llvm-svn: 353202
* [libcxx] Start defining lit features for tests depending on availabilityLouis Dionne2019-02-0547-321/+65
| | | | | | | | | | | | | | | | | This patch removes some vendor-specific availability XFAILs from the test suite. In the future, when a new feature is introduced in the dylib, an availability macro should be created and a matching lit feature should be created. That way, the test suite can XFAIL whenever the implementation lacks the necessary feature instead of being cluttered by vendor-specific annotations. Right now, those vendor-specific annotations are still somewhat cluttering the test suite by being in `config.py`, but at least they are localized. In the future, we could design a way to define those less intrusively or even automatically based on the availability macros that already exist in <__config>. llvm-svn: 353201
* Inline a trivial function and update comment. NFC.Rui Ueyama2019-02-051-9/+7
| | | | llvm-svn: 353200
* [opaque pointer types] More trivial changes to pass FunctionType to CallInst.James Y Knight2019-02-056-22/+28
| | | | | | | | Change various functions to use FunctionCallee or Function*. Pass function type through __builtin_dump_struct's dumpRecord helper. llvm-svn: 353199
* [X86][SSE] Disable ZERO_EXTEND shuffle combiningSimon Pilgrim2019-02-053-21/+36
| | | | | | rL352997 enabled ZERO_EXTEND from non-shuffle-able value types. I've disabled it for now to fix a regression identified by @asbirlea until I can fix this properly. llvm-svn: 353198
* Minor cleanup: remove CGBuild::CreateConst*ByteGEP overloads taking a Value*.James Y Knight2019-02-052-21/+7
| | | | llvm-svn: 353197
* [unittests] Fix warningJonas Devlieghere2019-02-051-1/+1
| | | | | | | warning: comparison of integers of different signs: 'const int' and 'const unsigned long' [-Wsign-compare] llvm-svn: 353196
* [Reproducers] Instrumentation Framework: SerializationJonas Devlieghere2019-02-055-0/+556
| | | | | | | | | | | | This is the is serialization/deserialization part of the reproducer instrumentation framework. For all the details refer to the RFC on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2019-January/014530.html Differential revision: https://reviews.llvm.org/D57714 llvm-svn: 353195
* [PGO] Fix the type of the formated variablePetar Jovanovic2019-02-051-1/+1
| | | | | | | | | | | | Change the format type of Value to PRIu64 since it is a uint64_t. The problem was detected on mips boards building 32-bit binaries, where it was printing junk values and causing test failure. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D57583 llvm-svn: 353194
* [LLVM-C] Add Bindings to GlobalIFuncRobert Widmann2019-02-054-2/+245
| | | | | | | | | | | | | | | | | Summary: Adds the standard gauntlet of accessors for global indirect functions and updates the echo test. Now it would be nice to have a target abstraction so one could know if they have access to a suitable ELF linker and runtime. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56177 llvm-svn: 353193
* Enable integrated assembler on MSP430 by default.Anton Korobeynikov2019-02-052-1/+2
| | | | | | | | Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56787 llvm-svn: 353192
* [Obj-C] Fix undefined behaviour(s) in the new NSTaggedDate formatter.Davide Italiano2019-02-051-28/+24
| | | | | | | | | | | | Type punning through a union -> no good. double to uint64 to double again -> no good either. The nice side effect, other than silencing the sanitizer bot is that it fixes the formatting of some dates, e.g. Jan 1st 1970. <rdar://problem/47617983> llvm-svn: 353191
* [AArch64][Outliner] Don't outline BTI instructionsOliver Stannard2019-02-052-0/+30
| | | | | | | | | | | We can't outline BTI instructions, because they need to be the very first instruction executed after an indirect call or branch. If we outline them, then an indirect call might go to the branch to the outlined function, which will fault. Differential revision: https://reviews.llvm.org/D57753 llvm-svn: 353190
* [X86][AVX] Attempt to combine shuffles to subvector broadcast loadSimon Pilgrim2019-02-052-4/+20
| | | | llvm-svn: 353189
* AArch64/GlobalISel: Don't clamp from 2 to 2Matt Arsenault2019-02-051-2/+2
| | | | | | This is equivalent to clampMaxNumElements, but saves a check. llvm-svn: 353188
* [WebAssembly] Use wasm-ld rather than lld with -flavor in tests. NFC.Sam Clegg2019-02-052-4/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D57758 llvm-svn: 353187
* [OPENMP] issue error messages for multiple teams contructs in a target constructKelvin Li2019-02-052-1/+17
| | | | | | | | | | | | | | | | The fix is to issue error messages if there are more than one teams construct inside a target constructs. #pragma omp target { #pragma omp teams { ... } #pragma omp teams { ... } } llvm-svn: 353186
* [libc++] Control whether exceptions are enabled in the macOS trunk testing ↵Louis Dionne2019-02-051-7/+15
| | | | | | script llvm-svn: 353185
* [opaque pointer types] Pass function types for runtime function calls.James Y Knight2019-02-0528-573/+588
| | | | | | | | | | | | | Emit{Nounwind,}RuntimeCall{,OrInvoke} have been modified to take a FunctionCallee as an argument, and CreateRuntimeFunction has been modified to return a FunctionCallee. All callers have been updated. Additionally, CreateBuiltinFunction is removed, as it was redundant with CreateRuntimeFunction after some previous changes. Differential Revision: https://reviews.llvm.org/D57668 llvm-svn: 353184
* [WebAssembly] Object: Remove redundant method. NFC.Sam Clegg2019-02-052-6/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D57719 llvm-svn: 353183
* [X86][AVX] Add PR34041 subvector broadcast test casesSimon Pilgrim2019-02-051-0/+170
| | | | llvm-svn: 353182
* [opaque pointer types] Fix the CallInfo passed to EmitCall in someJames Y Knight2019-02-057-45/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | edge cases. Currently, EmitCall emits a call instruction with a function type derived from the pointee-type of the callee. This *should* be the same as the type created from the CallInfo parameter, but in some cases an incorrect CallInfo was being passed. All of these fixes were discovered by the addition of the assert in EmitCall which verifies that the passed-in CallInfo matches the Callee's function type. As far as I know, these issues caused no bugs at the moment, as the correct types were ultimately being emitted. But, some would become problematic when pointee types are removed. List of fixes: * arrangeCXXConstructorCall was passing an incorrect value for the number of Required args, when calling an inheriting constructor where the inherited constructor is variadic. (The inheriting constructor doesn't actually get passed any of the user's args, but the code was calculating it as if it did). * arrangeFreeFunctionLikeCall was not including the count of the pass_object_size arguments in the count of required args. * OpenCL uses other address spaces for the "this" pointer. However, commonEmitCXXMemberOrOperatorCall was not annotating the address space on the "this" argument of the call. * Destructor calls were being created with EmitCXXMemberOrOperatorCall instead of EmitCXXDestructorCall in a few places. This was a problem because the calling convention sometimes has destructors returning "this" rather than void, and the latter function knows about that, and sets up the types properly (through calling arrangeCXXStructorDeclaration), while the former does not. * generateObjCGetterBody: the 'objc_getProperty' function returns type 'id', but was being called as if it returned the particular property's type. (That is of course the *dynamic* return type, and there's a downcast immediately after.) * OpenMP user-defined reduction functions (#pragma omp declare reduction) can be called with a subclass of the declared type. In such case, the call was being setup as if the function had been actually declared to take the subtype, rather than the base type. Differential Revision: https://reviews.llvm.org/D57664 llvm-svn: 353181
* [NFC][libc++] Reindent functionLouis Dionne2019-02-051-4/+2
| | | | llvm-svn: 353180
* [CGP] add test for unsigned subtract of 1 with overflow; NFCSanjay Patel2019-02-051-13/+28
| | | | llvm-svn: 353179
* [AArch64][x86] add tests for unsigned subtract with overflow; NFCSanjay Patel2019-02-052-0/+402
| | | | llvm-svn: 353178
* gn build: BUILD.gn files for clang-tidy and clang-apply-replacementsNico Weber2019-02-0526-1/+731
| | | | | | | | Patch from Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57329 llvm-svn: 353177
* Fix typo in comment, NFCIKrasimir Georgiev2019-02-051-1/+1
| | | | llvm-svn: 353176
* gn build: Merge r353072Nico Weber2019-02-051-0/+1
| | | | llvm-svn: 353175
* Update Xcode project after r353047Stefan Granitz2019-02-051-15/+12
| | | | llvm-svn: 353174
* Recommit: Detect incorrect FileCheck variable CLI definitionThomas Preud'homme2019-02-052-9/+43
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: While the backend code of FileCheck relies on definition of variable from the command-line to have an equal sign '=' and a variable name before that, the frontend does not actually enforce it. This leads to FileCheck crashing when invoked with invalid syntax for the -D option. This patch adds the missing validation in the frontend. It also makes the -D option an AlwaysPrefix option to be able to detect -D=FOO as being a define without variable and -D as missing its value. Copyright: - Linaro (changes in version 2 of revision D55940) - GraphCore (changes in later versions) Reviewers: jdenny Subscribers: JonChesterfield, hiraditya, kristina, probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D55940 llvm-svn: 353173
* Recommit: Add support for prefix-only CLI optionsThomas Preud'homme2019-02-053-7/+94
| | | | | | | | | | | | | | | | | | | | | | Summary: Add support for options that always prefix their value, giving an error if the value is in the next argument or if the option is given a value assignment (ie. opt=val). This is the desired behavior for the -D option of FileCheck for instance. Copyright: - Linaro (changes in version 2 of revision D55940) - GraphCore (changes in later versions and introduced when creating D56549) Reviewers: jdenny Subscribers: llvm-commits, probinson, kristina, hiraditya, JonChesterfield Differential Revision: https://reviews.llvm.org/D56549 llvm-svn: 353172
* [X86][SSE] Rename SimplifyDemandedVectorElts BLENDV testsSimon Pilgrim2019-02-051-6/+6
| | | | | | I'm going to be adding SimplifyDemandedBits tests shortly. llvm-svn: 353171
* [MCA] Moved the logic that updates register dependencies from DispatchStage ↵Andrea Di Biagio2019-02-057-39/+32
| | | | | | | | | | | to RegisterFile. NFC DispatchStage should always delegate to an object of class RegisterFile the task of updating data dependencies. ReadState and WriteState objects should not be modified directly by DispatchStage. This patch also renames stage IS_AVAILABLE to IS_DISPATCHED. llvm-svn: 353170
* gn build: Fix Python 3 write_vcsrevision script compatibilitySerge Guelton2019-02-051-1/+1
| | | | | | | | | | Trivial fix: decode was not called for all subprocess.check_output calls. Commited on behalf of Andrew Boyarshin Differential Revision: https://reviews.llvm.org/D57505 llvm-svn: 353168
* [X86][SSE] Add SimplifyDemandedVectorElts support for X86ISD::BLENDVSimon Pilgrim2019-02-052-11/+25
| | | | llvm-svn: 353165
* [X86][SSE] Add tests showing missing SimplifyDemandedVectorElts support for ↵Simon Pilgrim2019-02-051-0/+60
| | | | | | X86ISD::BLENDV llvm-svn: 353164
* [NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 defaultNemanja Ivanovic2019-02-0514-21/+21
| | | | | | | | | | | When Clang/LLVM is built with the CLANG_DEFAULT_STD_CXX CMake macro that sets the default standard to something other than C++14, there are a number of lit tests that fail as they rely on the C++14 default. This patch just adds the language standard option explicitly to such test cases. Differential revision: https://reviews.llvm.org/D57581 llvm-svn: 353163
* [MCA] Simplify the logic in method WriteState::addUser. NFCIAndrea Di Biagio2019-02-051-5/+1
| | | | | | | | In some cases, it is faster to just grow the set of 'Users' rather than performing a llvm::find_if every time a new user is added to the set. No functional change intended. llvm-svn: 353162
* [Expressions] Fix -Wreorder warning from r353149Krasimir Georgiev2019-02-051-4/+3
| | | | | | | | | | | | | | | | | | Summary: ``` ClangExpressionDeclMap.cpp:72:60: error: field 'm_struct_vars' will be initialized after field 'm_ctx_obj' [-Werror,-Wreorder] m_result_delegate(result_delegate), m_parser_vars(), m_struct_vars(), ``` Reviewers: bkramer, aleksandr.urakov Reviewed By: aleksandr.urakov Subscribers: aleksandr.urakov Differential Revision: https://reviews.llvm.org/D57742 llvm-svn: 353161
* Fix ICE on reference binding with mismatching addr spaces.Anastasia Stulova2019-02-052-10/+28
| | | | | | | | | | | | When we attempt to add an addr space qual to a type already qualified by an addr space ICE is triggered. Before creating a type with new address space, remove the old addr space. Fixing PR38614! Differential Revision: https://reviews.llvm.org/D57524 llvm-svn: 353160
* [DebugInfo][NFCI] Split salvageDebugInfo into helper functionsJeremy Morse2019-02-052-82/+94
| | | | | | | | | | | | | | | Some use cases are appearing where salvaging is needed that does not correspond to an instruction being deleted -- for example an instruction being sunk, or a Value not being available in a block being isel'd. Enable more fine grained control over how salavging occurs by splitting the logic into helper functions, separating things that are specific to working on DbgVariableIntrinsics from those specific to interpreting IR and building DIExpressions. Differential Revision: https://reviews.llvm.org/D57696 llvm-svn: 353156
* Fix format string in bindings/go/llvm/ir_test.go (PR40561)Hans Wennborg2019-02-051-2/+2
| | | | | | | | | | | | | | The test started failing for me recently. I don't see any changes around this code, so maybe it's my local go version that changed or something. The error seems real to me: we're trying to print an Attribute with %d. The test talks about "attribute masks" I'm not sure what that refers to, but I suppose we could print the raw pointer value, since that's what the test seems to be comparing. Differential revision: https://reviews.llvm.org/D57672 llvm-svn: 353155
* [X86][AVX] Attempt to share broadcasts of different widths (PR39454)Simon Pilgrim2019-02-053-119/+103
| | | | | | | | If we have broadcasts of different vector widths, keep the longest vector width and extract subvectors for the shorter vectors (which should be free). Differential Revision: https://reviews.llvm.org/D57663 llvm-svn: 353154
OpenPOWER on IntegriCloud