1. Jun 10, 2020
    • Sam McCall's avatar
      Reland [clangd] Resolve driver symlinks, and look up unknown relative drivers in PATH. · 2a3ac01b
      Sam McCall authored
      This reverts commit f25e3c2d.
      Added workaround for tempdir being a symlink on mac.
      2a3ac01b
    • Christopher Tetreault's avatar
      [SVE] Eliminate calls to default-false VectorType::get() from FuzzMutate · e8f815a4
      Christopher Tetreault authored
      Reviewers: efriedma, kmclaughlin, sdesmalen, bogner, chandlerc, c-rhodes, david-arm, fpetrogalli
      
      Reviewed By: c-rhodes
      
      Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D80325
      e8f815a4
    • Thomas Lively's avatar
      [NFC][WebAssembly] Add tests for alignment on new SIMD loads · a9641452
      Thomas Lively authored
      Summary:
      The natural alignments for extending and splatting loads had not
      previously been tested. It is good to have them tested because they
      are non-obvious details in the SIMD spec proposal.
      
      Reviewers: aheejin
      
      Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D81303
      a9641452
    • diggerlin's avatar
      Added test case for the patch D75866 "supporting the visibility attribute for aix assembly" · 2a3f5021
      diggerlin authored
      The test case has been reviewed in the patch D75866
      
      Reviewers: Jason Liu ,hubert.reinterpretcast,James Henderson
      
      Differential Revision: https://reviews.llvm.org/D75866
      2a3f5021
    • Bruno Ricci's avatar
      [clang][NFC] Fix and simplify the test added in 8dcc7eec · 856ba638
      Bruno Ricci authored
      We only have to create a TypeTraitExpr node with 16 bits worth of
      arguments to detect an overflow with the assertion added in the
      constructor of TypeTraitExpr. Moreover the static_assert in
      original test is pointless since __is_constructible only check
      that the corresponding expression is well-formed.
      856ba638
    • diggerlin's avatar
      [AIX] supporting the visibility attribute for aix assembly · edd819c7
      diggerlin authored
      SUMMARY:
      
      in the aix assembly , it do not have .hidden and .protected directive.
      in current llvm. if a function or a variable which has visibility attribute, it will generate something like the .hidden or .protected , it can not recognize by aix as.
      in aix assembly, the visibility attribute are support in the pseudo-op like
      .extern Name [ , Visibility ]
      .globl Name [, Visibility ]
      .weak Name [, Visibility ]
      
      in this patch, we implement the visibility attribute for the global variable, function or extern function .
      
      for example.
      
      extern __attribute__ ((visibility ("hidden"))) int
        bar(int* ip);
      __attribute__ ((visibility ("hidden"))) int b = 0;
      __attribute__ ((visibility ("hidden"))) int
        foo(int* ip){
         return (*ip)++;
      }
      the visibility of .comm linkage do not support , we will have a separate patch for it.
      we have the unsupported cases ("default" and "internal") , we will implement them in a a separate patch for it.
      
      Reviewers: Jason Liu ,hubert.reinterpretcast,James Henderson
      
      Differential Revision: https://reviews.llvm.org/D75866
      edd819c7
    • Louis Dionne's avatar
      [libc++abi] Replace LIBCXXABI_HAS_NO_EXCEPTIONS by TEST_HAS_NO_EXCEPTIONS · e6d94f4b
      Louis Dionne authored
      This clarifies the difference between test for exception support in
      libc++abi tests and support for exceptions built into libc++abi.
      This also removes the rather confusing similarity between the
      _LIBCXXABI_NO_EXCEPTIONS and LIBCXXABI_HAS_NO_EXCEPTIONS macros.
      
      Finally, TEST_HAS_NO_EXCEPTIONS is also detected automatically based
      on -fno-exceptions, so it doesn't have to be specified explicitly
      through Lit's compile_flags.
      e6d94f4b
    • Jaroslav Sevcik's avatar
      [lldb] Fix and enable Windows minidump tests · fac5d05e
      Jaroslav Sevcik authored
      SBFileSpec.fullpath always uses the forward slash to join the directory with the
      base name. This causes mismatches when comparing Windows paths with backslashes
      in two of the minidump tests. To get around that we just compare the directory
      names separately from the filenames.
      
      Reviewed By: labath
      
      Differential Revision: https://reviews.llvm.org/D81465
      fac5d05e
    • Louis Dionne's avatar
      [libc++abi][libunwind] Don't override libc++'s handling of exception features · 168681ab
      Louis Dionne authored
      0e04342a simplified exceptions-related configurations for libc++abi
      and libunwind by reusing the logic in libc++. However, it missed the fact
      that libc++abi and libunwind were overriding libc++'s handling of exceptions.
      
      This commit removes special handling in libc++abi and libunwind to use
      the logic in libc++, which is the right one.
      168681ab
    • Mitch Phillips's avatar
      [HWASan] Add sizeof(global) in report even if symbols missing. · e26b25f8
      Mitch Phillips authored
      Summary: Refactor the current global header iteration to be callback-based, and add a feature that reports the size of the global variable during reporting. This allows binaries without symbols to still report the size of the global variable, which is always available in the HWASan globals PT_NOTE metadata.
      
      Reviewers: eugenis, pcc
      
      Reviewed By: pcc
      
      Subscribers: mgorny, llvm-commits, #sanitizers
      
      Tags: #sanitizers, #llvm
      
      Differential Revision: https://reviews.llvm.org/D80599
      e26b25f8
    • Mitch Phillips's avatar
      Rebase. · 9bca45bd
      Mitch Phillips authored
      9bca45bd
    • Mitch Phillips's avatar
      remove redundant comment about Android. · 2ecf32fb
      Mitch Phillips authored
      2ecf32fb
    • Mitch Phillips's avatar
      Address Peter's comments. · 1bfb5b8e
      Mitch Phillips authored
      1bfb5b8e
    • Mitch Phillips's avatar
      Move DSO dependencies inside the group. · 184b4376
      Mitch Phillips authored
      184b4376
    • Mitch Phillips's avatar
      Patch up issues with GN builds (pthread / libz) · 9e9142cb
      Mitch Phillips authored
      Summary:
      Fixes up two small issues with the gn build.
      
       1 - Ensures that the correct ldflag `-pthread` is provided, not just linking the library.
       2 - Ensures that libraries are linked in the same group as the dependencies. This fixes a problem where system libraries (libc) are involved in a link-order dependency that's not being fulfilled.
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D80591
      9e9142cb
    • LLVM GN Syncbot's avatar
      [gn build] Port d5c28c40 · a7e0d55d
      LLVM GN Syncbot authored
      a7e0d55d
    • Craig Topper's avatar
      [X86] Move CPUKind enum from clang to llvm/lib/Support. NFCI · d5c28c40
      Craig Topper authored
      Similar to what some other targets have done. This information
      could be reused by other frontends so doesn't make sense to live
      in clang.
      
      -Rename CK_Generic to CK_None to better reflect its illegalness.
      -Move function for translating from string to enum into llvm.
      -Call checkCPUKind directly from the string to enum translation
      and update CPU kind to CK_None accordinly. Caller will use CK_None
      as sentinel for bad CPU.
      
      I'm planning to move all the CPU to feature mapping out next. As
      part of that I want to devise a better way to express CPUs inheriting
      features from an earlier CPU. Allowing this to be expressed in a
      less rigid way than just falling through a switch. Or using gotos
      as we've had to do lately.
      
      Differential Revision: https://reviews.llvm.org/D81439
      d5c28c40
    • Matt Arsenault's avatar
    • Sanjay Patel's avatar
      [x86] refine conditions for immediate hoisting to save code-size · 6f6d2d23
      Sanjay Patel authored
      As shown in PR46237:
      https://bugs.llvm.org/show_bug.cgi?id=46237
      
      The size-savings win for hoisting an 8-bit ALU immediate (intentionally
      excluding store constants) requires extreme conditions; it may not even
      be possible when including REX prefix bytes on x86-64.
      
      I did draft a version of this patch that included use counts after the
      loop, but I suspect that accounting is not working as expected. I think
      that is because the number of constant uses are changing as we select
      instructions (for example as we transform shl/add into LEA).
      
      Differential Revision: https://reviews.llvm.org/D81468
      6f6d2d23
    • Erich Keane's avatar
      Undo change inadvertently added in 113b0d7d · 90ee8cf6
      Erich Keane authored
      90ee8cf6
    • Matt Arsenault's avatar
      GlobalISel: Set instr/debugloc before any legalizer action · 32823091
      Matt Arsenault authored
      It was annoying enough that every custom lowering needed to set the
      insert point, but this was made worse since now these all needed to be
      updated to setInstrAndDebugLoc. Consolidate these so every
      legalization action has the right insert position by default.
      
      This should fix dropping debug info in every custom AMDGPU
      legalization.
      32823091
    • Louis Dionne's avatar
      [NFCI] Clean up exceptions related CMake and Lit options in libc++abi and libunwind · 0e04342a
      Louis Dionne authored
      First, libc++abi doesn't need to add the no-exceptions Lit feature itself,
      since that is already done in the config.py for libc++, which it reuses.
      Specifically, config.enable_exceptions is set based on @LIBCXXABI_ENABLE_EXCEPTIONS@
      in libc++abi's lit.cfg.in, and libc++'s config.py handles that correctly.
      
      Secondly, libunwind's LIBUNWIND_ENABLE_EXCEPTIONS is never set (it's
      probably a remnant of copy-pasting code between the runtime libraries),
      so the library is always built with exceptions disabled (which makes
      sense since it implements the runtime support for exceptions).
      Conversely, the test suite is always run with exceptions enabled
      (not sure why), but that is preserved by the default behavior of
      libc++'s config.py.
      0e04342a
    • Sanjay Patel's avatar
      f71a3b54
    • Erich Keane's avatar
      PR46255: Fix field diagnostics for C records with anonymous members. · 113b0d7d
      Erich Keane authored
      The ParseStructUnionBody function was separately keeping track of the
      field decls for historical reasons, however the "ActOn" functions add
      the field to the RecordDecl anyway.
      
      The "ParseStructDeclaration" function, which handles parsing fields
      didn't have a way of handling what happens on an anonymous field, and
      changing it would alter a large amount of objc code, so I chose instead
      to implement this by just filling the FieldDecls vector with the actual
      FieldDecls that were successfully added to the recorddecl .
      113b0d7d
    • Matt Arsenault's avatar
      GlobalISel: Improve MachineIRBuilder construction · b94c9e3b
      Matt Arsenault authored
      The current relationship between LegalizerHelper and MachineIRBuilder
      confuses me, because the LegalizerHelper modifies the MachineIRBuilder
      which it does not own. Constructing a LegalizerHelper destroys the
      insert point, since the constructor calls setMF, which clears all the
      fields. Try to separate these functions, so it's possible to construct
      a LegalizerHelper from an existing MachineIRBuilder without losing the
      insert point/debug loc.
      b94c9e3b
    • Matt Arsenault's avatar
      GlobalISel: Move some trivial MIRBuilder methods into the header · babbf444
      Matt Arsenault authored
      The construction APIs for MachineIRBuilder don't make much sense, and
      it's been annoying to sort through it with these trivial functions
      separate from the declaration.
      babbf444
    • Matt Arsenault's avatar
      GlobalISel: Remove redundant check in verifier · bb6cb6bf
      Matt Arsenault authored
      This was already checked earlier for all instructions.
      bb6cb6bf
    • Matt Arsenault's avatar
      GlobalISel: Fix double printing new instructions in legalizer · 6eeac6ae
      Matt Arsenault authored
      New instructions were getting printed both in createdInstr, and in the
      final printNewInstrs, so it made it look like the same instructions
      were created twice. This overall made reading the debug output
      harder. Stop printing the initial construction and only print new
      instructions in the summary at the end. This avoids printing the less
      useful case where instructions are sometimes initially created with no
      operands.
      
      I'm not sure this is the correct instance to remove; now the visible
      ordering is different. Now you will typically see the one erased
      instruction message before all the new instructions in order. I think
      this is the more logical view of typical legalization changes,
      although it's mechanically backwards from the normal
      insert-new-erase-old pattern.
      6eeac6ae
    • Jonas Devlieghere's avatar
      [lldb/Reproducers] Also collect ::open and ::fopen · 6c5c4a2a
      Jonas Devlieghere authored
      Report files opened trough ::open and ::fopen to the FileCollector.
      6c5c4a2a
    • Mehdi Amini's avatar
      Change filecheck default to dump input on failure · d31c9e5a
      Mehdi Amini authored
      Having the input dumped on failure seems like a better
      default: I debugged FileCheck tests for a while without knowing
      about this option, which really helps to understand failures.
      
      Remove `-dump-input-on-failure` and the environment variable
      FILECHECK_DUMP_INPUT_ON_FAILURE which are now obsolete.
      
      Differential Revision: https://reviews.llvm.org/D81422
      d31c9e5a
    • Louis Dionne's avatar
      [libc++][CMake] Add CMake caches for commonly supported configurations · d9dec697
      Louis Dionne authored
      This commit adds CMake caches for the various configurations of libc++
      that are tested by our build bots.
      
      Differential Revision: https://reviews.llvm.org/D81293
      d9dec697
    • Tridacnid's avatar
      Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit... · ce5fecb7
      Tridacnid authored
      Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present
      
      Add ignoringParenImpCasts to assignment and inc/dec mutation checks in ExprMutationAnalyzer to fix clang-tidy bug PR45490.
      https://bugs.llvm.org/show_bug.cgi?id=45490
      
      Reviewed By: njames93, aaron.ballman, gribozavr2
      
      Differential Revision: https://reviews.llvm.org/D79912
      ce5fecb7
    • Louis Dionne's avatar
      [libc++] Fix too stringent availability markup for bad_optional_access · 7fb40e15
      Louis Dionne authored
      The availability markup for bad_optional_access marked it as being added
      in MacOS 10.14 and aligned releases, however it appears to have been added
      in Mac OS 10.13 and aligned releases.
      7fb40e15
    • Anh Tuyen Tran's avatar
      [NFC][LV][TEST]: extend pr45679-fold-tail-by-masking.ll with... · e7c5412b
      Anh Tuyen Tran authored
      [NFC][LV][TEST]: extend pr45679-fold-tail-by-masking.ll with -force-vector-width=1 -force-vector-interleave=4
      
      Summary:
      Add -force-vector-width=1 -force-vector-interleave=4 to pr45679-fold-tail-by-masking.ll
      
      Author: anhtuyen (Anh Tuyen Tran)
      
      Reviewers: Ayal (Ayal Zaks)
      
      Reviewed By: Ayal (Ayal Zaks)
      
      Subscribers: rkruppe (Hanna Kruppe), llvm-commits, LLVM
      
      Tag: LLVM
      
      Differential Revision: https://reviews.llvm.org/D80446
      e7c5412b
    • Fangrui Song's avatar
      [ELF] Demote lazy symbols relative to a discarded section to Undefined · ba890da2
      Fangrui Song authored
      Fixes PR45594.
      
      In `ObjFile<ELFT>::initializeSymbols()`, for a defined symbol relative to
      a discarded section (due to section group rules), it may have been
      inserted as a lazy symbol. We need to demote it to an Undefined to
      enable the `discarded section` error happened in a later pass.
      
      Add `LazyObjFile::fetched` (if true) and `ArchiveFile::parsed` (if
      false) to represent that there is an ongoing lazy symbol fetch and we
      should replace the current lazy symbol with an Undefined, instead of
      calling `Symbol::resolve` (`Symbol::resolve` should be called if the lazy
      symbol was added by an unrelated archive/lazy object).
      
      As a side result, one small issue in start-lib-comdat.s is now fixed.
      The hack motivating D51892 will be unsupported: if
      `.gnu.linkonce.t.__i686.get_pc_thunk.bx` in an archive is referenced
      by another section, this will likely be errored unless the function is
      also defined in a regular object file.
      (Bringing back rL330869 would error `undefined symbol` instead of the
      more relevant `discarded section`.)
      
      Note, glibc i386's crti.o still works (PR31215), because
      `.gnu.linkonce.t.__x86.get_pc_thunk.bx` is in crti.o (one of the first
      regular object files in a linker command line).
      
      Reviewed By: psmith
      
      Differential Revision: https://reviews.llvm.org/D79300
      ba890da2
    • David Green's avatar
      [MachineScheduler] Update available queue on the first mop of a new cycle · 2fea3fe4
      David Green authored
      If a resource can be held for multiple cycles in the schedule model
      then an instruction can be placed into the available queue, another
      instruction can be scheduled, but the first will not be taken back out if
      the two instructions hazard. To fix this make sure that we update the
      available queue even on the first MOp of a cycle, pushing available
      instructions back into the pending queue if they now conflict.
      
      This happens with some downstream schedules we have around MVE
      instruction scheduling where we use ResourceCycles=[2] to show the
      instruction executing over two beats. Apparently the test changes here
      are OK too.
      
      Differential Revision: https://reviews.llvm.org/D76909
      2fea3fe4
    • Fangrui Song's avatar
      [gcov][test] Add mkdir -p %t && cd %t · 6bb93e3d
      Fangrui Song authored
      This allows an alternative lit runner (which does not chdir to %T)
      to run within a read-only source tree.
      6bb93e3d
    • Simon Pilgrim's avatar
      [VectorCombine] scalarizeBinop - support an all-constant src vector operand · 5dc4e7c2
      Simon Pilgrim authored
      scalarizeBinop currently folds
      
        vec_bo((inselt VecC0, V0, Index), (inselt VecC1, V1, Index))
        ->
        inselt(vec_bo(VecC0, VecC1), scl_bo(V0,V1), Index)
      
      This patch extends this to account for cases where one of the vec_bo operands is already all-constant and performs similar cost checks to determine if the scalar binop with a constant still makes sense:
      
        vec_bo((inselt VecC0, V0, Index), VecC1)
        ->
        inselt(vec_bo(VecC0, VecC1), scl_bo(V0,extractelt(V1,Index)), Index)
      
      Fixes PR42174
      
      Differential Revision: https://reviews.llvm.org/D80885
      5dc4e7c2
    • Arthur Eubanks's avatar
      Change debuginfo check for addHeapAllocSiteMetadata · bc387938
      Arthur Eubanks authored
      Summary:
      Move check inside of addHeapAllocSiteMetadata().
      Change check to DebugInfo <= DebugLineTablesOnly.
      
      Reviewers: akhuang
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D81481
      bc387938
    • Daniel Kiss's avatar
      [AArch64] Allow BTI mnemonics in the HINT space with BTI disabled · 7a38618a
      Daniel Kiss authored
      Summary:
      It is important to emit HINT instructions instead of BTI  ones when
      BTI is disabled. This allows compatibility with other assemblers
      (e.g. GAS).
      
      Still, developers of assembly code will want to write code that is
      compatible with both pre- and post-BTI CPUs. They could use HINT
      mnemonics, but the new mnemonics are a lot more readable (e.g.
      bti c instead of hint #34), and they will result in the same
      encodings. So, while LLVM should not *emit* the new mnemonics when
      BTI is disabled, this patch will at least make LLVM *accept*
      assembly code that uses them.
      
      Reviewers: pbarrio, tamas.petz, ostannard
      
      Reviewed By: pbarrio, ostannard
      
      Subscribers: ostannard, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D81257
      7a38618a