summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LTO] Drop non-prevailing definitions only if linkage is not local or appendingPirama Arumuga Nainar2018-11-0811-39/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes PR 37422 In ELF, non-weak symbols can also be non-prevailing. In this particular PR, the __llvm_profile_* symbols are non-prevailing but weren't getting dropped - causing multiply-defined errors with lld. Also add a test, strong_non_prevailing.ll, to ensure that multiple copies of a strong symbol are dropped. To fix the test regressions exposed by this fix, - do not mark prevailing copies for symbols with 'appending' linkage. There's no one prevailing copy for such symbols. - fix the prevailing version in dead-strip-fulllto.ll - explicitly pass exported symbols to llvm-lto in fumcimport.ll and funcimport_var.ll Reviewers: tejohnson, pcc Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, dang, srhines, llvm-commits Differential Revision: https://reviews.llvm.org/D54125 llvm-svn: 346436
* [lldb] Fix initialization order warnings.Jorge Gorbe Moya2018-11-081-1/+1
| | | | | | | | | | | | | | | Moved the declaration of m_kind below the declaration of cvclass, cvunion and cvenum. This order is necessary because in one of the constructors the initialization of m_kind depends on the value of cvclass. third_party/llvm/llvm/tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp:50:7: error: field 'cvclass' will be initialized after field 'm_kind' [-Werror,-Wreorder] : cvclass(std::move(c)), ^ third_party/llvm/llvm/tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp:51:14: error: field 'cvclass' is uninitialized when used here [-Werror,-Wuninitialized] m_kind(cvclass.Kind == TypeRecordKind::Struct ? Struct : Class) {} llvm-svn: 346435
* [X86] Regenerate loaduse testSimon Pilgrim2018-11-081-3/+8
| | | | llvm-svn: 346434
* [x86] use shuffles for scalar insertion into high elements of a constant vectorSanjay Patel2018-11-082-45/+82
| | | | | | | | | | | | | | | As discussed in D54073, we have a potential regression from more aggressive vector narrowing here, so let's try to avoid that by changing build-vector lowering slightly. Insert-vector-element lowering always does this since there's no "pinsr" for ymm/zmm: // If the vector is wider than 128 bits, extract the 128-bit subvector, insert // into that, and then insert the subvector back into the result. ...but we can sometimes do better for insert-into-constant-vector by using shuffle lowering. Differential Revision: https://reviews.llvm.org/D54271 llvm-svn: 346433
* [DAGCombine] Improve alias analysis for chain of independent stores.Nirav Dave2018-11-089-232/+272
| | | | | | | | | | | | | | | | | | | FindBetterNeighborChains simulateanously improves the chain dependencies of a chain of related stores avoiding the generation of extra token factors. For chains longer than the GatherAllAliasDepths, stores further down in the chain will necessarily fail, a potentially significant waste and preventing otherwise trivial parallelization. This patch directly parallelize the chains of stores before improving each store. This generally improves DAG-level parallelism. Reviewers: courbet, spatel, RKSimon, bogner, efriedma, craig.topper, rnk Subscribers: sdardis, javed.absar, hiraditya, jrtc27, atanasyan, llvm-commits Differential Revision: https://reviews.llvm.org/D53552 llvm-svn: 346432
* Fix -Wextra-qualification warningReid Kleckner2018-11-081-1/+1
| | | | llvm-svn: 346431
* Fix bug in PE/COFF plugin and ValueObjectVariable.Zachary Turner2018-11-085-11/+61
| | | | | | | | | | | | | | | | | | There are two bugs here. The first is that MSVC and clang-cl emit their bss section under the name '.data' instead of '.bss' but with the size and file offset set to 0. ObjectFilePECOFF didn't handle this, and would only recognize a section as bss if it was actually called '.bss'. The effect of this is that if we tried to print the value of a variable that lived in BSS we would fail. The second bug is that ValueObjectVariable was only returning the forward type, which is insufficient to print the value of an enum. So we bump this up to the layout type. Differential Revision: https://reviews.llvm.org/D54241 llvm-svn: 346430
* [NativePDB] Higher fidelity reconstruction of AST from Debug Info.Zachary Turner2018-11-0811-36/+500
| | | | | | | | | | | | | | | | | | | | | | | | | In order to accurately put a type into the correct location in the AST we construct from debug info, we need to be able to determine what DeclContext (namespace, global, nested class, etc) that it goes into. PDB doesn't contain this mapping. It does, however, contain the reverse mapping. That is, for a given class type T, you can determine all classes Q1, Q2, ..., Qn that are nested inside of T. We need to know, for a given class type Q, what type T is it nested inside of. This patch builds this map as a pre-processing step when we first load the PDB by scanning every type. Initial tests show that while this can be slow in debug builds of LLDB, it is quite fast in release builds (less than 2 seconds for a ~1GB PDB, and it only needs to happen once). Furthermore, having this pre-processing step in place allows us to repurpose it for building up other kinds of indexing to it down the line. For the time being, this gives us very accurate reconstruction of the DeclContext hierarchy. Differential Revision: https://reviews.llvm.org/D54216 llvm-svn: 346429
* Refactor ClangASTContext::AddEnumerationValueToEnumerationType() to remove ↵Shafik Yaghmour2018-11-088-47/+117
| | | | | | | | | | redundant parameter which can be calculated from other parameter. rdar://problem/43822994 Differential Revision: https://reviews.llvm.org/D54003 llvm-svn: 346428
* [COFF] Improve relocation against discarded section errorReid Kleckner2018-11-084-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Reuse the "referenced by" note diagnostic code that we already use for undefined symbols. In my case, it turned this: lld-link: error: relocation against symbol in discarded section: .text lld-link: error: relocation against symbol in discarded section: .text ... Into this: lld-link: error: relocation against symbol in discarded section: .text >>> referenced by libANGLE.lib(CompilerGL.obj):(.SCOVP$M) >>> referenced by libANGLE.lib(CompilerGL.obj):(.SCOVP$M) ... lld-link: error: relocation against symbol in discarded section: .text >>> referenced by obj/third_party/angle/libGLESv2/entry_points_egl_ext.obj:(.SCOVP$M) >>> referenced by obj/third_party/angle/libGLESv2/entry_points_egl_ext.obj:(.SCOVP$M) ... I think the new output is more useful. Reviewers: ruiu, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54240 llvm-svn: 346427
* [x86] add RUNs for AVX1; NFCSanjay Patel2018-11-081-14/+82
| | | | | | Differences in splat-ability might be reason to differentiate some cases. llvm-svn: 346426
* [NFC][BdVer2] Load and store throughput tests: also check sched stats (PR39465)Roman Lebedev2018-11-082-2/+240
| | | | | | | | As noted by Andrea Di Biagio in https://bugs.llvm.org/show_bug.cgi?id=39465 both the loads and stores occupy both the store and load queues. This is clearly wrong. llvm-svn: 346425
* [llvm-mca] Partially revert r346417.Matt Davis2018-11-081-16/+19
| | | | | | | Restored the llvm:: namespace qualifier on make_unique. This removes the ambiguity with make_unique. llvm-svn: 346424
* Add test case for the regression caused by r344696Nicolai Haehnle2018-11-081-0/+24
| | | | | | | | (That change has since been reverted.) Reduced from https://bugs.freedesktop.org/show_bug.cgi?id=108611 llvm-svn: 346423
* InstCombine: Avoid introducing poison values when lowering llvm.amdgcn.[us]bfeTom Stellard2018-11-082-36/+12
| | | | | | | | | | | | | | | | | | | Summary: When the 3rd argument to these intrinsics is zero, lowering them to shift instructions produces poison values, since we end up with shift amounts equal to the number of bits in the shifted value. This means we can only lower these intrinsics if we can prove that the 3rd argument is not zero. Reviewers: arsenm Reviewed By: arsenm Subscribers: bnieuwenhuizen, jvesely, wdng, nhaehnle, llvm-commits Differential Revision: https://reviews.llvm.org/D53739 llvm-svn: 346422
* [CodeExtractor] Mark functions noreturn when applicableVedant Kumar2018-11-082-0/+10
| | | | | | | | | | This eliminates the outlining penalty for llvm.trap/unreachable, because callers no longer have to emit cleanup/ret instructions after calling an outlined `noreturn` function. rdar://45523626 llvm-svn: 346421
* Introduce `sanitizer_malloc_introspect_t` for Darwin which is a sub-class of ↵Dan Liew2018-11-081-1/+23
| | | | | | | | | | | | | | | | | | | | | | Darwin's `malloc_introspection_t` and use it when setting up the malloc zone. Summary: Currently `sanitizer_malloc_introspection_t` just adds a version field which is used to version the allocator ABI. The current allocator ABI version is returned by the new `GetMallocZoneAllocatorEnumerationVersion()` function. The motivation behind this change is to allow external processes to determine the allocator ABI of a sanitized process. rdar://problem/45284065 Reviewers: kubamracek, george.karpenkov, vitalybuka Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D54045 llvm-svn: 346420
* [llvm-mca] PR39261: Rename FetchStage to EntryStage.Andrea Di Biagio2018-11-085-22/+23
| | | | | | | | | | | | This fixes PR39261. FetchStage is a misnomer. It causes confusion with the frontend fetch stage, which we don't currently simulate. I decided to rename it into EntryStage mainly because this is meant to be a "source" stage for all pipelines. Differential Revision: https://reviews.llvm.org/D54268 llvm-svn: 346419
* [clang-tidy] Untangle layering in ClangTidyDiagnosticConsumer somewhat. NFCSam McCall2018-11-085-21/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: Clang's hierarchy is CompilerInstance -> DiagnosticsEngine -> DiagnosticConsumer. (Ownership is optional/shared, but this structure is fairly clear). Currently ClangTidyDiagnosticConsumer *owns* the DiagnosticsEngine: - this inverts the hierarchy, which is confusing - this means ClangTidyDiagnosticConsumer() mutates the passed-in context, which is both surprising and limits flexibility - it's not possible to use a different DiagnosticsEngine with ClangTidy This means a little bit more code in the places ClangTidy is used standalone, but more flexibility in using ClangTidy with other diagnostics configurations. Reviewers: hokein Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D54033 llvm-svn: 346418
* [llvm-mca] Remove unneeded namespace qualifier. NFC.Matt Davis2018-11-081-24/+21
| | | | llvm-svn: 346417
* [docs] Clarify ELF section naming for StackMaps and fix a typoPhilip Reames2018-11-082-4/+7
| | | | llvm-svn: 346416
* [clang-tidy] fix test after r346414Sam McCall2018-11-081-1/+3
| | | | llvm-svn: 346415
* [Tooling] Produce diagnostics for missing input files.Sam McCall2018-11-082-3/+1
| | | | | | | | | | | | | | | | | | Summary: This was disabled way back in 2011, in the dark times before Driver was VFS-aware. Also, make driver more VFS-aware :-) This breaks one ClangTidy test (we improved the error message), will fix when submitting. Reviewers: ioeric Subscribers: cfe-commits, alexfh Differential Revision: https://reviews.llvm.org/D53958 llvm-svn: 346414
* Fix bitcast to address space cast for coerced load/stores Yaxun Liu2018-11-082-4/+57
| | | | | | | | | | | Coerced load/stores through memory do not take into account potential address space differences when it creates its bitcasts. Patch by David Salinas. Differential Revision: https://reviews.llvm.org/D53780 llvm-svn: 346413
* [dsymutil] Copy the LC_BUILD_VERSION load command into the companion binary.Adrian Prantl2018-11-083-14/+40
| | | | | | | | | | | | | LC_BUILD_VERSION contains platform information that is useful for LLDB to match up dSYM bundles with binaries. This patch copies the load command over into the dSYM. rdar://problem/44145175 rdar://problem/45883463 Differential Revision: https://reviews.llvm.org/D54233 llvm-svn: 346412
* [PowerPC][llvm-exegesis] Add a PowerPC targetJinsong Ji2018-11-088-0/+318
| | | | | | | | | This is patch to add PowerPC target to llvm-exegesis. The target does just enough to be able to run llvm-exegesis in latency mode for at least some opcodes. Differential Revision: https://reviews.llvm.org/D54185 llvm-svn: 346411
* Revert "[MSP430] Add MC layer"Davide Italiano2018-11-0873-3327/+1309
| | | | | | | | | | | This commit broke the module buildbots. Error: lib/Target/MSP430/MSP430GenAsmMatcher.inc:1027:1: error: redundant namespace 'llvm' [-Wmodules-import-nested-redundant] ^ llvm-svn: 346410
* [Profile] The test for gcov-fork seems to be ok on armCalixte Denizet2018-11-081-2/+0
| | | | | | | | | | | | | | Summary: Remove the XFAIL for arm since it seems to be ok Reviewers: marco-c Reviewed By: marco-c Subscribers: javed.absar, kristof.beyls, delcypher, chrib, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D54263 llvm-svn: 346409
* [OPENMP]Make lambda mapping follow reqs for PTR_AND_OBJ mapping.Alexey Bataev2018-11-082-17/+40
| | | | | | | | The base pointer for the lambda mapping must point to the lambda capture placement and pointer must point to the captured variable itself. Patch fixes this problem. llvm-svn: 346408
* [OPENMP]Make lambda mapping follow reqs for PTR_AND_OBJ mapping.Alexey Bataev2018-11-081-5/+6
| | | | | | | | | | | | | | | Summary: The base pointer for the lambda mapping must point to the lambda capture placement and pointer must point to the captured variable itself. Patch fixes this problem. Reviewers: gtbercea Subscribers: guansong, openmp-commits, kkwli0, caomhin Differential Revision: https://reviews.llvm.org/D54260 llvm-svn: 346407
* [SystemZ] Bugfix in shouldCoalesce()Jonas Paulsson2018-11-082-10/+83
| | | | | | | | | | | | | | | | | | | | It was discovered in randomized testing that the SystemZ implementation of shouldCoalesce() could be caused to crash when subreg liveness was enabled. This was because an undef use of the virtual register was copied outside current MBB at the point of shouldCoalesce() being called. For more details, see https://bugs.llvm.org/show_bug.cgi?id=39276. This patch changes the check for MBB locality from livein/liveout checks to do checks for all instructions of both intervals being inside MBB. This avoids the cases with dead defs / undef uses outside MBB, which are not affecting liveness in/out of MBB. The original test case included as a reduced .mir test case. Review: Ulrich Weigand https://reviews.llvm.org/D54197 llvm-svn: 346406
* [docs] Clarify expectations for stack map sections and AOT compilersPhilip Reames2018-11-081-3/+22
| | | | llvm-svn: 346405
* [NFC][BdVer2] Tests for load and store throughput (PR39465)Roman Lebedev2018-11-082-0/+1209
| | | | | | | | | | | | | | | | During review it was noted that while it appears that the Piledriver can do two [consecutive] loads per cycle, it can only do one store per cycle. It was suggested that the sched model incorrectly models that, but it was opted to fix this afterwards. These tests show that the two consecutive loads are modelled correctly, and one consecutive stores is not modelled incorrectly. Unless i'm missing the point. https://bugs.llvm.org/show_bug.cgi?id=39465 llvm-svn: 346404
* [LLD] Fix Microsoft precompiled headers cross-compile on LinuxAlexandre Ganea2018-11-085-33/+34
| | | | | | Differential revision: https://reviews.llvm.org/D54122 llvm-svn: 346403
* [X86][SSE] Add PR39387 shuffle test caseSimon Pilgrim2018-11-081-0/+66
| | | | llvm-svn: 346402
* [ARM] Enable spilling of the hGPR register class in Thumb2Petr Pavlu2018-11-082-6/+52
| | | | | | | | | | Generalize code in Thumb2InstrInfo::storeRegToStackSlot() and loadRegToStackSlot() to allow the GPR class or any of its sub-classes (including hGPR) to be stored/loaded by ARM::t2STRi12/ARM::t2LDRi12. Differential Revision: https://reviews.llvm.org/D51927 llvm-svn: 346401
* [llvm-exegesis][NFC] Add missing header guard + cosmetics.Clement Courbet2018-11-082-1/+7
| | | | | | | | | | | | Reviewers: gchatelet Reviewed By: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D54252 llvm-svn: 346400
* [X86][AVX] Tidyup prefixes and regenerate interleaved testsSimon Pilgrim2018-11-081-184/+103
| | | | | | Share common AVX prefix and split off AVX2OR512 prefix instead llvm-svn: 346399
* Revert "[llvm-exegesis] Add a snippet generator to generate snippets to ↵Clement Courbet2018-11-0816-204/+28
| | | | | | | | compute ROB sizes." This reverts accidental commit rL346394. llvm-svn: 346398
* Return "[IndVars] Smart hard uses detection"Max Kazantsev2018-11-084-16/+118
| | | | | | | | | | The patch has been reverted because it ended up prohibiting propagation of a constant to exit value. For such values, we should skip all checks related to hard uses because propagating a constant is always profitable. Differential Revision: https://reviews.llvm.org/D53691 llvm-svn: 346397
* Adding Yvan as release test backup for DianaRenato Golin2018-11-081-2/+2
| | | | | | Thanks for offering to help, Yvan! :) llvm-svn: 346396
* [llvm-exegesis] Add a snippet generator to generate snippets to compute ROB ↵Clement Courbet2018-11-0816-28/+204
| | | | | | sizes. llvm-svn: 346394
* clang-cl: Add "/clang:" pass-through arg support.Hans Wennborg2018-11-085-14/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-cl driver disables access to command line options outside of the "Core" and "CLOption" sets of command line arguments. This filtering makes it impossible to pass arguments that are interpreted by the clang driver and not by either 'cc1' (the frontend) or one of the other tools invoked by the driver. An example driver-level flag is the '-fno-slp-vectorize' flag, which is processed by the driver in Clang::ConstructJob and used to set the cc1 flag "-vectorize-slp". There is no negative cc1 flag or -mllvm flag, so it is not currently possible to disable the SLP vectorizer from the clang-cl driver. This change introduces the "/clang:" argument that is available when the driver mode is set to CL compatibility. This option works similarly to the "-Xclang" option, except that the option values are processed by the clang driver rather than by 'cc1'. An example usage is: clang-cl /clang:-fno-slp-vectorize /O2 test.c Another example shows how "/clang:" can be used to pass a flag where there is a conflict between a clang-cl compat option and an overlapping clang driver option: clang-cl /MD /clang:-MD /clang:-MF /clang:test_dep_file.dep test.c In the previous example, the unprefixed /MD selects the DLL version of the msvc CRT, while the prefixed -MD flag and the -MF flags are used to create a make dependency file for included headers. One note about flag ordering: the /clang: flags are concatenated to the end of the argument list, so in cases where the last flag wins, the /clang: flags will be chosen regardless of their order relative to other flags on the driver command line. Patch by Neeraj K. Singh! Differential revision: https://reviews.llvm.org/D53457 llvm-svn: 346393
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-0837-7/+1061
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 llvm-svn: 346392
* [MSP430] Fix encodeInstruction() for big endian hostsAnton Korobeynikov2018-11-081-4/+3
| | | | | | | | | | Reviewers: asl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54251 llvm-svn: 346391
* [LSR] Combine unfolded offset into invariant registerGil Rapaport2018-11-083-67/+117
| | | | | | | | | | | | | | | LSR reassociates constants as unfolded offsets when the constants fit as immediate add operands, which currently prevents such constants from being combined later with loop invariant registers. This patch modifies GenerateCombinations() to generate a second formula which includes the unfolded offset in the combined loop-invariant register. This commit fixes a bug in the original patch (committed at r345114, reverted at r345123). Differential Revision: https://reviews.llvm.org/D51861 llvm-svn: 346390
* [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCondMax Kazantsev2018-11-082-1/+16
| | | | | | | | | | | | | | | | | | We have a lot of various bugs that are caused by misuse of SCEV (in particular in LV), all of them can simply be described as "we ask SCEV to prove some fact on invalid IR". Some of examples of those are PR36311, PR37221, PR39160. The problem is that these failues manifest differently (what we saw was failure of various asserts across SCEV, but there can also be miscompiles). This patch adds an assert into two SCEV methods that strongly rely on correctness of the IR and are involved in known failues. This will at least allow us to have a clear indication of what was wrong in this case. This patch also fixes a unit test with incorrect IR that fails this verification. Differential Revision: https://reviews.llvm.org/D52930 Reviewed By: fhahn llvm-svn: 346389
* [bindings/go] Add Go bindings to LLVMGetIndiceswhitequark2018-11-081-0/+13
| | | | | | | | | | | | | | Summary: This instruction is useful for inspecting extractvalue/insertvalue in IR. Unlike most other operations, indices cannot be inspected using the generic Value.Opcode() function so a specialized function needs to be added. Reviewers: whitequark, pcc Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53883 llvm-svn: 346388
* [OCaml] Fix incorrect use of CAMLlocal in nested blockswhitequark2018-11-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: The OCaml manual states: > Local variables of type value must be declared with one of the > CAMLlocal macros. [...] These macros must be used at the beginning > of the function, not in a nested block. This patch moves several instances of CAMLlocal macros from nested blocks to the function beginning. Reviewers: whitequark Reviewed By: whitequark Subscribers: CodaFi, llvm-commits Differential Revision: https://reviews.llvm.org/D53841 llvm-svn: 346387
* [MergeFuncs] Improve ordering of equal functionswhitequark2018-11-082-9/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: MergeFunctions currently tries to process strong functions before weak functions, because weak functions can simply call strong functions, while a strong/weak function cannot call a weak function (a backing strong function is needed). This patch additionally tries to process external functions before local functions, because we definitely have to keep the external function, but may be able to drop the local one (and definitely can if it is also unnamed_addr). Unfortunately, this exposes an existing bug in the implementation: The FnTree and FNodesInTree structures can currently go out of sync in the case where two weak functions are merged, because the function in FnTree/FNodesInTree is RAUWed. This leaves it behind in FnTree (this is intended, as it is the strong backing function which should be used for further merges), while it is replaced in FNodesInTree (this is not intended). This is fixed by switching FNodesInTree from using a ValueMap to using a DenseMap of AssertingVH. This exposes another minor issue: Currently FNodesInTree is not cleared after MergeFunctions finishes running. Currently, this is potentially dangerous (e.g. if something else wants to RAUW a function with a non-function), but at the very least it is unnecessary/inefficient. After the change to use AssertingVH it becomes more problematic, because there are certainly passes that remove functions. This issue is fixed by clearing FNodesInTree at the end of the pass. Reviewers: jfb, whitequark Reviewed By: whitequark Subscribers: rkruppe, llvm-commits Differential Revision: https://reviews.llvm.org/D53271 llvm-svn: 346386
OpenPOWER on IntegriCloud