[all-commits] [llvm/llvm-project] 4c6350: [compiler-rt] [test] Handle missing ld.gold gracef...

Utkarsh Saxena via All-commits all-commits at lists.llvm.org
Wed Sep 7 23:53:38 PDT 2022


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c6350f4e393c1782fd479798485b55063aa90fc
      https://github.com/llvm/llvm-project/commit/4c6350f4e393c1782fd479798485b55063aa90fc
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M compiler-rt/test/lit.common.cfg.py

  Log Message:
  -----------
  [compiler-rt] [test] Handle missing ld.gold gracefully

Fix the is_binutils_lto_supported() function to handle missing
executables gracefully.  Currently, the function does not catch
exceptions from subprocess.Popen() and therefore causes lit to crash
if config.gold_executable does not specify a valid executable:

```
lit: /usr/lib/python3.11/site-packages/lit/TestingConfig.py:136: fatal: unable to parse config file '/tmp/portage/sys-libs/compiler-rt-
15.0.0/work/compiler-rt/test/lit.common.cfg.py', traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/lit/TestingConfig.py", line 125, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/tmp/portage/sys-libs/compiler-rt-15.0.0/work/compiler-rt/test/lit.common.cfg.py", line 561, in <module>
    if is_binutils_lto_supported():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/portage/sys-libs/compiler-rt-15.0.0/work/compiler-rt/test/lit.common.cfg.py", line 543, in is_binutils_lto_supported
    ld_cmd = subprocess.Popen([exe, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1022, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1899, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'GOLD_EXECUTABLE-NOTFOUND'
```

Differential Revision: https://reviews.llvm.org/D133358

(cherry picked from commit ea953b9d9a65c202985a79f1f95da115829baef6)


  Commit: 0595790461e188d61ee35c81db7789c52c88190c
      https://github.com/llvm/llvm-project/commit/0595790461e188d61ee35c81db7789c52c88190c
  Author: jackh <jackhuang1205 at gmail.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] Distinguish logical and after bracket from reference

Fix commit `b646f0955574` and remove redundant code.

Differential Revision: https://reviews.llvm.org/D131750

(cherry picked from commit ef71383b0cfbacdbebf495015f6ead5294bf7759)


  Commit: 5e1ba27b9d494d26ea05d27a0f097ee99ea38e22
      https://github.com/llvm/llvm-project/commit/5e1ba27b9d494d26ea05d27a0f097ee99ea38e22
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    A llvm/test/CodeGen/X86/pr57474.ll

  Log Message:
  -----------
  [DAG] extractShiftForRotate - replace assertion for shift opcode with an early-out

We feed the result from the first extractShiftForRotate call into the second, and that result might no longer be a shift op (usually due to constant folding).

NOTE: We REALLY need to stop creating nodes on the fly inside extractShiftForRotate!

Fixes Issue #57474

(cherry picked from commit eaede4b5b7cfc13ca0e484b4cb25b2f751d86fd9)


  Commit: 1c73596d345481de957e5ccc0bedf1fb9d9f643a
      https://github.com/llvm/llvm-project/commit/1c73596d345481de957e5ccc0bedf1fb9d9f643a
  Author: Utkarsh Saxena <usx at google.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaCXX/cxx2a-consteval.cpp

  Log Message:
  -----------
  [clang] Skip re-building lambda expressions in parameters to consteval fns.

As discussed in this [comment](https://github.com/llvm/llvm-project/issues/56183#issuecomment-1224331699),
we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation.

This happens specially during removing nested immediate invocation.
Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})`

While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing)

Fixes: https://github.com/llvm/llvm-project/issues/56183
Fixes: https://github.com/llvm/llvm-project/issues/51695
Fixes: https://github.com/llvm/llvm-project/issues/50455
Fixes: https://github.com/llvm/llvm-project/issues/54872
Fixes: https://github.com/llvm/llvm-project/issues/54587

Differential Revision: https://reviews.llvm.org/D132945

(cherry picked from commit e7eec38246560781e0a4020b19c7eb038a8c5655)


Compare: https://github.com/llvm/llvm-project/compare/7ce1ec5a2a22...1c73596d3454


More information about the All-commits mailing list