summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Revert r330195 "[NEON] Define vget_high_f16() and vget_low_f16() intrinsics ↵Ivan A. Kosarev2018-04-182-8/+16
| | | | | | | | in AArch64 mode only". Differential Revision: https://reviews.llvm.org/D45668 llvm-svn: 330248
* Report more precise error message when attach failsPavel Labath2018-04-183-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: If the remote stub sends a specific error message instead of just a E?? code, we can use this to display a more informative error message instead of just the generic "unable to attach" message. I write a test for this using the SB API. On the console this will show up like: (lldb) process attach ... error: attach failed: <STUB-MESSAGE> if the stub supports error messages, or: error: attach failed: Error ?? if it doesn't. Reviewers: jingham, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D45573 llvm-svn: 330247
* [UpdateTestChecks] Add update_mca_test_checks.py scriptGreg Bedwell2018-04-1835-166/+1393
| | | | | | | | | | | This script can be used to regenerate tests in the test/tools/llvm-mca directory (PR36904). Regenerated a number of tests using the pattern: test/tools/llvm-mca/*/*/*.s Differential Revision: https://reviews.llvm.org/D45369 llvm-svn: 330246
* [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.Haojian Wu2018-04-184-14/+38
| | | | | | | | | | | | | | Summary: Fix https://bugs.llvm.org/show_bug.cgi?id=34900. Reviewers: alexfh Reviewed By: alexfh Subscribers: JonasToth, klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D45697 llvm-svn: 330245
* [MinGW] Look for a cross sysroot relative to the clang binaryMartin Storsjo2018-04-182-1/+25
| | | | | | | | | If found, prefer this over looking for a similar gcc later in the system path. Differential Revision: https://reviews.llvm.org/D45504 llvm-svn: 330244
* [DebugInfo] Sink related dbg users when sinking in InstCombineBjorn Pettersson2018-04-183-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When sinking an instruction in InstCombine we now also sink the DbgInfoIntrinsics that are using the sunken value. Example) When sinking the load in this input bb.X: %0 = load i64, i64* %start, align 4, !dbg !31 tail call void @llvm.dbg.value(metadata i64 %0, ...) br i1 %cond, label %for.end, label %for.body.lr.ph for.body.lr.ph: br label %for.body we now also move the dbg.value, like this bb.X: br i1 %cond, label %for.end, label %for.body.lr.ph for.body.lr.ph: %0 = load i64, i64* %start, align 4, !dbg !31 tail call void @llvm.dbg.value(metadata i64 %0, ...) br label %for.body In the past we haven't moved the dbg.value so we got bb.X: tail call void @llvm.dbg.value(metadata i64 %0, ...) br i1 %cond, label %for.end, label %for.body.lr.ph for.body.lr.ph: %0 = load i64, i64* %start, align 4, !dbg !31 br label %for.body So in the past we got a debug-use before the def of %0. And that dbg.value was also on the path jumping to %for.end, for which %0 never was defined. CodeGenPrepare normally comes to rescue later (when not moving the dbg.value), since it moves dbg.value instrinsics quite brutally, without really analysing if it is correct to move the intrinsic (see PR31878). So at the moment this patch isn't expected to have much impact, besides that it is moving the dbg.value already in opt, making the IR look more sane directly. This can be seen as a preparation to (hopefully) make it possible to turn off CodeGenPrepare::placeDbgValues later as a solution to PR31878. I also adjusted test/DebugInfo/X86/sdagsplit-1.ll to make the IR in the test case up-to-date with this behavior in InstCombine. Reviewers: rnk, vsk, aprantl Reviewed By: vsk, aprantl Subscribers: mattd, JDevlieghere, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D45425 llvm-svn: 330243
* [NFC] Remove doxygen brief tag from BasicBlock.hMatt Davis2018-04-181-52/+51
| | | | | | | | | | | | | | Summary: Documentation is built using the AutoBrief configuration option in docs/doxygen.cfg.in. This change removes the redundant brief tags from BasicBlock.h. I'm happy to write a sed script and remove all \brief tags as a separate commit later. Reviewers: aprantl Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45708 llvm-svn: 330242
* [X86][Broadwell] Remove some unnecessary InstRW overrides and add some FIXMEs.Craig Topper2018-04-181-43/+8
| | | | llvm-svn: 330241
* [Modules] Turn on system header validation for implicit modulesBruno Cardoso Lopes2018-04-183-1/+15
| | | | | | | | | | After r300027 implicit builds might fail when updating the SDK on darwin. Make validation of system headers default when implicit modules is on and allow modules to be rebuild when system headers change. rdar://problem/19767523 llvm-svn: 330240
* [X86] Give CMOV 2 cycle latency on SLM.Craig Topper2018-04-182-181/+181
| | | | llvm-svn: 330239
* [X86] Don't crash on bad operand modifiers in inline assemblyCraig Topper2018-04-182-0/+14
| | | | | | | | | | | | | | Summary: Previously if a modifer was placed on a non-GPR register class we would hit an assert or crash. Reviewers: echristo Reviewed By: echristo Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D45751 llvm-svn: 330238
* [InstCombine] peek through bitcasted vector/array pointer GEP operandSanjay Patel2018-04-182-5/+45
| | | | | | | | | | | | | | The bitcast may be interfering with other combines or vectorization as shown in PR16739: https://bugs.llvm.org/show_bug.cgi?id=16739 Most pointer-related optimizations are probably able to look through this bitcast, but removing the bitcast shrinks the IR, so it's at least a size savings. Differential Revision: https://reviews.llvm.org/D44833 llvm-svn: 330237
* Fix lock order inversion between ManagedStatic and StatisticBob Haarman2018-04-171-2/+13
| | | | | | | | | | | | | | | | | | | | | Summary: Statistic and ManagedStatic both use mutexes. There was a lock order inversion where, during initialization, Statistic's mutex would be held while taking ManagedStatic's, and in llvm_shutdown, ManagedStatic's mutex would be held while taking Statistic's mutex. This change causes Statistic's initialization code to avoid holding its mutex while calling ManagedStatic's methods, avoiding the inversion. Reviewers: dsanders, rtereshin Reviewed By: dsanders Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D45398 llvm-svn: 330236
* COFF: Friendlier undefined symbol errors.Peter Collingbourne2018-04-1710-9/+315
| | | | | | | | | | | | | | | Summary: This change does three things: - Try to find the file and line number of an undefined symbol reference by reading codeview debug info. - Try to find the name of the function or global variable with the undefined symbol reference by searching the object file's symbol table. - Prints the information in the same style as the ELF linker. Differential Revision: https://reviews.llvm.org/D45467 llvm-svn: 330235
* [ELF] Add profile guided section layoutMichael J. Spencer2018-04-1713-19/+693
| | | | | | | | | | | | | | | | | This adds profile guided layout using the Call-Chain Clustering (C³) heuristic from https://research.fb.com/wp-content/uploads/2017/01/cgo2017-hfsort-final1.pdf . RFC: [llvm-dev] [RFC] Profile guided section layout http://lists.llvm.org/pipermail/llvm-dev/2017-June/114178.html Pass `--call-graph-ordering-file <file>` to read a call graph profile where each line has the format: <from symbol> <to symbol> <call count> Differential Revision: https://reviews.llvm.org/D36351 llvm-svn: 330234
* Reland r330223, "COFF: Merge .idata, .didat and .edata into .rdata by ↵Peter Collingbourne2018-04-1710-37/+44
| | | | | | | | | | | | | | | | | | | | | default.", which was reverted in r330228. In this reland I removed an unnecessary use of /debug in the test delayimports32.test and used the /pdbaltpath flag in the test pdb-publics-import.test, both of which avoid embedding absolute PDB paths in executables which could affect later RVAs. Original commit message: > COFF: Merge .idata, .didat and .edata into .rdata by default. > > This saves a little space and matches what link.exe does. > > Tested using the chromium Windows trybots: > https://chromium-review.googlesource.com/c/chromium/src/+/1014784 Differential Revision: https://reviews.llvm.org/D45737 llvm-svn: 330233
* COFF: Implement /pdbaltpath flag.Peter Collingbourne2018-04-174-21/+26
| | | | | | | | | | | I needed to revert r330223 because we were embedding an absolute PDB path in the .rdata section, which ended up being laid out before the .idata section and affecting its RVAs. This flag will let us control the embedded path. Differential Revision: https://reviews.llvm.org/D45747 llvm-svn: 330232
* [XRay][compiler-rt] Add noop patch functions for unsupported arches.Keith Wyss2018-04-175-0/+30
| | | | | | | | | | | | | | Summary: Typed event patching is implemented for x86-64, but functions must be defined for other arches. Reviewers: dberris, pelikan Subscribers: nemanjai, javed.absar, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45749 llvm-svn: 330231
* [AMDGPU] Enabled v2.16 literals for VOP3PStanislav Mekhanoshin2018-04-1714-64/+68
| | | | | | | | Literal encoding needs op_sel_hi to select low 16 bit in this case. Differential Revision: https://reviews.llvm.org/D45745 llvm-svn: 330230
OpenPOWER on IntegriCloud