1. Jun 23, 2022
  2. Jun 22, 2022
    • Peixin Qiao's avatar
      [flang][Driver] Refine _when_ driver diagnostics are formatted · 43084160
      Peixin Qiao authored
      This patch refines //when// driver diagnostics are formatted so that
      `flang-new` and `flang-new -fc1` behave consistently with `clang` and
      `clang -cc1`, respectively. This change only applies to driver diagnostics.
      Scanning, parsing and semantic diagnostics are separate and not covered here.
      
      **NEW BEHAVIOUR**
      To illustrate the new behaviour, consider the following input file:
      ```! file.f90
      program m
        integer :: i = k
      end
      ```
      In the following invocations, "error: Semantic errors in file.f90" _will be_
      formatted:
      ```
      $ flang-new file.f90
      error: Semantic errors in file.f90
      ./file.f90:2:18: error: Must be a constant value
          integer :: i = k
      $ flang-new -fc1 -fcolor-diagnostics file.f90
      error: Semantic errors in file.f90
      ./file.f90:2:18: error: Must be a constant value
          integer :: i = k
      ```
      
      However, in the following invocations, "error: Semantic errors in file.f90"
      _will not be_ formatted:
      ```
      $ flang-new -fno-color-diagnostics file.f90
      err...
      43084160
    • Peixin Qiao's avatar
      [NFC][flang] Add the test case for D125371 · f31ec689
      Peixin Qiao authored
      This adds the test case with portability warning preparing for D125804,
      which supports checking for portability warnings in test_errors.py.
      
      Reviewed By: ekieri
      
      Differential Revision: https://reviews.llvm.org/D127821
      f31ec689
    • Martin Storsjö's avatar
      [lldb] Tentative attempt to fix command-target-create-resolve-exe.test on buildbot · 0bc7105c
      Martin Storsjö authored
      This test does succeed in my local test environment though, but
      fails on the buildbot.
      0bc7105c
    • Jonathan Peyton's avatar
      [OpenMP][libomp] Hold old __kmp_threads arrays until library shutdown · b7b49865
      Jonathan Peyton authored
      When many nested teams are formed, __kmp_threads may be reallocated
      to accommodate new threads. This reallocation causes a data
      race when another existing team's thread simultaneously references
      __kmp_threads. This patch keeps the old thread arrays around until library
      shutdown so these lingering references can complete without issue and
      access to __kmp_threads remains a simple array reference.
      
      Fixes: https://github.com/llvm/llvm-project/issues/54708
      Differential Revision: https://reviews.llvm.org/D125013
      b7b49865
    • Nikita Popov's avatar
      [X86PreAMXConfig] Use IRBuilder to insert instructions (NFC) · 10615110
      Nikita Popov authored
      Use an IRBuilder to insert instructions in preWriteTileCfg().
      While here, also remove some unnecessary bool return values.
      
      There are some test changes because the IRBuilder folds
      "trunc i16 8 to i8" to "i8 8", and that has knock-on effects on
      instruction naming.
      
      I ran into this when converting tests to opaque pointers and
      noticed that this pass introduces unnecessary "bitcast ptr to ptr"
      instructions.
      10615110
    • Mark de Wever's avatar
      [libc++] Fixes GCC-12 build. · 65f44c92
      Mark de Wever authored
      65f44c92
    • Nikita Popov's avatar
      [X86] Regenerate test checks (NFC) · ff5301dd
      Nikita Popov authored
      This runs the test through -instnamer and generates test checks
      using update_test_checks.py. (The previous comment indicated that
      update_llc_test_checks.py was used, but I rather doubt that.)
      
      This relies on the non-determinism fix from
      fbb72530,
      the previous check lines have apparently been written to accomodate
      that non-determinism.
      ff5301dd
    • Nikita Popov's avatar
      [X86PreAMXConfig] Use MapVector to fix non-determinism · fbb72530
      Nikita Popov authored
      We generate code by iterating over this map, so make sure that the
      order is deterministic.
      fbb72530
    • Guillaume Chatelet's avatar
      Revert "[NFC] Remove dead code" · 57ffff6d
      Guillaume Chatelet authored
      This reverts commit 8ba2cbff.
      57ffff6d
    • Nikita Popov's avatar
      [X86] Name instructions in test (NFC) · 4c921aa3
      Nikita Popov authored
      Run the test through -instnamer, to make it easier to modify.
      4c921aa3
    • Nico Weber's avatar
      [gn build] Port c3574ef7 slightly better · 1af1e91b
      Nico Weber authored
      The name of the host binary changed from make_confusable_table to
      make-confusable-table, so match that.
      1af1e91b
    • Nico Weber's avatar
      Reland "[gn build] (manually) port b94db7ed (Confusables.inc)" · 721875db
      Nico Weber authored
      b94db7ed relanded in c3574ef7.
      
      This relands commit 180bae08, rebased across the new version of
      commit c3574ef7, and rebased across 10f7255d.
      721875db
    • serge-sans-paille's avatar
      [clang-tidy] Confusable identifiers detection · c3574ef7
      serge-sans-paille authored
      Detect identifiers that are confusable using a variant of Unicode definition
      
              http://www.unicode.org/reports/tr39/#Confusable_Detection
      
      and have conflicting scopes.
      
      This a recommit (with portability and feature fixes) of b94db7ed
      
      Differential Revision: https://reviews.llvm.org/D112916
      c3574ef7
    • Alvin Wong's avatar
      [lldb] Add setting to override PE/COFF ABI by module name · 3c867898
      Alvin Wong authored
      The setting `plugin.object-file.pe-coff.module-abi` is a string-to-enum
      map that allows specifying an ABI to a module name. For example:
      
          ucrtbase.dll=msvc
          libstdc++-6.dll=gnu
      
      This allows for debugging a process which mixes both modules built using
      the MSVC ABI and modules built using the MinGW ABI.
      
      Depends on D127048
      
      Reviewed By: DavidSpickett
      
      Differential Revision: https://reviews.llvm.org/D127234
      3c867898
    • Alvin Wong's avatar
      [lldb][windows] Fix crash on getting nested exception · 4d123783
      Alvin Wong authored
      LLDB tries to follow `EXCEPTION_RECORD::ExceptionRecord` to follow the
      nested exception chain. In practice this code just causes Access
      Violation whenever there is a nested exception. Since there does not
      appear to be any code in LLDB that is actually using the nested
      exceptions, this change just removes the crashing code and adds a
      comment for future reference.
      
      Fixes https://github.com/mstorsjo/llvm-mingw/issues/292
      
      Reviewed By: DavidSpickett
      
      Differential Revision: https://reviews.llvm.org/D128201
      4d123783
    • Alvin Wong's avatar
      [lldb] Resolve exe location for `target create` · 2bae9560
      Alvin Wong authored
      This fixes an issue that, when you start lldb or use `target create`
      with a program name which is on $PATH, or not specify the .exe suffix of
      a program in the working directory on Windows, you get a confusing
      error, for example:
      
          (lldb) target create notepad
          error: 'C:\WINDOWS\SYSTEM32\notepad.exe' doesn't contain any 'host'
          platform architectures: i686, x86_64, i386, i386
      
      Fixes https://github.com/mstorsjo/llvm-mingw/issues/265
      
      Reviewed By: DavidSpickett
      
      Differential Revision: https://reviews.llvm.org/D127436
      2bae9560
    • Martin Storsjö's avatar
      [lldb] Fix reading i686-windows executables with GNU environment · 8a64dd5b
      Martin Storsjö authored
      25c8a061 / D127048 added an option
      for setting the ABI to GNU.
      
      When an object file is loaded, there's only minimal verification
      done for the architecture spec set for it, if the object file only
      provides one.
      
      However, for i386 object files, the PECOFF object file plugin
      provides two architectures, i386-pc-windows and i686-pc-windows.
      This picks a totally different codepath in
      TargetList::CreateTargetInternal, where it's treated as a fat
      binary. This goes through more verifications to see if the
      architectures provided by the object file matches what the
      platform plugin supports.
      
      The PlatformWindows() constructor explicitly adds the
      "i386-pc-windows" and "i686-pc-windows" architectures (even when
      running on other architectures), which allows this "fat binary
      verification" to succeed for the i386 object files that provide
      two architectures.
      
      However, after that commit, if the object file is advertised with
      the different environment (either when lldb is built in a mingw
      environment, or if that setting is set), the fat binary validation
      won't accept the file any longer.
      
      Update ArchSpec::IsEqualTo with more logic for the Windows use
      cases; mismatching vendors is not an issue (they don't have any
      practical effect on Windows), and GNU and MSVC environments are
      compatible to the point that PlatformWindows can handle object
      files for both environments/ABIs.
      
      As a separate path forward, one could also consider to stop returning
      two architecture specs from ObjectFilePECOFF::GetModuleSpecifications
      for i386 files.
      
      Differential Revision: https://reviews.llvm.org/D128268
      8a64dd5b