summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Correct the Defs, Uses, hasSideEffects, mayLoad, mayStore for XCHG and ↵Craig Topper2018-04-183-35/+52
| | | | | | | | XADD instructions. I don't think we emit any of these from codegen except for using XCHG16ar as 2 byte NOP. llvm-svn: 330298
* [HWASan] Add "N" suffix to generic __hwasan_load/store.Alex Shlyapnikov2018-04-183-8/+30
| | | | | | | | | | | | | | | Summary: "N" suffix is added by the instrumentation and interface functions are expected to be exported from the library as __hwasan_loadN* and __hwasan_storeN*. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45739 llvm-svn: 330297
* [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma ↵Artem Belevich2018-04-1810-169/+703
| | | | | | | | | | instructions. The new instructions were added added for sm_70+ GPUs in CUDA-9.1. Differential Revision: https://reviews.llvm.org/D45068 llvm-svn: 330296
* [llvm-mca][X86] Add mmx versions of SSSE3 instructionsSimon Pilgrim2018-04-182-23/+135
| | | | | | Move PABS instructions incorrectly tested under SSE2 llvm-svn: 330295
* [RISCV] Add test changes missed from rL330293Alex Bradbury2018-04-181-4/+0
| | | | llvm-svn: 330294
* [RISCV] Introduce pattern for materialising immediates with 0 for lower 12 bitsAlex Bradbury2018-04-186-54/+32
| | | | | | | These immediates can be materialised with just an lui, rather than an lui+addi pair. llvm-svn: 330293
* [RuntimeDebugBuilder] Print vectors passed without withspacesTobias Grosser2018-04-181-8/+2
| | | | | | | | | | | | | | | | | Originally the RuntimeDebugBuilder printed vectors with withspaces between the elements. This historic use is meanwhile gone, but the functionality is still available. We now change the behavior to print elements just one after the other without adding white spaces in between. This is useful for D45743, an upcoming commmit, which also adds test coverage for this feature. In general, printing elements of a vector directly is more generic as it allows uses where no white-spaces are desired. Specifically, it allows the user to build vectors of items to be printed where their length is only known at run-time. llvm-svn: 330292
* [RISCV] Add imm-cse.ll test caseAlex Bradbury2018-04-181-0/+39
| | | | | | | | | This test case demonstrates that common subexpression elimination takes place between code sequences for materialising constants. In particular, it demonstrates that redundant lui aren't generated. This would capture a regression if applying a patch such as D41949. llvm-svn: 330291
* [NFC] test case clean upLei Huang2018-04-181-54/+14
| | | | | | | 1. remove redundant tests 2. update XForm_tests to generated expected code gen llvm-svn: 330290
* [RuntimeDebugBuilder] Turn assert into an unreachableTobias Grosser2018-04-181-2/+1
| | | | llvm-svn: 330289
* [RISCV] Expand codegen -> compression sanity checks and move to a single fileAlex Bradbury2018-04-184-85/+169
| | | | | | | | | | The objdump tests interfere with update_llc_test_checks.py and can't be automatically update them. Put the sanitify check for compression on the codegen codepath into a separate file, and expand it to also include tests of integer materialisation. This would catch changes such as those triggered by D41949. llvm-svn: 330288
* [X86] Fix the Uses/Defs,mayLoad,mayStore,hasSideEffects flags for the ↵Craig Topper2018-04-181-6/+13
| | | | | | | | CMPXCHG instructions. The compiler only emits the locked version of these which use different instruction definitions. The versions fixed here are only used by the assembler/disassembler. llvm-svn: 330287
* add extra acronyms for objc property namesYan Zhang2018-04-182-0/+7
| | | | | | | | | | | | | | Summary: This is to support general acronyms in Objective-C like 2G/3G/4G/... and coordinates X, Y, Z and W. Reviewers: benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D45750 llvm-svn: 330286
* [ScopDetect / ScopInfo] Get statistics for scops without any loop correctlyTobias Grosser2018-04-183-5/+37
| | | | | | Make sure we also counts scops not containing any loops. llvm-svn: 330285
* [OPENMP] Fix -Wunused-lambda-capture. NFCFangrui Song2018-04-181-0/+1
| | | | llvm-svn: 330284
* [OpenMP] Fix affinity API for KMP_AFFINITY=none|compact|scatterJonathan Peyton2018-04-184-2/+29
| | | | | | | | | | | | | | | | | | | | | Currently, the affinity API reports garbage for the initial place list and any thread's place lists when using KMP_AFFINITY=none|compact|scatter. This patch does two things: for KMP_AFFINITY=none, Creates a one entry table for the places, this way, the initial place list is just a single place with all the proc ids in it. We also set the initial place of any thread to 0 instead of KMP_PLACE_ALL so that the thread reports that single place (place 0) instead of garbage (-1) when using the affinity API. When non-OMP_PROC_BIND affinity is used (including KMP_AFFINITY=compact|scatter), a thread's place list is populated correctly. We assume that each thread is assigned to a single place. This is implemented in two of the affinity API functions Differential Revision: https://reviews.llvm.org/D45527 llvm-svn: 330283
* Introduce GOMP_taskloop APIJonathan Peyton2018-04-189-22/+297
| | | | | | | | | | | | | | | This patch introduces GOMP_taskloop to our API. It adds GOMP_4.5 to our version symbols. Being a wrapper around __kmpc_taskloop, the function creates a task with the loop bounds properly nested in the shareds so that the GOMP task thunk will work properly. Also, the firstprivate copy constructors are properly handled using the __kmp_gomp_task_dup() auxiliary function. Currently, only linear spawning of tasks is supported for the GOMP_taskloop interface. Differential Revision: https://reviews.llvm.org/D45327 llvm-svn: 330282
* Revert "[RISCV] implement li pseudo instruction"Alex Bradbury2018-04-1819-536/+185
| | | | | | | | | Reverts rL330224, while issues with the C extension and missed common subexpression elimination opportunities are addressed. Neither of these issues are visible in current RISC-V backend unit tests, which clearly need expanding. llvm-svn: 330281
* [CUDA] added missing __ldg(const signed char *)Artem Belevich2018-04-181-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D45780 llvm-svn: 330280
* [HIP] Add driver input type for HIPYaxun Liu2018-04-183-6/+22
| | | | | | | | | Patch by Greg Rodgers. Revised by Yaxun Liu. Differential Revision: https://reviews.llvm.org/D45489 llvm-svn: 330279
* [Power9]Legalize and emit code for converting Unsigned HWord/Char to ↵Lei Huang2018-04-182-0/+149
| | | | | | | | | | | | | | | | Quad-Precision Legalize and emit code for converting unsigned HWord/Char to QP: xscvsdqp xscvudqp Only covering patterns for unsigned forms cause we don't have part-word sign-extending integer loads into VSX registers. Differential Revision: https://reviews.llvm.org/D45494 llvm-svn: 330278
* [MinGW] Try to fix asan testing after r330244Martin Storsjo2018-04-181-6/+5
| | | | | | Twines shouldn't be stored as they can refer to temporaries. llvm-svn: 330277
* [AArch64] Add isel pattern for v8i8->v2f32 NVCASTs.Amara Emerson2018-04-182-0/+17
| | | | | | rdar://39454635 llvm-svn: 330276
* [LIT] Have lit run the lldb test suiteJonas Devlieghere2018-04-184-5/+133
| | | | | | | | | | | | | | | | | | | | This is the first in what will hopefully become a series of patches to replace the driver logic in dotest.py with LIT. The motivation for this change is that there's no point in maintaining two driver implementations. Since all of the LLVM projects are using lit, this is the obvious choice. Obviously the goal is maintain full compatibility with the functionality offered by dotest. As such we won't be removing anything until that point has been reached. This patch is the initial attempt (referred to as v1) to run the lldb test suite with lit. To do so we introduced a custom LLDB test format that invokes dotest.py with a single test file. Differential revision: https://reviews.llvm.org/D45333 llvm-svn: 330275
* [RISCV] Add specific tests for materialising imm32hi20 constantsAlex Bradbury2018-04-181-0/+16
| | | | | | | i.e. constants that can be materialised with a single lui, as the lower 12 bits are zero. llvm-svn: 330274
* [Power9]Legalize and emit code for converting (Un)Signed Word to Quad-PrecisionLei Huang2018-04-182-2/+170
| | | | | | | | | | | Legalize and emit code for converting (Un)Signed Word to quad-precision via: xscvsdqp xscvudqp Differential Revision: https://reviews.llvm.org/D45389 llvm-svn: 330273
* [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.Alexey Bataev2018-04-185-4/+134
| | | | | | | | | | | | | | Summary: NVPTX target supports debug info in DWARF-2 format. Patch adds emission of debug info in DWARF-2 by default. Reviewers: tra, jlebar Subscribers: aprantl, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D42581 llvm-svn: 330272
* [DEBUG] Initial adaptation of NVPTX target for debug info emission.Alexey Bataev2018-04-1815-308/+8898
| | | | | | | | | | | | | | | Summary: Patch adds initial emission of the debug info for NVPTX target. Currently, only .file and .loc directives are emitted, everything else is commented out to not break the compilation of Cuda. Reviewers: echristo, jlebar, tra, jholewinski Subscribers: mgorny, aprantl, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D41827 llvm-svn: 330271
* [OPENMP] Code cleanup and code improvements.Alexey Bataev2018-04-187-1085/+1071
| | | | llvm-svn: 330270
* [x86] Switch EFLAGS copy lowering to use reg-reg form of testing forChandler Carruth2018-04-187-32/+32
| | | | | | | | | | | | | | | | a zero register. Previously I tried this and saw LLVM unable to transform this to fold with memory operands such as spill slot rematerialization. However, it clearly works as shown in this patch. We turn these into `cmpb $0, <mem>` when useful for folding a memory operand without issue. This form has no disadvantage compared to `testb $-1, <mem>`. So overall, this is likely no worse and may be slightly smaller in some cases due to the `testb %reg, %reg` form. Differential Revision: https://reviews.llvm.org/D45475 llvm-svn: 330269
* [sanitizer] Minor refactor of ThreadDescriptorSizeKostya Kortchinsky2018-04-181-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While I was sifting through dead code findings, I stumbled on this function. First, for `__s390__` it always returned 0 for the 1st call, which doesn't seem right. 2nd call & beyond would return the correct value though. Then it duplicated the `atomic_store` multiple times, sometimes with a `if`, sometimes without. Finally it used a capitalized variable name starting with `k` which indicates a constant, and it is not. So: - rename the static global variable; - change the atomic functions to their relaxed version; - move the store to the end, and make sure we return `val` all the time. Reviewers: alekseyshl, eugenis, koriakin Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D45725 llvm-svn: 330268
* [llvm-mca] Use WithColor for printing errorsJonas Devlieghere2018-04-181-12/+15
| | | | | | | | Use convenience helpers in WithColor to print errors and notes. Differential revision: https://reviews.llvm.org/D45666 llvm-svn: 330267
* [support] Revert the changes made to Path.inc for the default Windows code pageAaron Smith2018-04-181-11/+5
| | | | | | | | | Path.inc/widenPath tries to decode the path using both UTF-8 and the default Windows code page. This is no longer necessary with the new InitLLVM method which ensures that the command line arguemnts are already UTF-8 on Windows. llvm-svn: 330266
* Fix macosx build broken by r330249Pavel Labath2018-04-182-4/+41
| | | | | | | | | | | | | It seems llc crashes when targetting darwin with split-dwarf (pr37164). This happens on all inputs, not just the one I added in the above commit. Work around the issue by hardcoding the target triple to linux, which is what all split-dwarf tests seem to be doing. As I don't know of a way to specify the os part of the triple without spelling out the architecture as well, I move the new test to the X86 folder. llvm-svn: 330265
* [x86] Fix PR37100 by teaching the EFLAGS copy lowering to rewrite usesChandler Carruth2018-04-184-82/+235
| | | | | | | | | | | | | | | | | | | | | | across basic blocks in the limited cases where it is very straight forward to do so. This will also be useful for other places where we do some limited EFLAGS propagation across CFG edges and need to handle copy rewrites afterward. I think this is rapidly approaching the maximum we can and should be doing here. Everything else begins to require either heroic analysis to prove how to do PHI insertion manually, or somehow managing arbitrary PHI-ing of EFLAGS with general PHI insertion. Neither of these seem at all promising so if those cases come up, we'll almost certainly need to rewrite the parts of LLVM that produce those patterns. We do now require dominator trees in order to reliably diagnose patterns that would require PHI nodes. This is a bit unfortunate but it seems better than the completely mysterious crash we would get otherwise. Differential Revision: https://reviews.llvm.org/D45673 llvm-svn: 330264
* [llvm-exegesis] Early out if the scheduler models have no extra info.Simon Pilgrim2018-04-181-1/+4
| | | | | | We were calling getExtraProcessorInfo() without checking hasExtraProcessorInfo(), resulting in an assertion. llvm-svn: 330263
* [llvm-profdata] Use WithColor for printing errorsJonas Devlieghere2018-04-181-6/+12
| | | | | | | | Use convenience helpers in WithColor to print errors and warnings. Differential revision: https://reviews.llvm.org/D45658 llvm-svn: 330262
* [llvm-link] Use WithColor for printing errorsJonas Devlieghere2018-04-186-22/+29
| | | | | | | | Use convenience helpers in WithColor to print errors and warnings. Differential revision: https://reviews.llvm.org/D45667 llvm-svn: 330261
* [llvm-exegesis] Use LLVMTargetMachine pointer everywhere. NFCI.Simon Pilgrim2018-04-181-1/+1
| | | | | | Avoid calling the unique_ptr multiple times. llvm-svn: 330260
* [SimplifyLibcalls] Realloc(null, N) -> Malloc(N)Sanjay Patel2018-04-185-21/+79
| | | | | | | | Patch by Dávid Bolvanský! Differential Revision: https://reviews.llvm.org/D45413 llvm-svn: 330259
* [llvm-exegesis] Put a newline at the end of each error report.Simon Pilgrim2018-04-181-2/+2
| | | | | | Makes multiple error messages much easier to read. llvm-svn: 330258
* [AMDGPU] Fix issues for backend divergence trackingDavid Stuttard2018-04-184-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A change to use divergence analysis in the AMDGPU backend was getting formal arguments incorrect (not tagged as divergent) unless they were VGPR0, VGPR1 or VGPR2 For graphics shaders it is possible to have more than these passed in as VGPR Modified the checking code to check for any VGPR registers passed in as formal arguments. Also, some intrinsics that are sources of divergence may have been lowered during instruction selection and are missed on subsequent calls to isSDNodeSourceOfDivergence - added the relevant AMDGPUISD checks as well. Finally, the FunctionLoweringInfo tracks virtual registers that are live across basic block boundaries. This is used to check for divergence of CopyFromRegister registers using the DivergenceAnalysis analysis. For multiple blocks the lazily evaluated inverted map VirtReg2Value was not cleared when the ValueMap map was. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D45372 Change-Id: I112f3bd6dfe0f62e63ce9b43b893982778e4bee3 llvm-svn: 330257
* [IRCE] Only check for NSW on equality predicatesSam Parker2018-04-182-35/+32
| | | | | | | | | | | After investigation discussed in D45439, it would seem that the nsw flag restriction is unnecessary in most cases. So the IsInductionVar lambda has been removed, the functionality extracted, and now only require nsw when using eq/ne predicates. Differential Revision: https://reviews.llvm.org/D45617 llvm-svn: 330256
* [llvm-exegesis] Pull out LLVMTargetMachine to simplify debugging. NFCI.Simon Pilgrim2018-04-181-1/+2
| | | | | | Has been useful while trying to get around all the error reporting issues mentioned on PR37049. llvm-svn: 330255
* [Sema] Disable built-in increment operator for bool in overload resolution ↵Jan Korous2018-04-182-5/+21
| | | | | | | | | | | | | | | | | in C++17 Following: https://llvm.org/svn/llvm-project/cfe/trunk@329804 For C++17 the wording of [over.built] p4 excluded bool: For every pair (T , vq), where T is an arithmetic type other than bool, there exist candidate operator functions of the form vq T & operator++(vq T &); T operator++(vq T &, int); Differential Revision: https://reviews.llvm.org/D45569 llvm-svn: 330254
* Add tests for shrink wrapping and VLAsMomchil Velikov2018-04-182-0/+189
| | | | | | Differential revision: https://reviews.llvm.org/D45727 llvm-svn: 330253
* [gold] Add support for optimization remarksTeresa Johnson2018-04-182-0/+88
| | | | | | | | | | | | | | Summary: Adds support for LTO opt remarks (optionally with hotness) to gold-plugin. Reviewers: anemet Subscribers: fhahn, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D45752 llvm-svn: 330252
* [cmake] Improve pthread_[gs]etname_np detection codePavel Labath2018-04-182-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Due to some android peculiarities, in some build configurations (statically linked executables targeting older releases) we could detect the presence of these functions (because they are present in libc.a, where check_library_exists searches), but then fail to build because the headers did not include the definition. This attempts to remedy that by upgrading the check_library_exists to check_symbol_exists, which will check that the function is declared too. I am hoping that a more thorough check will make the messy #ifdef we have accumulated in the code obsolete, so I optimistically try to remove them. Reviewers: zturner, kparzysz, danalbert Subscribers: srhines, mgorny, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D45359 llvm-svn: 330251
* [LoopUnroll] Only peel if a predicate becomes known in the loop body.Florian Hahn2018-04-182-135/+166
| | | | | | | | | | | | | If a predicate does not become known after peeling, peeling is unlikely to be beneficial. Reviewers: mcrosier, efriedma, mkazantsev, junbuml Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D44983 llvm-svn: 330250
* [CodeGen/Dwarf] Make debug_names compatible with split-dwarfPavel Labath2018-04-184-7/+21
| | | | | | | | | | | | | | | | | | Summary: Previously we crashed for the combination of the two features because we tried to reference the dwo CU from the main object file. The fix consists of two items: - reference the skeleton CU from the name index (the consumer is expected to use the skeleton CU to find the real data). - use the main object file string pool for the strings in the index Reviewers: JDevlieghere, aprantl, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45566 llvm-svn: 330249
OpenPOWER on IntegriCloud