Changes

Changes from Git (git http://labmaster3.local/git/llvm-lnt.git)

Summary

  1. Teach Mypy about sqlalchemy's declarative_base() (details)
  2. Remove no longer needed threading module import (details)
  3. Fix __all__ mypy warnings (details)
  4. [LNT] Python 3 support: fix several bytes/str inconsistencies (details)
  5. Fix server/ui/V4Pages test (details)
  6. Fix use of wrong and undef variable (details)
  7. Expect LNT to be installed in the tests (details)
  8. Fix all unused imports flake8 warnings (details)
  9. Fix non multiple of 4 indentation (details)
  10. Fix multiple import on one line (details)
  11. Fix whitespaces flake8 errors and warnings (details)
  12. Fix under and over continuation indentation (details)
  13. Ignore files generated by running tox (details)
  14. [LNT] Fix F811 warnings (details)
  15. [LNT] add __pycache__ to ignored files (details)
  16. F841: local variable assigned to but never used (details)
  17. Fix unexpected space around keyword/param equals (details)
  18. Fix space before typing comments (details)
  19. Fix blank line errors (details)
  20. Fix redundant backslash (details)
  21. Fix over indentation (details)
  22. Fix bracket indentation in report.py (details)
  23. Fix remaining Flake8 whitespace issues (details)
  24. Fix ambiguous variable names (details)
  25. Remove nonsensical fct definition (details)
  26. Fix OrderField's copy constructor (details)
  27. Add import needed for typing hints (details)
  28. Fix line too long Flake8 warning (details)
  29. Fix use of undefined session variable (details)
  30. Extend mandatory Flake8 cleanness (details)
  31. [LNT] Fix some ResourceWarnings (details)
Commit c6c4b5dcf1dedd9ac2fab5d405fa2e309b41d156 by thomasp
Teach Mypy about sqlalchemy's declarative_base()

Mypy complains about alias for
sqlalchemy.ext.declarative.declarative_base() and everywhere where it is
used. SQLAlchemy has a stubs to tell Mypy about those which gets rid of
lots of Mypy warnings.

Reviewed By: PrzemekWirkus

Differential Revision: https://reviews.llvm.org/D94664
The file was addedmypy.ini
The file was modifiedtox.ini
The file was modifiedlnt/server/db/migrations/upgrade_12_to_13.py
The file was modifiedlnt/server/db/migrations/upgrade_0_to_1.py
Commit 711a02c90e247b306a162f76d308d283b5a59b70 by thomasp
Remove no longer needed threading module import

Last uses of threading were removed in commit
98054daa1001bc0b0b906ccc251c96fb85b85840 so this commits removes the
imports.

Reviewed By: PrzemekWirkus

Differential Revision: https://reviews.llvm.org/D94665
The file was modifiedlnt/server/db/v4db.py
Commit 042938b5c332fa63f1fefdd7116f39e161b8c51b by thomasp
Fix __all__ mypy warnings

mypy warns about the unknown type for empty __all__. This commit adds
type info for them. Import errors for typing module in LNT needs to be
ignored because LNT module is imported from setup before all required
package are guaranteed to be installed.

Reviewed By: PrzemekWirkus

Differential Revision: https://reviews.llvm.org/D94666
The file was modifiedlnt/server/__init__.py
The file was modifiedlnt/__init__.py
The file was modifiedlnt/external/__init__.py
The file was modifiedlnt/server/db/__init__.py
The file was modifiedlnt/server/ui/__init__.py
The file was modifiedlnt/testing/util/__init__.py
The file was modifiedlnt/server/reporting/__init__.py
The file was modifiedlnt/util/__init__.py
The file was modifiedlnt/server/db/rules/__init__.py
Commit 80ed0db735b4636d40fb780605b9f947a19f7b7c by danila
[LNT] Python 3 support: fix several bytes/str inconsistencies

Fix Profile.render() to return str. It's expected that .render()
methods return str but in py3 it started returning bytes.

Also fix reading/writing profile as string when it should be bytes.

Differential Revision: https://reviews.llvm.org/D94418
The file was modifiedlnt/testing/profile/profile.py
The file was modifiedtests/runtest/Inputs/test-suite-cmake/fake-cmake
The file was addedtests/runtest/Inputs/test-suite-cmake/fake-lit-profile-import
The file was modifiedtests/runtest/test_suite-profile.shtest
The file was modifiedlnt/testing/profile/profilev1impl.py
The file was addedtests/runtest/Inputs/test-suite-cmake/fake-results-profile-import.json
The file was addedtests/runtest/test_suite-profile-import.py
The file was addedtests/runtest/Inputs/test-suite-cmake/fake-results.perf_data
The file was modifiedtests/testing/profilev1impl.py
Commit 52ea66719d01d3d18651946c1b83790ca371d34c by thomasp
Fix server/ui/V4Pages test

Commit cc9b7c48f8e22c1b883950ef214bb710c85ca412 changed redirect URL to
be relative. However, it did not update the corresponding redirect tests
due to them passing because of the cPerf issue fixed in
f98bc1b3018248fbe551b0e7491ac5ba388216d5. These tests are now failing.
This commit fixes them.

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94635
The file was modifiedtests/server/ui/V4Pages.py
Commit 0d067a27868dae963ac9bc4a21e7da434822dd01 by thomasp
Fix use of wrong and undef variable

Two of the ValueError exceptionsraised in get_base_for_testsuite() refer
to the wrong variable and an undefined variable respectively. This patch
fixes those.

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94663
The file was modifiedlnt/server/db/migrations/upgrade_0_to_1.py
Commit 5a4cfa934327a09e7700ed2fe7257a4e6a7faec2 by thomasp
Expect LNT to be installed in the tests

LNT's lit is configured to be able to run the tests without LNT being
installed. This is useful for testing/cPerf.py which skips all its
checks if cPerf extension is not found, which happens when setup has not
run and thus it has not been built.

However newly added runtest/test_suite-profile.shtest expects cPerf
being installed or its globbing fails. This seems a better approach
because a patch author risks missing a regression if some tests are
skipped. Therefore this commit removes the root of the repository from
the PYTHONPATH in lit's config, thereby requiring the user running the
test having lit in PYTHONPATH.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94715
The file was modifiedtests/testing/cPerf.py
The file was modifiedtests/lit.cfg
Commit 27a422e161a1521a0aeaf8c71b08802b2211088a by thomasp
Fix all unused imports flake8 warnings

lnt/lnttool/main.py:
- ignore flask.current_app and flask.g unused import warnings since they
  are used through locals() below

lnt/lnttool/__init__.py:
- ignore main.main unused import warning since it is LNT's entry point

tests/testing/cPerf.py:
- ignore lnt.testing.profile.cPerf import warning since the import is
  used to avoid a failing test if cPerf is not available

lnt/server/ui/views.py and lnt/server/ui/regression_views.py:
- remove flask.redirect imports which are no longer used since
  cc9b7c48f8e22c1b883950ef214bb710c85ca412

lnt/server/ui/globals.py:
- remove lnt.server.ui.util unused import which is no longer used since
  808245434195310a3a842cceaccc93d879d00a18

lnt/server/ui/decorators.py:
- remove flask.render_template unused import which is no longer used
  since f5fa093be57e7b9ab561a27c988f7a5e6bb53a4b

lnt/server/db/v4db.py:
- remove sqlalchemy.orm.joinedload unused import which is no longer used
  since d464dd2acb1b1ff95b315848af1bb45db322096a

lnt/server/db/testsuitedb.py:
- remove typing.List unused import which is no longer used since
  b9d4622cb14fd0f407431df95134b120004f2f8a

lnt/server/db/migrations/upgrade_2_to_3.py,
lnt/server/db/migrations/upgrade_7_to_8.py,
lnt/server/db/migrations/upgrade_8_to_9.py and
lnt/server/db/migrations/upgrade_10_to_11.py:
- remove sqlalchemy.orm.relation unused import which was never needed

lnt/server/db/migrations/upgrade_12_to_13.py:
- remove sqlalchemy unused import which stopped being used after
  c6c4b5dcf1dedd9ac2fab5d405fa2e309b41d156 (doh!)

lnt/server/db/migrations/upgrade_14_to_15.py:
- remove lnt.server.db.migrations.util.rename_table unused import which
  was never needed

lnt/server/db/rules/rule_update_profile_stats.py:
- remove datetime unused import which was never needed

tests/testing/cPerf.py:
- remove time, threading and json unused import which were never needed

tests/server/db/search.py:
- remove logging unused import which is no longer used since
  48bc5fcbdabb7b24ef56e4271a5f5d0e5326d4f4
- remove contextlib unused import which was never needed

tests/server/db/CreateV4TestSuite.py:
- remove sys unused import which was never needed

tests/server/db/CreateV4TestSuiteInstance.py:
- remove lnt.server.db.testsuite unused import which is no longer used
  since 7f585029766b78ad2dd68083399bdd4e2755fdab

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94686
The file was modifiedlnt/server/db/rules/rule_update_profile_stats.py
The file was modifiedlnt/server/ui/decorators.py
The file was modifiedlnt/lnttool/main.py
The file was modifiedlnt/lnttool/__init__.py
The file was modifiedtests/server/db/search.py
The file was modifiedtests/testing/cPerf.py
The file was modifiedlnt/server/db/migrations/upgrade_8_to_9.py
The file was modifiedlnt/server/db/migrations/upgrade_14_to_15.py
The file was modifiedtests/server/db/CreateV4TestSuite.py
The file was modifiedlnt/server/db/migrations/upgrade_7_to_8.py
The file was modifiedlnt/server/db/migrations/upgrade_2_to_3.py
The file was modifiedlnt/server/ui/regression_views.py
The file was modifiedlnt/server/db/migrations/upgrade_10_to_11.py
The file was modifiedlnt/server/db/v4db.py
The file was modifiedlnt/server/db/migrations/upgrade_12_to_13.py
The file was modifiedlnt/server/db/testsuitedb.py
The file was modifiedlnt/server/ui/globals.py
The file was modifiedlnt/server/ui/views.py
The file was modifiedtests/server/db/CreateV4TestSuiteInstance.py
Commit d36ab1023cd2a507d7c04a2f223386f3541075c4 by thomasp
Fix non multiple of 4 indentation

Fix Flake8's E111 error (indentation is not a multiple of four)

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94720
The file was modifiedtests/testing/cPerf.py
Commit 0dafa58e49b2c21e15d06ddad3ba716190bcb6e6 by thomasp
Fix multiple import on one line

Fix Flake8's E401 error (multiple imports on one line)

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94721
The file was modifiedtests/server/db/search.py
The file was modifiedtests/testing/profilev1impl.py
The file was modifiedtests/testing/cPerf.py
The file was modifiedtests/testing/profilev2impl.py
The file was modifiedtests/server/db/ImportV4TestSuiteInstance.py
Commit 508980c3688d4b1c87e96c7359e2129b7a557746 by thomasp
Fix whitespaces flake8 errors and warnings

- fix E302 errors (2 blank lines before class/functions)
- fix E305 errors (2 blank lines after class/functions)
- fix W293 warnings (blank line contains whitespace)

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94722
The file was modifiedlnt/server/reporting/report.py
The file was modifiedtests/__init__.py
The file was modifiedtests/server/db/Migrations.py
The file was modifiedtests/SharedInputs/FakeCompilers/fakecompiler.py
The file was modifiedtests/testing/cPerf.py
The file was modifiedlnt/server/reporting/analysis.py
The file was modifiedtests/testing/profilev2impl.py
The file was modifiedlnt/server/reporting/runs.py
The file was modifiedlnt/server/ui/globals.py
The file was modifiedtests/server/db/search.py
The file was modifiedlnt/server/ui/views.py
The file was modifiedtests/testing/profilev1impl.py
Commit 411247695c40d5c4af13abe9188ccf5f4d76270b by thomasp
Fix under and over continuation indentation

Fix Flake8 E127 and E128 errors (under and over continuation
indentation)

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D94723
The file was modifiedlnt/server/ui/regression_views.py
The file was modifiedtests/server/db/ImportV4TestSuiteInstance.py
The file was modifiedlnt/server/reporting/latestrunsreport.py
The file was modifiedlnt/server/ui/views.py
The file was modifiedlnt/lnttool/viewcomparison.py
The file was modifiedlnt/tests/nt.py
The file was modifiedlnt/server/reporting/report.py
The file was modifiedtests/testing/cPerf.py
The file was modifiedlnt/server/db/testsuitedb.py
Commit 9284050152ae4d9623a37dea2e7725f025d2c829 by thomasp
Ignore files generated by running tox

Reviewed By: danilaml

Differential Revision: https://reviews.llvm.org/D94758
The file was modified.gitignore
Commit 0982122b76efad15e244a18b42ce77de2a906140 by danila
[LNT] Fix F811 warnings

Differential Revision: https://reviews.llvm.org/D94774
The file was modifiedtests/runtest/test_suite-profile-import.py
The file was modifiedlnt/server/reporting/analysis.py
Commit 2e93cbd17fd5eb4b2e3773e5022186feac554d7c by danila
[LNT] add __pycache__ to ignored files

Fixes WARNING: ignoring item '__pycache__' ... warnings

Differential Revision: https://reviews.llvm.org/D94775
The file was modifiedlnt/server/db/rules_manager.py
The file was modifiedlnt/server/db/migrate.py
Commit 161ab162b98b1fb2bb653dcdfabd4c584cc1ab2a by thomasp
F841: local variable assigned to but never used

tests/server/reporting/analysis.py:
- Ignore unused variables spike and slow which commented code further
  down refers to

lnt/server/ui/api.py:
- Local variable machine_name and ts in function put() were seemingly
  introduced from copy/paste and were never used

lnt/server/ui/views.py:
- Local variable comparison_start_run stopped being used from commit
  465d5fdbf640b8e53f0f3d773f335e2c4825dd4f
- Local variable session in function v4_latest_runs_report() was
  seemingly introduced from copy/paste and was never used

lnt/server/ui/profile_views.py:
- Local variables idx and tlc in function v4_profile_ajax_getFunctions()
  were seemingly introduced from copy/paste and were never used
- Local variable profileDir in function v4_profile() was seemingly
  introduced from copy/paste and was never used
- Local variables profile1 and profile2 in function v4_profile() have
  never been used

lnt/server/ui/regression_views.py:
- Local variable e in exception block of function v4_regression_detail()
  has never been used
- Local variable new_regression_id in function v4_make_regression() has
  never been used

lnt/server/reporting/summaryreport.py:
- Local variables run and datapoints in function _build_data_table()
  have never been used

lnt/server/db/testsuitedb.py:
- Local variable testsuitedb in the constructor has never been used

lnt/server/db/fieldchange.py:
- Local variable deleted in function regenerate_fieldchanges_for_run()
  has never been used

lnt/server/db/migrations/upgrade_14_to_15.py:
- Local variable trans in function update_testsuite() was seemingly
  introduced from copy/paste from other migration scripts and was never
  used

tests/testing/profilev1impl.py:
- Local variable s in function test_serialize() has never been used

tests/testing/profilev2impl.py:
- Local variable s in function test_serialize() was seemingly introduced
  from copy/past eof the v1 version and was never used

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94757
The file was modifiedlnt/server/ui/views.py
The file was modifiedtests/testing/profilev1impl.py
The file was modifiedtests/testing/profilev2impl.py
The file was modifiedlnt/server/db/testsuitedb.py
The file was modifiedlnt/server/reporting/summaryreport.py
The file was modifiedlnt/server/ui/api.py
The file was modifiedtests/server/reporting/analysis.py
The file was modifiedlnt/server/db/fieldchange.py
The file was modifiedlnt/server/db/migrations/upgrade_14_to_15.py
The file was modifiedlnt/server/ui/profile_views.py
The file was modifiedlnt/server/ui/regression_views.py
Commit 0b2c5df7a25c2e5ed7875d19dd53d097b9bbde50 by thomasp
Fix unexpected space around keyword/param equals

Fix Flake8's E251 error (unexpected spaces around keyword / parameter
equals)

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94789
The file was modifiedsetup.py
The file was modifiedlnt/server/db/testsuitedb.py
The file was modifiedtests/server/db/ImportV4TestSuiteInstance.py
The file was modifiedlnt/server/ui/filters.py
Commit 99b21a5b0bfea1e8b1828692404b56985e89a845 by thomasp
Fix space before typing comments

Fix Flake8's E261 error (at least two spaces before inline comments)
introduced by earlier 042938b5c332fa63f1fefdd7116f39e161b8c51b commit.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94790
The file was modifiedlnt/server/__init__.py
The file was modifiedlnt/server/db/__init__.py
The file was modifiedlnt/server/ui/__init__.py
The file was modifiedlnt/server/reporting/__init__.py
The file was modifiedlnt/__init__.py
The file was modifiedlnt/util/__init__.py
The file was modifiedlnt/testing/util/__init__.py
The file was modifiedlnt/server/db/rules/__init__.py
Commit 9bb061a549b1275ea1313e5c6ea152e40116523d by thomasp
Fix blank line errors

Fix the following Flake8 errors:
- E301 (expected 1 blank line, found 0)
- E303 (too many blank lines)

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94792
The file was modifiedtests/lnttool/email_tools.py
The file was modifiedtests/SharedInputs/FakeCompilers/fakecompiler.py
Commit db2abde917a485e37c559d0d26a76ffce761da8b by thomasp
Fix redundant backslash

Fix Flake8's E502 errors (backslash is redundant between backets.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94793
The file was modifiedlnt/server/ui/app.py
The file was modifiedlnt/tests/nt.py
Commit 29b8a80c44a31633cf5b6f6956bf3f737824d5c7 by thomasp
Fix over indentation

Fix Flake8's E117 error (over-indented)

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94794
The file was modifiedlnt/tests/compile.py
Commit 0c5141a0203bb29188769a3549e62dbd0ea7f620 by thomasp
Fix bracket indentation in report.py

Fix Flake8's E123 error (closing bracket does not match indentation of
opening bracket's line) and reindent bracket's body

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94797
The file was modifiedlnt/server/reporting/report.py
Commit 824079ebb4b843e70a9088eac30544529fea1c57 by thomasp
Fix remaining Flake8 whitespace issues

Fix the following Flake8 errors:
- E211 (whitespace before opening parenthesis)
- E241 (multiple spaces after comma)

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94791
The file was modifiedlnt/server/db/v4db.py
The file was modifiedlnt/server/ui/app.py
Commit 763d5e866da1b582dc35506fd0f6ae155164a73c by thomasp
Fix ambiguous variable names

Fix Flake8's E741 errors (ambiguous variable name). This prevents
confusion when reading code with a font that does not distinguish
clearly between l, 1 and I.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94799
The file was modifiedlnt/server/reporting/report.py
The file was modifiedtests/testing/profilev2impl.py
The file was modifiedlnt/testing/profile/perf.py
The file was modifiedlnt/testing/profile/profilev1impl.py
The file was modifiedlnt/util/stats.py
The file was modifiedlnt/tests/test_suite.py
Commit f1b69afd9a422fadbfef00814933a569037a1bc0 by thomasp
Remove nonsensical fct definition

Aggregation's getvalue function has a nonsensical definition and is thus
not used by anything. This commit removes it.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94838
The file was modifiedlnt/server/reporting/summaryreport.py
Commit faf0b5ac208a290f7f0b0f94b63db0d4a04ad2d3 by thomasp
Fix OrderField's copy constructor

OrderField's copy constructor has a typo in the constructor to call.
This commit fixes it to refer to OrderField's constructor.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94839
The file was modifiedlnt/server/db/testsuite.py
Commit 6d6436e65683eb5ff6bd72ea0e4a67202fa6eb72 by thomasp
Add import needed for typing hints

baseline()'s typing hint refers to testsuitedb type but there is no
import for that module. This commit fixes that.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94840
The file was modifiedlnt/server/ui/views.py
Commit 180e85976fca556d74fcdfa4860d624baa7986b5 by thomasp
Fix line too long Flake8 warning

Flake8's last remaining warning is about a multiline string being more
than 120 characters. This breaks the line up, fixing the last Flake8
warning.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94841
The file was modifiedtests/SharedInputs/FakeCompilers/fakecompiler.py
Commit cead054e557d46427d991012865d80c109b60c98 by thomasp
Fix use of undefined session variable

Commit eb0f1b51e7bcf46cf8868ea0186f8e8f086e6ed8 introduced uses of
variable session in lnt/server/reporting/summaryreport.py but one of
them is in function _build_data_table() which does not have a session
parameter. This commit adds the parameter and update call sites
accordingly, fixing one of Flake8's F821 warning (undefined name).

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94837
The file was modifiedlnt/server/reporting/summaryreport.py
Commit 897087a48534f86beab5547e0d34c1ea1c66d1d8 by thomasp
Extend mandatory Flake8 cleanness

With the wider Flake8 run clean, this commit makes it mandatory and
removes the redundant narrower Flake8 call on the whitelist, removing
the now useless whitelist.

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D94842
The file was modifiedtox.ini
Commit e736349f7cca1b18e93b6a12e222db0bafcf54f5 by danila
[LNT] Fix some ResourceWarnings

Differential Revision: https://reviews.llvm.org/D94767
The file was modifiedlnt/testing/util/compilers.py
The file was modifiedlnt/server/db/rules/rule_update_profile_stats.py
The file was modifiedlnt/testing/profile/profilev1impl.py
The file was modifiedlnt/tests/test_suite.py
The file was modifiedlnt/testing/profile/perf.py
The file was modifiedlnt/server/instance.py
The file was modifiedlnt/testing/profile/profilev2impl.py

Changes from Git (git http://labmaster3.local/git/llvm-test-suite.git)

Summary

  1. [CMake] Delete unneeded find_package(TCL) and find_package(OpenMP) (details)
Commit 41bb38d9cabf9d711c513787fb07f058ee513e40 by i
[CMake] Delete unneeded find_package(TCL) and find_package(OpenMP)
The file was modifiedCMakeLists.txt

Changes from Git (git https://github.com/llvm/llvm-project.git)

Summary

  1. [SVE][NFC] Regenerate a few CodeGen tests (details)
  2. Add -ansi option to CompileOnly group (details)
  3. [doc] Place sha256 in lld/README.md into backticks (details)
  4. Return false from __has_declspec_attribute() if not explicitly enabled (details)
  5. [llvm] [cmake] Remove obsolete /usr/local hack for *BSD (details)
  6. [Tests] Add tests for new InstCombine OR transformation, NFC (details)
  7. [instCombine] Add (A ^ B) | ~(A | B) -> ~(A & B) (details)
  8. [Flang][openmp][openacc] Extend CheckNoBranching to handle branching provided by LabelEnforce. (details)
  9. [LegalizeDAG][RISCV][PowerPC][AMDGPU][WebAssembly] Improve expansion of SETONE/SETUEQ on targets without SETO/SETUO. (details)
  10. [clangd] Avoid recursion in TargetFinder::add() (details)
  11. [NewPM] Run non-trivial loop unswitching under -O2/3/s/z (details)
  12. [RISCV] Use vmerge.vim for llvm.riscv.vfmerge with a 0.0 scalar operand. (details)
  13. [FunctionAttrs] Precommit tests for willreturn inference. (details)
  14. [libc++] Add a missing `<_Compare>` template argument. (details)
  15. [libcxx] Port to OpenBSD (details)
  16. [InstSimplify] Don't fold gep p, -p to null (details)
  17. [OpenMP] Fixed include directories for OpenMP when building OpenMP with LLVM_ENABLE_RUNTIMES (details)
  18. [libomptarget][amdgpu][nfc] Fix build on centos (details)
  19. [clang][aarch64] Precondition isHomogeneousAggregate on isCXX14Aggregate (details)
  20. [FunctionAttrs] Derive willreturn for fns with readonly` & `mustprogress`. (details)
  21. [IR] move nomerge attribute from function declaration/definition to callsites (details)
  22. [clang-tidy] Add test for Transformer-based checks with diagnostics. (details)
  23. [InstCombine] Regenerate test checks (NFC) (details)
  24. [LV] Relax assumption that LCSSA implies single entry (details)
  25. Fix for crash in __builtin_return_address in template context. (details)
  26. [InstCombine] Duplicate tests for logical and/or (NFC) (details)
  27. [LV] Weaken spuriously strong assert in LoopVersioning (details)
  28. [SLP] reduce code duplication while matching reductions; NFC (details)
  29. [SLP] reduce code duplication in processing reductions; NFC (details)
  30. [SLP] rename variable to improve readability; NFC (details)
  31. [SLP] reduce code duplication while processing reductions; NFC (details)
  32. [RISCV] Add double test cases to vfmerge-rv32.ll. NFC (details)
  33. [InstCombine] Add tests for logical and/or poison implication (NFC) (details)
  34. [RISCV] Legalize select when Zbt extension available (details)
  35. [InstCombine] Handle logical and/or in assume optimization (details)
  36. [mlir] Update LLVM dialect type documentation (details)
  37. [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it (details)
  38. [OpenMP] Fixed the link error that cannot find static data member (details)
  39. [AArch64] [Windows] Properly add :lo12: reloc specifiers when generating assembly (details)
  40. [libcxx] Avoid overflows in the windows __libcpp_steady_clock_now() (details)
  41. [OpenMP] Fixed a typo in openmp/CMakeLists.txt (details)
  42. AMDGPU: Remove wrapper only call limitation (details)
  43. [Driver] Fix assertion failure when -fprofile-generate -fcs-profile-generate are used together (details)
  44. [NFC] Disallow unused prefixes in MC/AMDGPU (details)
  45. [ADT][NFC] Use empty base optimisation in BumpPtrAllocatorImpl (details)
  46. [RISCV] Remove '.mask' from vcompress intrinsic name. NFC (details)
  47. [ELF][NFCI] small cleanup to OutputSections.h (details)
  48. Add sample-profile-suffix-elision-policy attribute with -funique-internal-linkage-names. (details)
  49. [MIPatternMatch] Add matcher for G_PTR_ADD (details)
  50. [Sanitizer][Darwin] Fix test for macOS 11+ point releases (details)
  51. [NFC] Disallow unused prefixes under MC/AMDGPU (details)
  52. Delete unused function (was breaking the -Werror build) (details)
  53. [AMDGPU] Add _e64 suffix to VOP3 Insts (details)
  54. [libc] add isascii and toascii implementations (details)
  55. [libc][NFC] Use more specific comparison macros in LdExpTest.h. (details)
  56. [LangRef] State that a nocapture pointer cannot be returned (details)
  57. [DAGCombiner] Fold BRCOND(FREEZE(COND)) to BRCOND(COND) (details)
  58. [MSan] Tweak CopyOrigin (details)
  59. [gn build] (manually) port 79f99ba65d96 (details)
  60. [mlir][Python] Add checking process before create an AffineMap from a permutation. (details)
  61. [X86][AMX] Prohibit pointer cast on load. (details)
  62. [Coroutine] Update promise object's final layout index (details)
  63. [PDB] Defer relocating .debug$S until commit time and parallelize it (details)
  64. [OpenMP] Update allocator trait key/value definitions (details)
  65. [gn build] Reorganize libcxx/include/BUILD.gn a bit (details)
  66. [libc++] Give extern templates default visibility on gcc (details)
  67. [OpenMP] Use persistent memory for omp_large_cap_mem (details)
  68. [NFC] Use generic name for scalable vector stack ID. (details)
  69. [dsymutil] Warn on timestmap mismatch between object file and debug map (details)
  70. [Orc] Add a unit test for asynchronous definition generation. (details)
  71. [InlineSpiller] Re-tie operands if folding failed (details)
  72. [dsymutil] Copy eh_frame content into the dSYM companion file. (details)
  73. [libomptarget][nvptx] Include omp_data.cu in bitcode deviceRTL (details)
  74. [dsymutil] s/dwarfdump/llvm-dwarfdump/ in test (details)
  75. [dsymutil] Fix spurious space in REQUIRES: line (details)
  76. [AMDGPU] Add SI_EARLY_TERMINATE_SCC0 for early terminating shader (details)
  77. [Statepoint Lowering] Add an option to allow use gc values in regs for landing pad (details)
  78. [Verifier] Extend statepoint verifier to cover more constants (details)
  79. [llvm] Remove redundant string initialization (NFC) (details)
  80. [CodeGen] Remove unused function isRegLiveInExitBlocks (NFC) (details)
  81. [llvm] Use Optional::getValueOr (NFC) (details)
  82. [dsymutil] Add preliminary support for DWARF 5. (details)
  83. [MSan] Partially revert some changes from D94552 (details)
  84. [Verifier] Add tied-ness verification to statepoint intsruction (details)
  85. [ARM] Additional tests for different interleaving patterns. NFC (details)
  86. [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections. (details)
  87. [ARM] Update isVMOVNOriginalMask to handle single input shuffle vectors (details)
  88. [obj2yaml,yaml2obj] - Refine how we set/dump the sh_entsize field. (details)
  89. [clang][driver] Restore the original help text for `-I` (details)
  90. [LTO] Replace anonymous namespace with static functions (NFC). (details)
  91. [NFC][InstructionCost] Use InstructionCost in Transforms/Scalar/RewriteStatepointsForGC.cpp (details)
  92. [AArch64][SVE] Remove chains of unnecessary SVE reinterpret intrinsics (details)
  93. [X86][AVX] combineVectorSignBitsTruncation - limit AVX512 truncations to 128-bits (PR48727) (details)
  94. [SVE] Add ISel pattern for addvl (details)
  95. Hwasan InitPrctl check for error using internal_iserror (details)
  96. [ADT] Fix join_impl using the wrong size when calculating total length (details)
  97. [LTO] Add test to ensure objc-arc-contract is executed. (details)
  98. Fix build errors after ceb9379a9 (details)
  99. Revert "[dsymutil] Warn on timestmap mismatch between object file and debug map" (details)
  100. [SVE][CodeGen] CTLZ, CTTZ & CTPOP operations (predicates) (details)
  101. [ValueTracking] Fix one s/dyn_cast/dyn_cast_or_null/ (details)
  102. Revert "Hwasan InitPrctl check for error using internal_iserror" (details)
  103. [Tests] Added test for memcpy loop idiom recognization (details)
  104. [X86] canonicalizeShuffleMaskWithHorizOp - minor refactor to support multiple src ops. NFCI. (details)
  105. [libc] Refresh benchmark progress bar when needed. (details)
  106. [OpenCL] Improve OpenCL operator tests (details)
  107. [X86] Add tests for rv_marker lowering. (details)
  108. [mlir][linalg] Use attributes in named ops' indexing maps (details)
  109. [clangd] Split out a base class for delegating GlobalCompilationDatabases. NFC (details)
  110. [AArch64] Attempt to sink mul operands (details)
  111. GlobalISel: Do not set observer of MachineIRBuilder in LegalizerHelper (details)
  112. [NFC][RISCV] Add double type in RISC-V V CodeGen test cases for RV32. (details)
  113. [AArch64][GlobalISel] Add support for FCONSTANT of FP128 type (details)
  114. [lld][WebAssembly] Fix for TLS + --relocatable (details)
  115. [Frontend] Add pragma align natural and sort out pragma pack stack effect (details)
  116. [OpenMP] Add documentation for error messages and release notes (details)
  117. [OpenMP] Fix hierarchical barrier (details)
  118. [clangd] Explicitly avoid background-indexing the same file twice. (details)
  119. [clangd] Avoid reallocating buffers for each message read: (details)
  120. [SLP] add reduction test for FMF; NFC (details)
  121. [InstCombine] Fold select -> and/or using impliesPoison (details)
  122. [clangd] Remove "decision-forest-base" experimental flag. (details)
  123. [clangd] Remove some old CodeCompletion options that are never (un)set.  NFC (details)
  124. [IROutliner] Adapting to hoisted bitcasts in CodeExtractor (details)
  125. [dsymutil] Warn on timestmap mismatch between object file and debug map (details)
  126. [X86][SSE] canonicalizeShuffleMaskWithHorizOp - simplify shuffle(HOP(HOP(X,Y),HOP(Z,W))) style chains. (details)
  127. [X86][AVX] Add test for another 'reverse HADD' pattern mentioned in PR41813 (details)
  128. [DAG] visitVECTOR_SHUFFLE - use all_of to check for all-undef shuffle mask. NFCI. (details)
  129. [ARM] Add a pass that re-arranges blocks when there is a backwards WLS branch (details)
  130. [gn build] Port 60fda8ebb6d (details)
  131. [flang] Fix classification of shape inquiries in specification exprs (details)
  132. [Hexagon] Improve legalizing of ISD::SETCC result (details)
  133. [SLP] simplify type check for reductions (details)
  134. [flang] Do not create HostAssoc symbols in derived type scopes (details)
  135. [CSSPGO][llvm-profgen] Pseudo probe decoding and disassembling (details)
  136. [CSSPGO][llvm-profgen] Refactor to unify hashable interface for trace sample and context-sensitive counter (details)
  137. [CSSPGO][llvm-profgen] Virtual unwinding with pseudo probe (details)
  138. [NFC] fix missing SectionName declaration (details)
  139. [mlir] Correct 2 places that result in corrupted conversion rollbacks (details)
  140. [LLD][COFF] Avoid std::vector resizes during type merging (details)
  141. [NFC] Use correct ssa.copy spelling when referring to the intrinsic (details)
  142. [mlir][sparse] add vectorization strategies to sparse compiler (details)
  143. [LTO] Add test for freestanding LTO option. (details)
  144. [flang] Fix accessibility of USEd name in .mod file (details)
  145. [libc][NFC] add macro for fuchsia to switch test backend to zxtest (details)
  146. Fix the warnings on unused variables (NFC) (details)
  147. [FuncAttrs] Add additional willreturn tests (NFC) (details)
  148. [DSE] Add tests with stores of existing values. (details)
  149. [libc][NFC] change isblank and iscntrl from implicit casting (details)
  150. [test] Add Clang side tests for -fdebug-info-for-profiling (details)
  151. [NFC] Fix build break by a initializer list converting error (details)
  152. Revert "[AsmParser] make .ascii support spaces as separators" (details)
  153. [NewPM] Only non-trivially loop unswitch at -O3 and for non-optsize functions (details)
  154. [SPARC] Fix fp128 load/stores (details)
  155. Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable (details)
  156. [NFC] Rename ThinLTOPhase to ThinOrFullLTOPhase and move it from PassBuilder.h (details)
  157. [SystemZ]  Clear Available set in SystemZPostRASchedStrategy::initialize(). (details)
  158. [libunwind] Unwind through aarch64/Linux sigreturn frame (details)
  159. [flang] Add tests for procedure arguments with implicit interfaces (details)
  160. [RISCV] Custom lower ISD::VSCALE. (details)
  161. Fix grammar in diagnostic for wrong arity in a structured binding. (details)
  162. [Support] On Windows, take the affinity mask into account (details)
  163. [PowerPC] Try to fold sqrt/sdiv test results with the branch. (details)
  164. Revert "[Support] On Windows, take the affinity mask into account" (details)
  165. ADT: Fix reference invalidation in SmallVector::push_back and single-element insert (details)
  166. [NFC] Remove unused entry in PassRegistry.def (details)
  167. Revert "ADT: Fix reference invalidation in SmallVector::push_back and single-element insert" (details)
  168. [llvm] Use *Set::contains (NFC) (details)
  169. [llvm] Use llvm::stable_sort (NFC) (details)
  170. [llvm] Use std::any_of (NFC) (details)
  171. Reapply "ADT: Fix reference invalidation in SmallVector::push_back and single-element insert" (details)
  172. ADT: Fix reference invalidation in N-element SmallVector::append and insert (details)
  173. [NFC] Fix -Wsometimes-uninitialized (details)
  174. ADT: Fix reference invalidation in SmallVector::resize (details)
  175. ADT: Reduce code duplication in SmallVector::resize by using pop_back_n, NFC (details)
  176. ADT: Reduce code duplication in SmallVector by reusing reserve, NFC (details)
  177. [Driver] -gsplit-dwarf: Produce .dwo regardless of -gN for -fthinlto-index= (details)
  178. ADT: Reduce code duplication in SmallVector by calling reserve and clear, NFC (details)
  179. Fix unused variable in CoroFrame.cpp when building Release with GCC 10 (details)
  180. Add func call so we don't instruction-step into the builtin_trap (details)
  181. [lldb][wasm] Parse DWO section names (details)
  182. Implement vAttachWait in lldb-server (details)
  183. [mlir] Update doc to omit the usage of LLVMIntegerType (details)
  184. [lldb] Fix TestPlatformProcessConnect.py (details)
  185. [NFC][AsmPrinter] Windows warning: Use explicit cast (details)
  186. [AArch64] Adding ACLE intrinsics for the LS64 extension (details)
  187. [LTO] Expose opt() in LTOBackend (NFC). (details)
  188. [lld][WebAssembly] Add support for handling table symbols (details)
  189. [SLP] Don't vectorize stores of non-packed types (like i1, i2) (details)
  190. [clang] Use SourceLocations in unions [NFCI] (details)
  191. [DAG] visitVECTOR_SHUFFLE - pull out shuffle merging code into lambda helper. NFCI. (details)
  192. [X86] Improve sum-of-reductions v4f32 test coverage (details)
  193. [lldb/test] Ensure launched processes are ready to be attached (details)
  194. [DAG] visitVECTOR_SHUFFLE - MergeInnerShuffle - reset shuffle ops and reorder early-out and second op matching. NFCI. (details)
  195. [clangd] Add main file macros into the main-file index. (details)
  196. Change XCore code owner. (details)
  197. [clang][cli] NFC: Remove SSPBufferSize assignment (details)
  198. [clang][cli] Port more CodeGenOptions to marshalling infrastructure (details)
  199. Revert "Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable" (details)
  200. [clang-tidy] Use DenseSet<SourceLocation> in UpgradeDurationConversionsCheck, NFCI (details)
  201. [flang][driver] Unify f18_version.h.in and Version.inc.in (details)
  202. [InferFunctionAttrs] Improve CHECK variable names (NFC). (details)
  203. [SelectionDAG] Make use of KnownBits::commonBits. NFC. (details)
  204. [Analysis,CodeGen] Make use of KnownBits::makeConstant. NFC. (details)
  205. [Support] Simplify KnownBits::icmp helpers. NFC. (details)
  206. [Support] Add KnownBits::sextInReg exhaustive tests (details)
  207. [docs] Update DebuggingJITedCode page after fix in LLDB (details)
  208. [Support] Ensure KnownBits::sextInReg can handle the src == dst sext-in-reg case. (details)
  209. [flang] Fix dangling pointer in LabelEnforce (details)
  210. [OpenCL] Improve online documentation. (details)
  211. [mlir][linalg] Add docstring support for named op spec (details)
  212. [Support] Simplify KnownBits::sextInReg implementation. (details)
  213. [TableGen] Enhance !cast<string> to handle bit and bits types. (details)
  214. Revert "[AArch64] Attempt to sink mul operands" (details)
  215. [Support] Remove redundant sign bit tests from KnownBits::getSignedMinValue/getSignedMaxValue (details)
  216. [SystemZ] misched-cutoff tests can only be tested on non-NDEBUG (assertion) builds (details)
  217. [clangd] Remove another option that was effectively always true. NFC (details)
  218. Revert "[RISCV] Legalize select when Zbt extension available" (details)
  219. [flang][driver] Use __FLANG_VERISION__ in f18.cpp (nfc) (details)
  220. [NFC] Disallow unused prefixes under MC/ARM (details)
  221. [clangd] Make AST-based signals available to runWithPreamble. (details)
  222. [clangd] Trivial: Documentation fix in ASTSignals. (details)
  223. [gn build] Port 2f395b7092bd (details)
  224. [flang] Fix some module file issues exposed by Whizard (details)
  225. [NFC] Disallow unused prefixes under MC/AArch64 (details)
  226. [NewPM] Fix placement of LoopFlatten (details)
  227. [X86][AVX] Adjust unsigned saturation downconvert negative test (details)
  228. [libomptarget][amdgpu] Fix kernel launch tracing to match previous behavior (details)
  229. [SelectionDAG] Remove an early-out from computeKnownBits for smin/smax (details)
  230. [LLDB] MinidumpParser: Prefer executable module even at higher address (details)
  231. [HIP] Add signbit(long double) decl (details)
  232. Support emptiness checks for unbounded FlatAffineConstraints. (details)
  233. [OpenMP] Drop the static library libomptarget-nvptx (details)
  234. [clang][MSVC] Fix missing MSInheritanceAttr in template specialization. (details)
  235. [X86] Add the FSRM feature (Fast Short Rep Mov) to Zen3. (details)
  236. [OpenMP] Dropped unnecessary define when compiling deviceRTLs for NVPTX (details)
  237. [GWP-ASan] Minor refactor of optional components. (details)
  238. [openacc] Rename generated file from ACC.cpp.inc to ACC.inc to match D92955 (details)
  239. [NFC] Update test to not check for 'opaque' in the file name. (details)
  240. [MLIR][TOSA] First lowerings from Tosa to Linalg (details)
  241. Add newline to terminate debug message (NFC) (details)
  242. [BasicAA] Handle recursive queries more efficiently (details)
  243. [mlir][ODS] Add new RangedTypesMatchWith operation predicate (details)
  244. [mlir][OpFormatGen] Format enum attribute cases as keywords when possible (details)
  245. [Driver] -gsplit-dwarf: Produce .dwo regardless of -gN for IR input (details)
  246. [RISCV] Merge Utils library into MCTargetDesc (details)
  247. [mlir][PatternRewriter] Add a new hook to selectively replace uses of an operation (details)
  248. [mlir] Remove TosaToLinalg dependency on all Passes (details)
  249. [clang] Do not crash when CXXRecordDecl has a non-CXXRecordDecl base. (details)
  250. [mlir][docs] Bring bufferization docs up to date. (details)
  251. [PowerPC] Only use some extend mne if assembler is modern enough (details)
  252. [gn build] (manually) port 387d3c24792f (details)
  253. [libc] Use #undef isascii in specific header (details)
  254. Add -fexceptions to test as it uses them and fails on platforms where it is not on by default (like the PS4). (details)
  255. [RISCV] Optimize select_cc after fp compare expansion (details)
  256. Re-land [Support] On Windows, take the affinity mask into account (details)
  257. [LTO] Test format fix (NFC) (details)
  258. [RISCV][NFC] Regenerate Calling Convention Tests (details)
  259. [mlir] Remove over specified memory effects (details)
  260. [clangd] Reduce logspam for CDB scanning (details)
  261. [mlir][Linalg] Add canonicalization to remove no-op linalg operations. (details)
  262. [SLP] remove unnecessary state in matching reductions (details)
  263. [OpenMP] Remove omptarget-nvptx from deps as it is no longer a valid target (details)
  264. [mlir][Linalg] Add canonicalization of linalg op -> dim op. (details)
  265. [mlir][Linalg] NFC: Verify tiling on linalg.generic operation on tensors. (details)
  266. [libomptarget][nvptx][nfc] Move target_impl functions out of header (details)
  267. [flang] Fix use-associated procedure in generic (details)
  268. [AArch64][GlobalISel] Assign FPR banks to loads which are used by integer->float conversions. (details)
  269. Reland "[AsmParser] make .ascii support spaces as separators" (details)
  270. [libomptarget][nvptx] Reduce calls to cuda header (details)
  271. [libTooling] Change `addInclude` to use expansion locs. (details)
  272. [AArch64][GlobalISel] Add selection support for fpr bank source variants of G_SITOFP and G_UITOFP. (details)
  273. [libc] Add memmove implementation. (details)
  274. [CodeGen, Transforms] Use llvm::sort (NFC) (details)
  275. [llvm] Use llvm::drop_begin (NFC) (details)
  276. [llvm] Remove redundant return and continue statements (NFC) (details)
  277. Add Semantic check for Flang OpenMP 4.5 - 2.7.1  Do Loop restrictions on single directive and firstprivate clause. (details)
  278. [mlir][sparse] retry sparse-only for cyclic iteration graphs (details)
  279. [clang][cli] NFC: Decrease the scope of ParseLangArgs parameters (details)
  280. [clang][cli] NFC: Decrease the scope of ParseCodeGenArgs parameters (details)
  281. [clang][cli] Specify KeyPath prefixes via TableGen classes (details)
  282. [AArch64] Add Fujitsu A64FX scheduling model (details)
  283. [WebAssembly] Add support for table linking to wasm-ld (details)
  284. Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and single-element insert"" (details)
  285. [Clang] Mutate long-double math builtins into f128 under IEEE-quad (details)
  286. [llvm-readobj] - Fix the compilation with GCC < 7.0. (details)
  287. [AArch64][GlobalISel] Fix fallbacks introduced for G_SITOFP in 8f283cafddfa8d6d01a94b48cdc5d25817569e91 (details)
  288. [libcxx testing] Fix UB in tests for std::lock_guard (details)
  289. [Debuginfo][DW_OP_implicit_pointer] (1/7) Support for DW_OP_LLVM_implicit_pointer (details)
  290. [llvm-nm] - Move MachO specific logic out from the dumpSymbolNamesFromObject(). NFC. (details)
  291. [libc] Allow customization of memcpy via flags. (details)
  292. [llvm-nm] - Simplify the code in dumpSymbolNamesFromObject. NFC. (details)
  293. [ARM][GISel] Treat calls as variadic even if only fixed arguments provided (details)
  294. [yaml2obj/obj2yaml] - Refine handling of SHT_GNU_verdef sections. (details)
  295. [llvm-readobj][test] - Remove excessive YAML fields from tests. (details)
  296. [clangd] exclude symbols from document outline which do not originate from the main file (details)
  297. [LLDB] Add per-thread register infos shared pointer in gdb-remote (details)
  298. DynamicRegisterInfo calculate offsets in separate function (details)
  299. [RISCV] Optimize Branch Comparisons (details)
  300. [SVE] Restrict the usage of REINTERPRET_CAST. (details)
  301. [Orc][NFC] Turn LLJIT member ObjTransformLayer into unique_ptr (details)
  302. [Orc] Allow LLJITBuilder's CreateObjectLinkingLayer to return errors (details)
  303. [NFC][RISCV] Remove useless code in RISCVRegisterInfo.td. (details)
  304. [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference (details)
  305. [Orc] Fix OrcV2Examples after D94690 (details)
  306. Revert "[lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference" (details)
  307. [clangd] Make ExpandAutoType not available on template params. (details)
  308. [clangd] Set correct CWD when using compile_flags.txt (details)
  309. [lldb][docs] Translate ASCII art to restructured text formatting (details)
  310. [X86][AVX] combineHorizOpWithShuffle - support target shuffles in HOP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y)) (details)
  311. [WebAssembly] MC layer writes table symbols to object files (details)
  312. [ARM] Don't run the block placement pass at O0 (details)
  313. [mlir][linalg] Support generating builders for named op attributes (details)
  314. [SVE] Fix unused variable. (details)
  315. [OpenCL][Docs] Fixed malformed table in OpenCLSupport (details)
  316. [clang][cli] Parse & generate options necessary for LangOptions defaults manually (details)
  317. [X86] Add umin knownbits/demandedbits ult test for D94532 (details)
  318. Set option default for enabling memory ssa for new pass manager loop sink pass to true. (details)
  319. [DAG] visitVECTOR_SHUFFLE - MergeInnerShuffle - improve shuffle(shuffle(x,y),shuffle(x,y)) merging (details)
  320. [mlir] Add better support for f80 and f128 (details)
  321. [libc] CopyAlignedBlocks can now specify alignment on top of block size (details)
  322. [RISCV][NFC] Fix order of parameters in cmov ge/le tests (details)
  323. [clang][cli] NFC: Add PIE parsing for precompiled input and IR (details)
  324. [clang][cli] NFC: Parse some LangOpts after the defaults are set (details)
  325. [clang][cli] NFC: Promote ParseLangArgs and ParseCodeGenArgs to members (details)
  326. [ARM][Block placement] Check the predecessor exists before processing it (details)
  327. [X86][SSE] Attempt to fold shuffle(binop(),binop()) -> binop(shuffle(),shuffle()) (details)
  328. [flang] Disallow INTENT attribute on procedure dummy arguments (details)
  329. [TargetLowering] Don't speculatively call ComputeNumSignBits. NFC (details)
  330. [flang][driver] Copy test file into a temp dir when testing (nfc) (details)
  331. [clangd] Update CC Ranking model with better sampling. (details)
  332. [OpenCL][Docs] Fixed cross-section reference in OpenCLSupport (details)
  333. [DebugInfo][CodeView] Change in line tables only mode to emit type information (details)
  334. [ARM] Constant tripcount tail predication loop tests. NFC (details)
  335. [ARM] Tail predication with constant loop bounds (details)
  336. [MIPatternMatch] Add m_OneNonDBGUse (details)
  337. [mlir] Add Complex dialect. (details)
  338. [RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates. (details)
  339. GetMacosAlignedVersion() fails if sysctl is not setup (details)
  340. Fix libc++ clang-cl build, swap attribute order (details)
  341. [CodeGen] Removes unwanted optimisation for TargetConstantFP (details)
  342. [SLP] remove unused reduction functions; NFC (details)
  343. [CodeView][DebugInfo] Add test case to show that linkage names are not (details)
  344. Revert "[BasicAA] Handle recursive queries more efficiently" (details)
  345. [NFC][SimplifyCFG] Add testcase showing that we fail to preserve DomTree in switchToSelect() (details)
  346. [Utils] splitBlockBefore() always operates on DomTreeUpdater, so take it, not DomTree (details)
  347. [Utils][SimplifyCFG] Port SplitBlock() to DomTreeUpdater (details)
  348. [SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater (details)
  349. [SimplifyCFG][BasicBlockUtils] Port SplitBlockPredecessors()/SplitLandingPadPredecessors() to DomTreeUpdater (details)
  350. [SimplifyCFG] switchToSelect(): don't forget to insert DomTree edge iff needed (details)
  351. [GWP-ASan] Add inbuilt options parser. (details)
  352. [MSVC] Don't add -nostdinc++ -isystem to runtimes builds (details)
  353. [Sema] turns -Wfree-nonheap-object on by default (details)
  354. BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor (details)
  355. [mlir][Linalg] Add missing check to canonicalization of GenericOp that are identity ops. (details)
  356. Skip 'g' packet tests when running on darwin; debugserver doesn't impl (details)
  357. [SLP] remove dead code in reduction matching; NFC (details)
  358. Revert "Revert "ADT: Fix reference invalidation in SmallVector..."" (details)
  359. [AArch64][GlobalISel] Select immediate fcmp if the zero is on the LHS. (details)
  360. [ADT][Support] Fix C4146 error from MSVC (details)
  361. [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument (details)
  362. Revert "[WebAssembly] MC layer writes table symbols to object files" (details)
  363. Revert "[WebAssembly] Add support for table linking to wasm-ld" (details)
  364. hwasan: Update register-dump-read.c test to reserve x23 instead of x20. (details)
  365. [NFC] Disallow unused prefixes under MC/RISCV (details)
  366. [flang] Create names to allow access to inaccessible specifics (details)
  367. [mlir][NFC] Move helper substWithMin into Affine utils (details)
  368. [mlir][AsmPrinter] Properly escape strings when printing locations (details)
  369. [mlir] Fixing potential build break in my previous commit (details)
  370. [debugserver] Fix inverted if block that resulted in us using the private entitlements (details)
  371. [NewPM][Inliner] Move the 'always inliner' case in the same CGSCC pass as 'regular' inliner (details)
  372. [Inline] Fix a missing character in inline_stats.ll (details)
  373. [utils] Use llvm::sort (NFC) (details)
  374. [AMDGPU] Use llvm::is_contained (NFC) (details)
  375. [StringExtras] Rename SubsequentDelim to ListSeparator (details)
  376. [NFC] Add -std=c11 to attr-availability.c (details)
  377. [NPM][Inliner] Temporarily remove inline_stats test case for always (details)
  378. AArch64: fix regression introduced by fcmp immediate selection. (details)
  379. Introduce llvm.noalias.decl intrinsic (details)
  380. [InstCombine] Add a test file that contains safe select transforms (NFC) (details)
  381. [InstCombine] Add more tests to select-safe-transforms.ll (NFC) (details)
  382. [InstCombine] Add more tests for select operand replacement (NFC) (details)
  383. [ASTMatchers] Add mapAnyOf matcher (details)
  384. [ASTMatchers] Make cxxOperatorCallExpr matchers API-compatible with n-ary operators (details)
  385. [LegalizeDAG] Handle NeedInvert when expanding BR_CC (details)
  386. [ASTMatchers] Add binaryOperation matcher (details)
  387. [ASTMatchers] Add support for CXXRewrittenBinaryOperator (details)
  388. Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable (details)
  389. [Tests] Added tests for new instcombine or simplification; NFC (details)
  390. [InstSimplify] Add (~A & B) | ~(A | B) --> ~A (details)
  391. [RISCV] Correct alignment settings for vector registers. (details)
  392. [InstSimplify] Update comments, remove redundant tests (details)
  393. [LTO] Remove options to disable inlining, vectorization & GVNLoadPRE. (details)
  394. [StringExtras] Fix comment typos (NFC) (details)
  395. [llvm] Construct SmallVector with iterator ranges (NFC) (details)
  396. [llvm] Use *::empty (NFC) (details)
  397. [InstSimplify] Precommit new testcases; NFC (details)
  398. [ARM] Remove LLC tests from transform/hardware loop tests. (details)
  399. [ARM] Add low overhead loops terminators to AnalyzeBranch (details)
  400. [InstSimplify] Handle commutativity for 'and' and 'outer or' for (~A & B) | ~(A | B) --> ~A (details)
  401. [SLP] remove unnecessary use of 'OperationData' (details)
  402. [SLP] fix typos; NFC (details)
  403. [SLP] remove opcode field from reduction data class (details)
  404. [OpenMP] Added the support for hidden helper task in RTL (details)
  405. [mlir][sparse] improved sparse runtime support library (details)
  406. [NFC] Removed extra text in comments (details)
  407. [ARM] Test for aligned blocks. NFC (details)
  408. [ARM] Align blocks that are not fallthough targets (details)
  409. [SimplifyCFG] markAliveBlocks(): catchswitch: preserve PostDomTree (details)
  410. [InstCombine] Replace one-use select operand based on condition (details)
  411. [X86] Default to -x86-pad-for-align=false to drop assembler difference with or w/o -g (details)
  412. [RISCV] Remove unneeded StringRef to std::string conversions in RISCVCompressInstEmitter. NFC (details)
  413. [RISC] Replace dyn_casts that are only checked by an assert with a cast. NFC (details)
  414. [RISCV] Simplify mergeCondAndCode in RISCVCompressInstEmitter.cpp. NFC (details)
  415. [RISCV] Few more minor cleanups to RISCVCompressInstEmitter. NFC (details)
  416. [RISCV] Remove an extra map lookup from RISCVCompressInstEmitter. NFC (details)
  417. [VE] Support VE in libunwind (details)
  418. [ELF] Support R_PPC_ADDR24 (ba foo; bla foo) (details)
  419. [BasicAA] Move assumption tracking into AAQI (details)
  420. Reapply [BasicAA] Handle recursive queries more efficiently (details)
  421. [clang-format] Revert e9e6e3b34a8e (details)
  422. Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference (details)
  423. [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates (details)
  424. [clangd] Use empty() instead of size()>0 (details)
  425. [clangd] Use !empty() instead of size()>0 (details)
  426. [InstSimplify] Add tests for x*C1/C2<=x (NFC) (details)
  427. [InstSimplify] Fold x*C1/C2 <= x (PR48744) (details)
  428. [lldb][docs] Cleanup the Python doc strings for SB API classes (details)
  429. [Tests] Add test for PR45691 (details)
  430. [InstCombine] Transform abs pattern using multiplication to abs intrinsic (PR45691) (details)
  431. [lldb][docs] Fix some RST formatting errors related to code examples. (details)
  432. [llvm] Use llvm::sort (NFC) (details)
  433. [IRBuilder] "Zero"-initialize SmallVector (NFC) (details)
  434. [TableGen] Drop redundant const from return types (NFC) (details)
  435. NFC: Minor cleanup of function calls (details)
  436. [SimplifyCFG] Add test for PR48778 (NFC) (details)
  437. [ValueTracking] Fix isSafeToSpeculativelyExecute for sdiv (PR48778) (details)
  438. [lldb] Skip TestPlatformProcessConnect on windows and darwin (details)
  439. Makefile.rules: Delete GCC 4.6 workaround (details)
  440. Fix openmp CMake build on non-Linux AArch64 systems. (details)
  441. [NFC] [TargetRegisterInfo] add one use check to lookThruCopyLike. (details)
  442. Makefile.rules: Make HOST_OS/OS simply expanded variable to avoid excess uname -s invocations (details)
  443. [JITLink][ELF] Skip DWARF sections in ELF objects. (details)
  444. [InstCombine] more tests for D94861 (NFC) (details)
  445. [PowerPC] [NFC] Add AIX triple to some regression tests (details)
  446. [Legalizer] Promote result type in expanding FP_TO_XINT (details)
  447. [test] Autogen a loop vectorizer test to make future changes visible (details)
  448. [test] pre commit a couple more tests for vectorizing multiple exit loops (details)
  449. [JITLink][ELF] New ELF skip-debug-sections test requires asserts. (details)
  450. [PowerPC] support register pressure reduction in machine combiner. (details)
  451. [clang-format] Add StatementAttributeLikeMacros option (details)
  452. [IR] Allow scalable vectors in structs to support intrinsics returning multiple values. (details)
  453. [RISCV] Use tail agnostic policy for instructions with tied defs if the use operand is IMPLICIT_DEF. (details)
  454. [lldb][docs] Resolve the remaining sphinx formatter warnings in the SB API docs (details)
  455. [Object, llvm-readelf] - Move the API for retrieving symbol versions to ELF.h (details)
  456. [clang-format] Fix documentation of bcc1dee600 (details)
  457. [lldb][docs] Use inline literals for code/paths instead of rendering it with the default role (details)
  458. [X86][SSE] isHorizontalBinOp - reuse any existing horizontal ops. (details)
  459. [RISCV] Add scalable vector truncate patterns (details)
  460. [DAG] SimplifyDemandedBits - use KnownBits comparisons to remove ISD::UMIN/UMAX ops (details)
  461. [mlir] Fix cross-compilation (Linalg ODS gen) (details)
  462. Revert "[PowerPC] support register pressure reduction in machine combiner." (details)
  463. [VectorUtils] Do not try to add indices matching tombstone/empty values. (details)
  464. Revert "[OpenMP] Added the support for hidden helper task in RTL" (details)
  465. [AMDGPU][MC][GFX10] Improved dpp8 errors handling (details)
  466. [SystemZ][z/OS] Fix No such file or directory expression error matching in lit tests (details)
  467. [Statepoint] Handle `undef` operands in statepoint. (details)
  468. [Doc] Fix example in codegen doc. (details)
  469. [NFC]Migrate VectorCombine.cpp to use InstructionCost (details)
  470. [InferAttrs] Mark some library functions as willreturn. (details)
  471. [PowerPC][AIX]Do not emit xxspltd mnemonic on AIX. (details)
  472. [CSInfo][MIPS] Update CSInfo in delay slot filler (details)
  473. [SLP] reduce opcode API dependency in reduction cost calc; NFC (details)
  474. [SLP] rename reduction query for min/max ops; NFC (details)
  475. [AMDGPU][MC] Refactored parsing of dpp ctrl (details)
  476. [LoopRotate] Precommit test for prepare-for-lto handling. (details)
  477. Fix for sanitizer issue in 55c557a (details)
  478. [X86][AVX] IsElementEquivalent - add matchShuffleWithUNPCK + VBROADCAST/VBROADCAST_LOAD handling (details)
  479. [WebAssembly] Add support for table linking to wasm-ld (details)
  480. [WebAssembly] MC layer writes table symbols to object files (details)
  481. [AArch64] Further restricts when a dup(*ext) can be rearranged (details)
  482. Reland "[AArch64] Attempt to sink mul operands"" (details)
  483. [MLIR] Support checking if two FlatAffineConstraints are equal (details)
  484. [ARM] Update test target triple. NFC (details)
  485. [clangd] Derive new signals in CC from ASTSignals. (details)
  486. [Coroutine] Do not CoroElide if there are musttail calls (details)
  487. [ARM] Don't handle low overhead branches in AnalyzeBranch (details)
  488. [MLIR] NFC: simplify PresburgerSet::isEqual (details)
  489. [AArch64] Add test to check the attributes for some intrinsics. (details)
  490. [SLP] add more FMF tests for fmax/fmin reductions; NFC (details)
  491. [RISCV][NFC] Increase test coverage of Zbt extension (details)
  492. [AArch64] Make target intrinsics DefaultAttrIntrinsics. (details)
  493. [LLD][ELF][AArch64] Set _GLOBAL_OFFSET_TABLE_ at the start of .got (details)
  494. [AArch64] Revert back to Intrinsic<> for TME instructions. (details)
  495. [lldb][docs] Use 'any' as the default role in LLDB's sphinx project (details)
  496. [llvm] Populate std::vector at construction time (NFC) (details)
  497. [STLExtras] Add a default value to drop_begin (details)
  498. [llvm] Use the default value of drop_begin (NFC) (details)
  499. [clang] Allow LifetimeExtendedTemporary to have no access specifier (details)
  500. [RISCV] Add a test of vector sadd.overflow to demonstrate intrinsics with multiple scalable vector results. (details)
  501. Revert "[RISCV] Add a test of vector sadd.overflow to demonstrate intrinsics with multiple scalable vector results." (details)
  502. Recommit "[RISCV] Add a test of vector sadd.overflow to demonstrate intrinsics with multiple scalable vector results." (details)
  503. [libc++] Rename check-cxx-deps to cxx-test-depends for consistency (details)
  504. [NFC] Update some mlir python documentation. (details)
  505. [libc++] improve feature test macro script (details)
  506. NFC: Document current MLIR Python ODS conventions. (details)
  507. [OpenMP][NFC] Fix test (details)
  508. [PredicateInfo] Add more and/or tests (NFC) (details)
  509. [RISCV] Remove empty Sched instantiations from the end of InstAlias defs. NFCI (details)
  510. [SLP] match maxnum/minnum intrinsics as FP reduction ops (details)
  511. [libc++] NFCI: Refactor allocator_traits (details)
  512. [x86] add cast to avoid compile-time warning; NFC (details)
  513. [LoopInfo] Fix a typo in compareLoops (details)
  514. [SimplifyCFG] Update SimplifyBranchOnICmpChain to recognize select form of and/or (details)
  515. [OpenMP][Docs] Fix typos in FAQ (NFC) (details)
  516. Regenerate the feature test macro unit-tests. NFCI. (details)
  517. [InstCombine,InstSimplify] Optimize select followed by and/or/xor (details)
  518. Address unused variable warning (details)
  519. Revert "[NFC] [TargetRegisterInfo] add one use check to lookThruCopyLike." (details)
  520. [X86] Fix tile spill merge issue. (details)
  521. PR48763: Better handling for classes that inherit a default constructor. (details)
  522. [PowerPC] Sign extend comparison operand for signed atomic comparisons (details)
  523. [X86][AMX] Clear AMX lit test case. (details)
  524. DR2064: decltype(E) is only a dependent type if E is type-dependent, not (details)
  525. PR24076, PR33655, C++ CWG 1558: Consider the instantiation-dependence of (details)
  526. Following up on PR48517, fix handling of template arguments that refer (details)
  527. [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (details)
  528. [ORC] Move OrcError.h to include/llvm/ExecutionEngine/Orc/Shared. (details)
  529. [libc][NFC] Use ASSERT_EQ instead of EXPECT_EQ in fenv/exception_status_test (details)
  530. Fix a few GCC compiler warnings (NFC) (details)
  531. [libc][NFC][Obvious] Add a missing dep. (details)
  532. [NFC][AIX][XCOFF] Fix compile warning on strncpy (details)
  533. [RISCV] Add intrinsics for vector AMO operations (details)
  534. [libc++] [P0935] [C++20] Eradicating unnecessarily explicit default constructors from the standard library. (details)
  535. [libc][NFC] Remove dead code (details)
  536. [libc][NFC] remove dependency on non standard ssize_t (details)
  537. [clang][driver][NFC][obvious] Remove obsolete unistd.h include (details)
  538. [WebAssembly] call_indirect issues table number relocs (details)
  539. [WebAssembly] Change prefix on data segment flags to WASM_DATA_SEGMENT (details)
  540. [clang][cli] Parse Lang and CodeGen options separately (details)
  541. [X86][AMX] Fix the typo. (details)
  542. [NFC] Make remaining cost functions in LoopVectorize.cpp use InstructionCost (details)
  543. [llvm][nvptx] add atomicity to counter in ISelLowering (details)
  544. [ORC] Move LookupRequest from OrcShared to Orc. (details)
  545. [lit] Harmonize lit and llvm versionning (details)
  546. [llvm] Prevent infinite loop in InstCombine of select statements (details)
  547. [RISCV] Add scalable-vector integer extension patterns (details)
  548. [lldb] Fix crash in "help memory read" (details)
  549. [ARM][MachineOutliner] Add stack fixup feature (details)
  550. [lldb] Re-enable TestPlatformProcessConnect on macos (details)
  551. [LLDB] Add support to resize SVE registers at run-time (details)
  552. [LLDB] Test SVE dynamic resize with multiple threads (details)
  553. [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands. (details)
  554. [AMDGPU] Simplify AMDGPUInstPrinter::printExpSrcN. NFC. (details)
  555. Revert 5238e7b302 "[InstCombine] Replace one-use select operand based on condition" (details)
  556. [X86][SSE] combineVectorSignBitsTruncation - fold trunc(srl(x,c)) -> packss(sra(x,c)) (details)
  557. [mlir] Add `complex.abs`, `complex.div` and `complex.mul` to ComplexOps. (details)
  558. [flang][driver] Add support for `-I` in the new driver (details)
  559. [DebugInfo][dexter] Add dexter tests for merged values (details)
  560. [AArch64][SVE]Add cost model for vector reduce for scalable vector (details)
  561. [SystemZ][z/OS] Fix No such file or directory expression error (details)
  562. [mlir] Clarify docs around LLVM dialect-compatible types (details)
  563. [clang] Check for nullptr when instantiating late attrs (details)
  564. [flang][driver] Add support for fixed form detection (details)
  565. [DebugInfo][dexter] Tweak dexter test for merged values (details)
  566. [OpenMP] libomp: cleanup parsing of OMP_ALLOCATOR env variable. (details)
  567. [flang][driver] Add standard macro predefinitions for compiler version (details)
  568. [llvm/Orc] Fix ExecutionEngine module build breakage (details)
  569. [ThinLTO] Also prune Thin-* files from the ThinLTO cache (details)
  570. [mlir][Affine] Revisit and simplify composeAffineMapAndOperands. (details)
  571. AArch64: add apple-a14 as a CPU (details)
  572. [mlir][spirv] Define spv.GLSL.Fma and add lowerings (details)
  573. [lldb] Fix two documentation typos (details)
  574. [X86] Regenerate fmin/fmax reduction tests (details)
  575. [Flang][OpenMP] Add semantic checks for OpenMP Workshare Construct (details)
  576. [LoopRotate] Calls not lowered to calls should not block rotation. (details)
  577. [libc++] Sync TEST_HAS_TIMESPEC_GET and _LIBCPP_HAS_TIMESPEC_GET on FreeBSD (details)
  578. [ARM] Expand add.sat/sub.sat cost checks. NFC (details)
  579. [WebAssembly][lld] Fix call-indirect.s test to validate (details)
  580. [clangd] Index local classes, virtual and overriding methods. (details)
  581. [CMake] Remove dead code setting policies to NEW (details)
  582. [PowerPC] Fix the check for the instruction using FRSP/XSRSP output register (details)
  583. [flang][directive] Get rid of flangClassValue in TableGen (details)
  584. [ARM] Add MVE add.sat costs (details)
  585. [RISCV] Extend RVV VType info with the type's AVL (NFC) (details)
  586. [OpenMP] Fix atomic entries for captured logical operation (details)
  587. [AMDGPU] Simplify test case for D94010 (details)
  588. [MLIR][SPIRV] Add `SignedOp` trait. (details)
  589. [AMDGPU] Fix test case for D94010 (details)
  590. [ValueTracking] Strengthen impliesPoison reasoning (details)
  591. [clang-format] Apply Allman style to lambdas (details)
<
Commit 3d9c51d111d0c8480d10fc48fb621bac1d080449 by cullen.rhodes
[SVE][NFC] Regenerate a few CodeGen tests

Regenerated using llvm/utils/update_llc_test_checks.py as part of
D94504, committing separately to reduce the diff for D94504.
The file was modifiedllvm/test/CodeGen/AArch64/sve-intrinsics-loads-nf.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-pred-non-temporal-ldst-addressing-mode-reg-imm.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-pred-contiguous-ldst-addressing-mode-reg-imm.ll
Commit 348471575d9c24bbfb124ca5eac1589de075da88 by aaron
Add -ansi option to CompileOnly group

-ansi is documented as being the "same as -std=c89", but there are
differences when passing it to a link.

Adding -ansi to said group makes sense since it's supposed to be an
alias for -std=c89 and resolves this inconsistency.
The file was modifiedclang/include/clang/Driver/Options.td
Commit b117d17d264f448e0b037a62f5a48ec9aedd886c by smeenai
[doc] Place sha256 in lld/README.md into backticks

Reviewed By: smeenai

Differential Revision: https://reviews.llvm.org/D93984
The file was modifiedlld/README.md
Commit ef3800e82169c674219501d9ac09ef12b28e6359 by aaron
Return false from __has_declspec_attribute() if not explicitly enabled

Currently, projects can check for __has_declspec_attribute() and use
it accordingly, but the check for __has_declspec_attribute will return
true even if declspec attributes are not enabled for the target.

This changes Clang to instead return false when declspec attributes are
not supported for the target.
The file was modifiedclang/lib/Lex/PPMacroExpansion.cpp
Commit 5aefc8dc4d14ad04259ab8ae0b2e0da2596d66f7 by mgorny
[llvm] [cmake] Remove obsolete /usr/local hack for *BSD

Remove the hack adding /usr/local paths on FreeBSD and DragonFlyBSD.
It does not seem to be necessary today, and it breaks cross builds.

Differential Revision: https://reviews.llvm.org/D94491
The file was modifiedllvm/CMakeLists.txt
Commit bb9ebf6baf7057d7f2aed90fccbac2414cf9a134 by Dávid Bolvanský
[Tests] Add tests for new InstCombine OR transformation, NFC
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
Commit 0529946b5bafafd10d77b946ee9fa96f388860ef by Dávid Bolvanský
[instCombine] Add (A ^ B) | ~(A | B) -> ~(A & B)

define i32 @src(i32 %x, i32 %y) {
%0:
  %xor = xor i32 %y, %x
  %or = or i32 %y, %x
  %neg = xor i32 %or, 4294967295
  %or1 = or i32 %xor, %neg
  ret i32 %or1
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %and = and i32 %x, %y
  %neg = xor i32 %and, 4294967295
  ret i32 %neg
}
Transformation seems to be correct!

https://alive2.llvm.org/ce/z/Cvca4a
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit 6f4d460762006af17826693abc1e7139a76aa1f2 by joshisameeran17
[Flang][openmp][openacc] Extend CheckNoBranching to handle branching provided by LabelEnforce.

`CheckNoBranching` is currently handling only illegal branching out for constructs
with `Parser::Name` in them.
Extend the same for handling illegal branching out caused by `Parser::Label` based statements.
This patch could possibly solve one of the issues(typically branching out) mentioned in D92735.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D93447
The file was modifiedflang/test/Semantics/omp-parallell01.f90
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedflang/lib/Semantics/check-directive-structure.h
Commit 03c8d6a0c4bd0016bdfd1e53e6878696fe6412ed by craig.topper
[LegalizeDAG][RISCV][PowerPC][AMDGPU][WebAssembly] Improve expansion of SETONE/SETUEQ on targets without SETO/SETUO.

If SETO/SETUO aren't legal, they'll be expanded and we'll end up
with 3 comparisons.

SETONE is equivalent to (SETOGT || SETOLT)
so if one of those operations is supported use that expansion. We
don't need both since we can commute the operands to make the other.

SETUEQ can be implemented with !(SETOGT || SETOLT) or (SETULE && SETUGE).
I've only implemented the first because it didn't look like most of the
affected targets had legal SETULE/SETUGE.

Reviewed By: frasercrmck, tlively, nemanjai

Differential Revision: https://reviews.llvm.org/D94450
The file was modifiedllvm/test/CodeGen/RISCV/rvv/setcc-fp-rv32.ll
The file was modifiedllvm/test/CodeGen/PowerPC/spe.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-select-fcmp.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modifiedllvm/test/CodeGen/RISCV/double-fcmp.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-comparisons.ll
The file was modifiedllvm/test/CodeGen/RISCV/float-br-fcmp.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vsx.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-br-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/double-select-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/float-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/double-br-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/setcc-fp-rv64.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/comparisons-f32.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/setcc.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/comparisons-f64.ll
The file was modifiedllvm/test/CodeGen/RISCV/float-select-fcmp.ll
Commit 4718ec01669b01373180f4cd1256c6e2dd6f3999 by zeratul976
[clangd] Avoid recursion in TargetFinder::add()

Fixes https://github.com/clangd/clangd/issues/633

Differential Revision: https://reviews.llvm.org/D94382
The file was modifiedclang-tools-extra/clangd/FindTarget.h
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp
The file was modifiedclang-tools-extra/clangd/FindTarget.cpp
Commit f748e92295515ea7b39cd687a718915b559de6ec by aeubanks
[NewPM] Run non-trivial loop unswitching under -O2/3/s/z

Fixes https://bugs.llvm.org/show_bug.cgi?id=48715.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D94448
The file was modifiedllvm/test/Transforms/LoopUnroll/opt-levels.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was addedllvm/test/Transforms/SimpleLoopUnswitch/pipeline.ll
Commit a14040bd4d902419b53cf0ad576caa0f01eccf5c by craig.topper
[RISCV] Use vmerge.vim for llvm.riscv.vfmerge with a 0.0 scalar operand.

We can use a 0 immediate to avoid needing to materialize 0 into
an FPR first.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D94459
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmerge-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmerge-rv32.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Commit 08d4a50467ecef1337f8d7d9763c7738861bd6f6 by flo
[FunctionAttrs] Precommit tests for willreturn inference.

Tests for D94502.
The file was addedllvm/test/Transforms/FunctionAttrs/willreturn.ll
Commit eef4bdbb34de2dda657668c2ab39397e61e36a0a by arthur.j.odwyer
[libc++] Add a missing `<_Compare>` template argument.

Sometimes `_Compare` is an lvalue reference type, so letting it be
deduced is pretty much always wrong. (Well, less efficient than
it could be, anyway.)

Differential Revision: https://reviews.llvm.org/D93562
The file was modifiedlibcxx/include/algorithm
Commit 79f99ba65d96a35a79911daf1b67559dd52a684d by brad
[libcxx] Port to OpenBSD

Add initial OpenBSD support.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D94205
The file was modifiedlibcxx/include/CMakeLists.txt
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/include/__locale
The file was addedlibcxx/include/support/openbsd/xlocale.h
Commit 7ecad2e4ced180b4fdebc6b7bf6d26d83b454318 by nikita.ppv
[InstSimplify] Don't fold gep p, -p to null

This is a partial fix for https://bugs.llvm.org/show_bug.cgi?id=44403.
Folding gep p, q-p to q is only legal if p and q have the same
provenance. This fold should probably be guarded by something like
getUnderlyingObject(p) == getUnderlyingObject(q).

This patch is a partial fix that removes the special handling for
gep p, 0-p, which will fold to a null pointer, which would certainly
not pass an underlying object check (unless p is also null, in which
case this would fold trivially anyway). Folding to a null pointer
is particularly problematic due to the special handling it receives
in many places, making end-to-end miscompiles more likely.

Differential Revision: https://reviews.llvm.org/D93820
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/gep.ll
Commit bdd1ad5e5c57ae0f0bf899517c540ad8a679f01a by tianshilei1992
[OpenMP] Fixed include directories for OpenMP when building OpenMP with LLVM_ENABLE_RUNTIMES

Some LLVM headers are generated by CMake. Before the installation,
LLVM's headers are distributed everywhere, some of which are in
`${LLVM_SRC_ROOT}/llvm/include/llvm`, and some are in
`${LLVM_BINARY_ROOT}/include/llvm`. After intallation, they're all in
`${LLVM_INSTALLATION_ROOT}/include/llvm`.

OpenMP now depends on LLVM headers. Some headers depend on headers generated
by CMake. When building OpenMP along with LLVM, a.k.a via `LLVM_ENABLE_RUNTIMES`,
we need to tell OpenMP where it can find those headers, especially those still
have not been copied/installed.

Reviewed By: jdoerfert, jhuber6

Differential Revision: https://reviews.llvm.org/D94534
The file was modifiedopenmp/CMakeLists.txt
The file was modifiedopenmp/libomptarget/CMakeLists.txt
The file was modifiedopenmp/libomptarget/plugins/amdgpu/CMakeLists.txt
The file was modifiedopenmp/libomptarget/src/CMakeLists.txt
Commit 33e2494bea653a845cb0502cc6d3cecdf2b47750 by jonathanchesterfield
[libomptarget][amdgpu][nfc] Fix build on centos

[libomptarget][amdgpu][nfc] Fix build on centos

rtl.cpp replaced 224 with a #define from elf.h, but that
doesn't work on a centos 7 build machine with an old elf.h

Reviewed By: ronlieb

Differential Revision: https://reviews.llvm.org/D94528
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Commit e5f51fdd650c6d20c81fedb8e856e9858aa10991 by david.truby
[clang][aarch64] Precondition isHomogeneousAggregate on isCXX14Aggregate

MSVC on WoA64 includes isCXX14Aggregate in its definition. This is de-facto
specification on that platform, so match msvc's behaviour.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=47611

Co-authored-by: Peter Waller <peter.waller@arm.com>

Differential Revision: https://reviews.llvm.org/D92751
The file was modifiedclang/lib/CodeGen/MicrosoftCXXABI.cpp
The file was modifiedllvm/test/CodeGen/AArch64/arm64-windows-calls.ll
The file was modifiedclang/lib/CodeGen/CGCXXABI.h
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/test/CodeGenCXX/homogeneous-aggregates.cpp
Commit 6cd44b204c6c6f2e915270af6792f247c4c23abc by flo
[FunctionAttrs] Derive willreturn for fns with readonly` & `mustprogress`.

Similar to D94125, derive `willreturn` for functions that are `readonly` and
`mustprogress` in FunctionAttrs.

To quote the reasoning from D94125:

    Since D86233 we have `mustprogress` which, in combination with
    `readonly`, implies `willreturn`. The idea is that every side-effect
    has to be modeled as a "write". Consequently, `readonly` means there
    is no side-effect, and `mustprogress` guarantees that we cannot "loop"
    forever without side-effect.

Reviewed By: jdoerfert, nikic

Differential Revision: https://reviews.llvm.org/D94502
The file was modifiedllvm/test/Transforms/FunctionAttrs/willreturn.ll
The file was modifiedllvm/include/llvm/IR/Function.h
The file was modifiedllvm/lib/Transforms/IPO/FunctionAttrs.cpp
Commit e53bbd99516fc7b612df1ae08d48288d0b8784ea by zequanwu
[IR] move nomerge attribute from function declaration/definition to callsites

Move nomerge attribute from function declaration/definition to callsites to
allow virtual function calls attach the attribute.

Differential Revision: https://reviews.llvm.org/D94537
The file was modifiedclang/test/CodeGen/attr-nomerge.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/lib/CodeGen/CGCall.cpp
Commit 922a5b894114defb5302e514973de8c9cd23af6a by yitzhakm
[clang-tidy] Add test for Transformer-based checks with diagnostics.

Adds a test that checks the diagnostic output of the tidy.

Differential Revision: https://reviews.llvm.org/D94453
The file was modifiedclang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp
Commit d49974f9c98ebce5a679eced9f27add138b881fa by nikita.ppv
[InstCombine] Regenerate test checks (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-02-28-OrFCmpCrash.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-01-13-AndCmpCmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/2012-03-10-InstCombine.ll
The file was modifiedllvm/test/Transforms/InstCombine/2012-02-28-ICmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/2006-12-15-Range-Test.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-06-21-CompareMiscomp.ll
The file was modifiedllvm/test/Transforms/InstCombine/2007-03-13-CompareMerge.ll
The file was modifiedllvm/test/Transforms/InstCombine/range-check.ll
The file was modifiedllvm/test/Transforms/InstCombine/2007-11-15-CompareMiscomp.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-08-05-And.ll
Commit 9f61fbd75ae1757d77988b37562de4d6583579aa by listmail
[LV] Relax assumption that LCSSA implies single entry

This relates to the ongoing effort to support vectorization of multiple exit loops (see D93317).

The previous code assumed that LCSSA phis were always single entry before the vectorizer ran. This was correct, but only because the vectorizer allowed only a single exiting edge. There's nothing in the definition of LCSSA which requires single entry phis.

A common case where this comes up is with a loop with multiple exiting blocks which all reach a common exit block. (e.g. see the test updates)

Differential Revision: https://reviews.llvm.org/D93725
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/loop-form.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll
Commit f706486eaf07020b11f2088274c757e4070fe6d1 by sunil.srivastava
Fix for crash in __builtin_return_address in template context.

The check for argument value needs to be guarded by !isValueDependent().

Differential Revision: https://reviews.llvm.org/D94438
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/test/Sema/builtin-returnaddress.c
Commit fb063c933f0062db7fee622f7a43a6a5e560672d by nikita.ppv
[InstCombine] Duplicate tests for logical and/or (NFC)

This replicates existing and/or tests to also test variants using
select. This should help us get a more accurate view on which
optimizations we're missing if we disable the select -> and/or
fold.
The file was modifiedllvm/test/Transforms/InstCombine/or-fcmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/signed-truncation-check.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/range-check.ll
The file was modifiedllvm/test/Transforms/InstCombine/and-or-icmp-min-max.ll
The file was modifiedllvm/test/Transforms/InstCombine/result-of-usub-is-non-zero-and-no-overflow.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp-logical.ll
The file was modifiedllvm/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll
The file was modifiedllvm/test/Transforms/InstCombine/2012-02-28-ICmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/sign-test-and-or.ll
The file was modifiedllvm/test/Transforms/InstCombine/zext-or-icmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/and-fcmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/usub-overflow-known-by-implied-cond.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-01-13-AndCmpCmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstCombine/select-imm-canon.ll
The file was modifiedllvm/test/Transforms/InstCombine/dont-distribute-phi.ll
The file was modifiedllvm/test/Transforms/InstCombine/objsize-noverify.ll
The file was modifiedllvm/test/Transforms/InstCombine/logical-select-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstCombine/and.ll
The file was modifiedllvm/test/Transforms/InstCombine/onehot_merge.ll
The file was modifiedllvm/test/Transforms/InstCombine/umul-sign-check.ll
The file was modifiedllvm/test/Transforms/InstCombine/widenable-conditions.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-06-21-CompareMiscomp.ll
The file was modifiedllvm/test/Transforms/InstCombine/2012-03-10-InstCombine.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp-custom-dl.ll
The file was modifiedllvm/test/Transforms/InstCombine/logical-select.ll
The file was modifiedllvm/test/Transforms/InstCombine/select-ctlz-to-cttz.ll
The file was modifiedllvm/test/Transforms/InstCombine/set.ll
The file was modifiedllvm/test/Transforms/InstCombine/select-crash-noverify.ll
The file was modifiedllvm/test/Transforms/InstCombine/demorgan.ll
The file was modifiedllvm/test/Transforms/InstCombine/2006-12-15-Range-Test.ll
The file was modifiedllvm/test/Transforms/InstCombine/2007-03-13-CompareMerge.ll
The file was modifiedllvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll
The file was modifiedllvm/test/Transforms/InstCombine/ispow2.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-08-05-And.ll
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
The file was modifiedllvm/test/Transforms/InstCombine/and2.ll
The file was modifiedllvm/test/Transforms/InstCombine/prevent-cmp-merge.ll
The file was modifiedllvm/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll
The file was modifiedllvm/test/Transforms/InstCombine/fold-bin-operand.ll
The file was modifiedllvm/test/Transforms/InstCombine/2008-02-28-OrFCmpCrash.ll
The file was modifiedllvm/test/Transforms/InstCombine/freeze.ll
The file was modifiedllvm/test/Transforms/InstCombine/2007-11-15-CompareMiscomp.ll
The file was modifiedllvm/test/Transforms/InstCombine/and-or-icmps.ll
The file was modifiedllvm/test/Transforms/InstCombine/assume.ll
The file was modifiedllvm/test/Transforms/InstCombine/merge-icmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-clamp-with-select-of-constant-threshold-pattern.ll
The file was modifiedllvm/test/Transforms/InstCombine/bit-checks.ll
The file was modifiedllvm/test/Transforms/InstCombine/and-or-icmp-nullptr.ll
Commit caafdf07bbccbe89219539e2b56043c2a98358f1 by listmail
[LV] Weaken spuriously strong assert in LoopVersioning

LoopVectorize uses some utilities on LoopVersioning, but doesn't actually use it for, you know, versioning.  As a result, the precondition LoopVersioning expects is too strong for this user.  At the moment, LoopVectorize supports any loop with a unique exit block, so check the same precondition here.

Really, the whole class structure here is a mess.  We should separate the actual versioning from the metadata updates, but that's a bigger problem.
The file was modifiedllvm/lib/Transforms/Utils/LoopVersioning.cpp
Commit 46507a96fc13146f73e5915a008055c5a59191c2 by spatel
[SLP] reduce code duplication while matching reductions; NFC
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 554be30a42802d66807f93e4671a518c1c04e0f8 by spatel
[SLP] reduce code duplication in processing reductions; NFC
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 92fb5c49e8aa53ac97fa2fb1a891a4d7ccfd75c5 by spatel
[SLP] rename variable to improve readability; NFC

The OperationData in the 2nd block (visiting the operands)
is completely independent of the 1st block.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 9e7895a8682ce3ad98c006955d573d5f2fded4f6 by spatel
[SLP] reduce code duplication while processing reductions; NFC
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 7583ae48a3c37a78e57106e4feff6045aaa45584 by craig.topper
[RISCV] Add double test cases to vfmerge-rv32.ll. NFC
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmerge-rv32.ll
Commit e15f3ddcae65525176d1f152effb88cd3c6441a3 by nikita.ppv
[InstCombine] Add tests for logical and/or poison implication (NFC)

These tests cover some cases where we can fold select to and/or
based on poison implication logic.
The file was modifiedllvm/test/Transforms/InstCombine/select-and-or.ll
Commit 71ed4b6ce57d8843ef705af8f98305976a8f107a by selliott
[RISCV] Legalize select when Zbt extension available

The custom expansion of select operations in the RISC-V backend
interferes with the matching of cmov instructions. Legalizing
select when the Zbt extension is available solves that problem.

Reviewed By: lenary, craig.topper

Differential Revision: https://reviews.llvm.org/D93767
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbs.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoB.td
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbb.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbt.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbt.ll
Commit 23390e7a131a67fd70e26692fc83f62860dd1095 by nikita.ppv
[InstCombine] Handle logical and/or in assume optimization

assume(a && b) can be converted to assume(a); assume(b) even if
the condition is logical. Same for assume(!(a || b)).
The file was modifiedllvm/test/Transforms/InstCombine/assume.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Commit 7fd18508134112edb93852c16923a74bfff99cd2 by zinenko
[mlir] Update LLVM dialect type documentation

Recent commits reconfigured LLVM dialect types to use built-in types whenever
possible. Update the documentation accordingly.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D94485
The file was modifiedmlir/docs/Dialects/LLVM.md
Commit 2a49b7c64a33566cf5db1a5b4042d6037ccc7cf5 by modimo
[Inliner] Change inline remark format and update ReplayInlineAdvisor to use it

This change modifies the source location formatting from:
LineNumber.Discriminator
to:
LineNumber:ColumnNumber.Discriminator

The motivation here is to enhance location information for inline replay that currently exists for the SampleProfile inliner. This will be leveraged further in inline replay for the CGSCC inliner in the related diff.

The ReplayInlineAdvisor is also modified to read the new format and now takes into account the callee for greater accuracy.

Testing:
ninja check-llvm

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D94333
The file was modifiedclang/test/Frontend/optimization-remark-with-hotness-new-pm.c
The file was modifiedclang/test/Frontend/optimization-remark-with-hotness.c
The file was modifiedllvm/test/Transforms/SampleProfile/inline-replay.ll
The file was modifiedllvm/test/Transforms/SampleProfile/remarks.ll
The file was modifiedllvm/lib/Analysis/ReplayInlineAdvisor.cpp
The file was modifiedllvm/test/Transforms/SampleProfile/Inputs/inline-replay.txt
The file was modifiedllvm/include/llvm/Analysis/ReplayInlineAdvisor.h
The file was modifiedllvm/test/Transforms/SampleProfile/remarks-hotness.ll
The file was modifiedllvm/test/Transforms/Inline/optimization-remarks-passed-yaml.ll
The file was modifiedllvm/lib/Analysis/InlineAdvisor.cpp
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/include/llvm/Analysis/InlineAdvisor.h
Commit 68ff52ffead2ba25cca442778ab19286000daad7 by tianshilei1992
[OpenMP] Fixed the link error that cannot find static data member

Constant static data member can be defined in the class without another
define after the class in C++17. Although it is C++17, Clang can still handle it
even w/o the flag for C++17. Unluckily, GCC cannot handle that.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D94541
The file was modifiedopenmp/libomptarget/plugins/common/MemoryManager/MemoryManager.h
Commit d1fa7afc7aefd822698fe86431d8184b1e8b6683 by martin
[AArch64] [Windows] Properly add :lo12: reloc specifiers when generating assembly

This makes sure that assembly output actually can be assembled.

Set the correct MCExpr relocations specifier VK_PAGEOFF - and also
set VK_PAGE consistently even though it's not visible in the assembly
output.

Differential Revision: https://reviews.llvm.org/D94365
The file was modifiedllvm/lib/Target/AArch64/AArch64MCInstLower.cpp
The file was modifiedllvm/test/CodeGen/AArch64/win-tls.ll
The file was modifiedllvm/test/CodeGen/AArch64/win_cst_pool.ll
The file was modifiedllvm/test/CodeGen/AArch64/cfguard-checks.ll
The file was modifiedllvm/test/CodeGen/AArch64/windows-extern-weak.ll
The file was modifiedllvm/test/CodeGen/AArch64/dllimport.ll
The file was modifiedllvm/test/CodeGen/AArch64/mingw-refptr.ll
The file was modifiedllvm/test/CodeGen/AArch64/stack-protector-target.ll
Commit 02f1d28ed6b8f33445dae3beed8b6cc8dada4312 by martin
[libcxx] Avoid overflows in the windows __libcpp_steady_clock_now()

As freq.QuadValue can be in the range of 10000000 to 19200000,
the multiplication before division makes the calculation overflow
and wrap to negative values every 16-30 minutes.

Instead count the whole seconds separately before adding the
scaled fractional seconds.

Add a testcase for steady_clock to check that the values returned for
now() compare as bigger than the zero time origin; this
corresponds to a testcase in Qt [1] [2] (that failed spuriously
due to this).

[1] https://bugreports.qt.io/browse/QTBUG-89539
[2] https://code.qt.io/cgit/qt/qtbase.git/tree/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp?id=f8de5e54022b8b7471131b7ad55c83b69b2684c0#n569

Differential Revision: https://reviews.llvm.org/D93456
The file was modifiedlibcxx/test/std/utilities/time/time.clock/time.clock.steady/now.pass.cpp
The file was modifiedlibcxx/src/chrono.cpp
Commit 01f1273fe2f0c246f17162de24a8b6e11bad23a8 by tianshilei1992
[OpenMP] Fixed a typo in openmp/CMakeLists.txt
The file was modifiedopenmp/CMakeLists.txt
Commit 3d397091591fca4aa16153bba22f031218bee47d by Matthew.Arsenault
AMDGPU: Remove wrapper only call limitation

This seems to only have overridden cold handling, which we probably
shouldn't do. As far as I can tell the wrapper library functions are
still inlined as appropriate.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInline.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-inline.ll
Commit cf45731f0eaead79e1ac501b397e330df41ec152 by i
[Driver] Fix assertion failure when -fprofile-generate -fcs-profile-generate are used together

If conflicting `-fprofile-generate -fcs-profile-generate` are used together,
there is currently an assertion failure. Fix the failure.

Also add some driver tests.

Reviewed By: xur

Differential Revision: https://reviews.llvm.org/D94463
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedclang/test/Driver/fcs-profile-generate.c
Commit 55f2eeebc96e7522e49e19074cbfbe4e7f074b5b by mtrofin
[NFC] Disallow unused prefixes in MC/AMDGPU

1 out of 2 patches.

Differential Revision: https://reviews.llvm.org/D94553
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-args-v3.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_vopc.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-code-props-v3.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_sop.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-attrs-v3.s
The file was modifiedllvm/test/MC/AMDGPU/regression/bug28165.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_mubuf.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-attrs.s
The file was modifiedllvm/test/MC/AMDGPU/regression/bug28413.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_vop1.s
The file was modifiedllvm/test/MC/AMDGPU/regression/bug28168.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_vopc_e64.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-code-props.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_ds.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_vopc_sdwa.s
The file was modifiedllvm/test/MC/AMDGPU/flat-gfx10.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_dpp8.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_flat.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-debug-props.s
The file was modifiedllvm/test/MC/AMDGPU/ds.s
The file was modifiedllvm/test/MC/AMDGPU/buf-fmt-d16-unpacked.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_smem.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_dpp16.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-metadata-kernel-args.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_vop2.s
The file was modifiedllvm/test/MC/AMDGPU/flat-global.s
The file was modifiedllvm/test/MC/AMDGPU/regression/bug28538.s
The file was modifiedllvm/test/MC/AMDGPU/ds-gfx9.s
The file was modifiedllvm/test/MC/AMDGPU/buf-fmt-d16-packed.s
The file was modifiedllvm/test/MC/AMDGPU/gfx10_asm_vopcx.s
The file was modifiedllvm/test/MC/AMDGPU/hsa-wave-size.s
The file was modifiedllvm/test/MC/AMDGPU/add-sub-no-carry.s
The file was modifiedllvm/test/MC/AMDGPU/flat-scratch-instructions.s
Commit a7130d85e4b9e47b18a89eac3d47fd8c19d449c1 by n.james93
[ADT][NFC] Use empty base optimisation in BumpPtrAllocatorImpl

Most uses of this class just use the default MallocAllocator.
As this contains no fields, we can use the empty base optimisation for BumpPtrAllocatorImpl and save 8 bytes of padding for most use cases.

This prevents using a class that is marked as `final` as the `AllocatorT` template argument.
In one must use an allocator that has been marked as `final`, the simplest way around this is a proxy class.
The class should have all the methods that `AllocaterBase` expects and should forward the calls to your own allocator instance.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94439
The file was modifiedllvm/include/llvm/Support/Allocator.h
Commit 1730b0f66adaea6ed65d441dc2032013dd3c3664 by craig.topper
[RISCV] Remove '.mask' from vcompress intrinsic name. NFC

It has a mask argument, but isn't a masked instruction. It doesn't
use the mask policy of or the v0.t syntax.
The file was modifiedllvm/include/llvm/IR/IntrinsicsRISCV.td
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vcompress-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vcompress-rv32.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Commit 6166b91e83716fbe930b2dc4e2a2217c52ee31a7 by llvm
[ELF][NFCI] small cleanup to OutputSections.h

OutputSections.h used to close the lld::elf namespace only to
immediately open it again. This change merges both parts into
one.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D94538
The file was modifiedlld/ELF/OutputSections.h
Commit 175288a1afef2b6976455aab5ce51c66d28f8bca by hoy
Add sample-profile-suffix-elision-policy attribute with -funique-internal-linkage-names.

Adding sample-profile-suffix-elision-policy attribute to functions whose linkage names are uniquefied so that their unique name suffix won't be trimmed when applying AutoFDO profiles.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94455
The file was modifiedllvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp
The file was modifiedllvm/test/Transforms/UniqueInternalLinkageNames/unique-internal-linkage-names.ll
Commit ddcb0aae8b0dd87414105d264d1ee9eac9567476 by Jessica Paquette
[MIPatternMatch] Add matcher for G_PTR_ADD

Add a matcher which recognizes G_PTR_ADD and add a test.

Differential Revision: https://reviews.llvm.org/D94348
The file was modifiedllvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
Commit 8f5ec4593754a58a4feb835a9d44d59c655bd0d1 by julian.lettner
[Sanitizer][Darwin] Fix test for macOS 11+ point releases

This test wrongly asserted that the minor version is always 0 when
running on macOS 11 and above.
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/sanitizer_mac_test.cpp
Commit 585612355cdf836b434a5331b1263e961135a1ab by mtrofin
[NFC] Disallow unused prefixes under MC/AMDGPU

This patches remaining tests, and patches lit.local.cfg to block future
such cases (until we flip FileCheck's flag)

Differential Revision: https://reviews.llvm.org/D94556
The file was modifiedllvm/test/MC/AMDGPU/sopk.s
The file was modifiedllvm/test/MC/AMDGPU/lit.local.cfg
The file was modifiedllvm/test/MC/AMDGPU/sop1.s
The file was modifiedllvm/test/MC/AMDGPU/sop2.s
The file was modifiedllvm/test/MC/AMDGPU/vintrp-err.s
The file was modifiedllvm/test/MC/AMDGPU/smem.s
The file was modifiedllvm/test/MC/AMDGPU/isa-version-pal.s
The file was modifiedllvm/test/MC/AMDGPU/mubuf.s
The file was modifiedllvm/test/MC/AMDGPU/smrd.s
The file was modifiedllvm/test/MC/AMDGPU/xdl-insts-err.s
The file was modifiedllvm/test/MC/AMDGPU/sopk-err.s
The file was modifiedllvm/test/MC/AMDGPU/sopc.s
The file was modifiedllvm/test/MC/AMDGPU/vintrp.s
The file was modifiedllvm/test/MC/AMDGPU/sopp-err.s
The file was modifiedllvm/test/MC/AMDGPU/isa-version-hsa.s
The file was modifiedllvm/test/MC/AMDGPU/sopp.s
The file was modifiedllvm/test/MC/AMDGPU/reg-syntax-extra.s
The file was modifiedllvm/test/MC/AMDGPU/literal16.s
The file was modifiedllvm/test/MC/AMDGPU/vop_dpp.s
The file was modifiedllvm/test/MC/AMDGPU/sop1-err.s
The file was modifiedllvm/test/MC/AMDGPU/mtbuf.s
The file was modifiedllvm/test/MC/AMDGPU/out-of-range-registers.s
The file was modifiedllvm/test/MC/AMDGPU/vop1.s
The file was modifiedllvm/test/MC/AMDGPU/isa-version-unk.s
The file was modifiedllvm/test/MC/AMDGPU/vop_sdwa.s
The file was modifiedllvm/test/MC/AMDGPU/vop_dpp_expr.s
The file was modifiedllvm/test/MC/AMDGPU/mubuf-gfx9.s
The file was modifiedllvm/test/MC/AMDGPU/vop3-gfx9.s
The file was modifiedllvm/test/MC/AMDGPU/literals.s
The file was modifiedllvm/test/MC/AMDGPU/mtbuf-gfx10.s
The file was modifiedllvm/test/MC/AMDGPU/vop3-convert.s
Commit 0d88d7d82bc44b211a8187650a06c6cd3492186a by dblaikie
Delete unused function (was breaking the -Werror build)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
Commit 314e29ed2b78c69111635ecab94541b94c9e4c67 by Joseph.Nash
[AMDGPU] Add _e64 suffix to VOP3 Insts

Previously, instructions which could be
expressed as VOP3 in addition to another
encoding had a _e64 suffix on the tablegen
record name, while those
only available as VOP3 did not. With this
patch, all VOP3s will have the _e64 suffix.
The assembly does not change, only  the mir.

Reviewed By: foad

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

Change-Id: Ia8ec8890d47f8f94bbbdac43745b4e9dd2b03423
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-shl.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fmad.ftz.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-lshr.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/power-sched-no-instr-sunit.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-lshr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/sched-crash-dbg-value.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-agpr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/clamp-omod-special-case.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/fold_16bit_imm.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/subreg-split-live-in-error.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fmed3.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/v_swap_b32.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
The file was modifiedllvm/lib/Target/AMDGPU/VOP3Instructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ashr.s16.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/sched-handleMoveUp-subreg-def-across-subreg-def.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/regcoalesce-dbg.mir
The file was modifiedllvm/unittests/MI/LiveIntervalTest.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-umulh.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/fdiv-nofpexcept.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-build-spill.mir
The file was modifiedllvm/lib/Target/AMDGPU/VOP2Instructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fcanonicalize.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/stale-livevar-in-twoaddr-pass.mir
The file was modifiedllvm/lib/Target/AMDGPU/VOP3PInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-sext-inreg.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-smed3.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/debug-value-scheduler-crash.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.ldexp.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-mul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.struct.buffer.load.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/couldnt-join-subrange-3.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/regcoalescing-remove-partial-redundancy-assert.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fmed3.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-xor3.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/merge-load-store-vreg.mir
The file was modifiedllvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmad.s32.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-agpr-partially-undef.mir
The file was modifiedllvm/lib/Target/AMDGPU/SISchedule.td
The file was modifiedllvm/test/CodeGen/AMDGPU/regcoal-subrange-join-seg.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/coalescer-subregjoin-fullcopy.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm-gfx10.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-bswap.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s64.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/sdwa-peephole-instr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-and-or.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum-ieee.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-shuffle-vector.v2s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-atomic-insert-end.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum-ieee.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/sched-prefer-non-mfma.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/sched-assert-onlydbg-value-empty-region.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ashr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-smulh.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/sdwa-scalar-ops.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/coalescer-subranges-another-copymi-not-live.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fma.s32.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/coalescer-with-subregs-bad-identical.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-smed3.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/shrink-vop3-carry-out.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/s_add_co_pseudo_lowering.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.load.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/hazard-pass-ordering.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/smem-no-clause-coalesced.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-add.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fminnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/accvgpr-copy.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/sdwa-peephole-instr-gfx10.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-umed3.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/mai-hazards.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-umed3.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.fma.legacy.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmaxnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-sext.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/coalescer-subranges-another-prune-error.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-zext.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/regbank-reassign.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/inserted-wait-states.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/rename-independent-subregs.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/vcmpx-permlane-hazard.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-or3.mir
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/fold-vgpr-copy.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/sdwa-preserve.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fract.f64.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-shl.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/twoaddr-mad.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/schedule-barrier.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/fold-immediate-output-mods.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fshr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/pei-build-spill-partial-agpr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-pattern-add3.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/waitcnt.mir
Commit 04edcc02638bc70772baa50a74e582bb8e029872 by michaelrj
[libc] add isascii and toascii implementations

adding both at once since these are trivial functions.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D94558
The file was modifiedlibc/spec/posix.td
The file was addedlibc/src/ctype/toascii.h
The file was addedlibc/test/src/ctype/toascii_test.cpp
The file was addedlibc/src/ctype/toascii.cpp
The file was modifiedlibc/test/src/ctype/CMakeLists.txt
The file was modifiedlibc/spec/gnu_ext.td
The file was addedlibc/test/src/ctype/isascii_test.cpp
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was addedlibc/src/ctype/isascii.h
The file was addedlibc/src/ctype/isascii.cpp
The file was modifiedlibc/src/ctype/CMakeLists.txt
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
Commit 0c8466c0015eb8e4061b177e125e588b2138cc8a by sivachandra
[libc][NFC] Use more specific comparison macros in LdExpTest.h.
The file was modifiedlibc/test/src/math/LdExpTest.h
Commit 76643c48cdddfa220680f1ab4a83829bd83faa7a by aqjune
[LangRef] State that a nocapture pointer cannot be returned

This is a small patch stating that a nocapture pointer cannot be returned.

Discussed in D93189.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D94386
The file was modifiedllvm/docs/LangRef.rst
Commit 25eb7b08ba77a0b7c9c938490444bb8b5121233c by aqjune
[DAGCombiner] Fold BRCOND(FREEZE(COND)) to BRCOND(COND)

This patch resolves the suboptimal codegen described in http://llvm.org/pr47873 .
When CodeGenPrepare lowers select into a conditional branch, a freeze instruction is inserted.
It is then translated to `BRCOND(FREEZE(SETCC))` in SelDag.
The `FREEZE` in the middle of `SETCC` and `BRCOND` was causing a suboptimal code generation however.
This patch adds `BRCOND(FREEZE(cond))` -> `BRCOND(cond)` fold to DAGCombiner to remove the `FREEZE`.

To make this optimization sound, `BRCOND(UNDEF)` simply should nondeterministically jump to the branch or not, rather than raising UB.
It wasn't clear what happens when the condition was undef according to the comments in ISDOpcodes.h, however.
I updated the comments of `BRCOND` to make it explicit (as well as `BR_CC`, which is also a conditional branch instruction).

Note that it diverges from the semantics of `br` instruction in IR, which is explicitly UB.
Since the UB semantics was necessary to explain optimizations that use branching conditions, and SelDag doesn't seem to have such optimization, I think this divergence is okay.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D92015
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/select-prof-codegen.ll
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
Commit 82655c151450e0103a3aa60725639da607f9220c by jianzhouzh
[MSan] Tweak CopyOrigin

There could be some mis-alignments when copying origins not aligned.

I believe inaligned memcpy is rare so the cases do not matter too much
in practice.

1) About the change at line 50

Let dst be (void*)5,
then d=5, beg=4
so we need to write 3 (4+4-5) bytes from 5 to 7.

2) About the change around line 77.

Let dst be (void*)5,
because of lines 50-55, the bytes from 5-7 were already writen.
So the aligned copy is from 8.

Reviewed-by: eugenis
Differential Revision: https://reviews.llvm.org/D94552
The file was modifiedcompiler-rt/lib/msan/msan_poisoning.cpp
Commit 25b3921f2fcd8fb3241c2f79e488f25a6374b99f by thakis
[gn build] (manually) port 79f99ba65d96
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit c0f3ea8a08ca9a9ec473f6e9072ccf30dad5def8 by zhanghb97
[mlir][Python] Add checking process before create an AffineMap from a permutation.

An invalid permutation will trigger a C++ assertion when attempting to create an AffineMap from the permutation.
This patch adds an `isPermutation` function to check the given permutation before creating the AffineMap.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D94492
The file was modifiedmlir/lib/Bindings/Python/IRModules.cpp
The file was modifiedmlir/test/Bindings/Python/ir_affine_map.py
Commit 055644cc459eb204613ac788b73c51d5dab2fcbb by yuanke.luo
[X86][AMX] Prohibit pointer cast on load.

The load/store instruction will be transformed to amx intrinsics in the
pass of AMX type lowering. Prohibiting the pointer cast make that pass
happy.

Differential Revision: https://reviews.llvm.org/D94372
The file was addedllvm/test/Transforms/InstCombine/X86/x86-amx-load-store.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Commit 5c7dcd7aead7b33ba065b98ab3573278feb42228 by Yuanfang Chen
[Coroutine] Update promise object's final layout index

promise is a header field but it is not guaranteed that it would be the third
field of the frame due to `performOptimizedStructLayout`.

Reviewed By: lxfind

Differential Revision: https://reviews.llvm.org/D94137
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was addedllvm/test/Transforms/Coroutines/coro-spill-promise.ll
Commit 6529d7c5a45b1b9588e512013b02f891d71bc134 by rnk
[PDB] Defer relocating .debug$S until commit time and parallelize it

This is a pretty classic optimization. Instead of processing symbol
records and copying them to temporary storage, do a first pass to
measure how large the module symbol stream will be, and then copy the
data into place in the PDB file. This requires defering relocation until
much later, which accounts for most of the complexity in this patch.

This patch avoids copying the contents of all live .debug$S sections
into heap memory, which is worth about 20% of private memory usage when
making PDBs. However, this is not an unmitigated performance win,
because it can be faster to read dense, temporary, heap data than it is
to iterate symbol records in object file backed memory a second time.

Results on release chrome.dll:
peak mem: 5164.89MB -> 4072.19MB (-1,092.7MB, -21.2%)
wall-j1:  0m30.844s -> 0m32.094s (slightly slower)
wall-j3:  0m20.968s -> 0m20.312s (slightly faster)
wall-j8:  0m19.062s -> 0m17.672s (meaningfully faster)

I gathered similar numbers for a debug, component build of content.dll
in Chrome, and the performance impact of this change was in the noise.
The memory usage reduction was visible and similar.

Because of the new parallelism in the PDB commit phase, more cores makes
the new approach faster. I'm assuming that most C++ developer machines
these days are at least quad core, so I think this is a win.

Differential Revision: https://reviews.llvm.org/D94267
The file was modifiedllvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
The file was modifiedlld/COFF/Chunks.cpp
The file was modifiedlld/COFF/PDB.cpp
The file was modifiedlld/COFF/Chunks.h
The file was modifiedllvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
The file was modifiedllvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
Commit 6f0f0220380f83e8f3bf9832ffa795e9965fda2d by hansang.bae
[OpenMP] Update allocator trait key/value definitions

Use new definitions introduced in 5.1 specification.

Differential Revision: https://reviews.llvm.org/D94277
The file was modifiedopenmp/runtime/src/kmp.h
The file was modifiedopenmp/runtime/src/include/omp_lib.h.var
The file was modifiedopenmp/runtime/src/include/omp.h.var
The file was modifiedopenmp/runtime/src/kmp_alloc.cpp
The file was modifiedopenmp/runtime/src/include/omp_lib.f90.var
Commit acea470c167fc40990d9a0f06d625a34d8a4a146 by thakis
[gn build] Reorganize libcxx/include/BUILD.gn a bit

- Merge 6706342f48bea80 -- no more libcxx_needs_site_config, we now
  always need it
- Since it was always off in practice, write_config bitrot. Unbitrot
  it so that it works
- Remove copy step and let concat step write to final location
  immediately -- and fix copy destination directory

As a side effect, libcxx/include/BUILD.gn now has only a single
sources list, which means the cmake sync script should be able to
automatically sync additions and removals of .h files. On the flipside,
this means this file now must be updated after most changes to
libcxx/include/__config_site.in, and looking through the last few months
of changes this looks like it's going to be a wash.
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit 0066a09579ca90f60cb1947691e5a441f9f57a5d by smeenai
[libc++] Give extern templates default visibility on gcc

Contrary to the current visibility macro documentation, it appears that
gcc does handle visibility attribute on extern templates correctly, e.g.
https://godbolt.org/g/EejuV7. We need this so that extern template
instantiations of classes not marked _LIBCPP_TEMPLATE_VIS (e.g.
__vector_base_common) are correctly exported with gcc when building with
hidden visibility.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D35388
The file was modifiedlibcxx/docs/DesignDocs/VisibilityMacros.rst
The file was modifiedlibcxx/include/__config
Commit bba3a82b56c0874757f2c1423bbdff08e2a88967 by hansang.bae
[OpenMP] Use persistent memory for omp_large_cap_mem

This change enables volatile use of persistent memory for omp_large_cap_mem*
on supported systems. It depends on libmemkind's support for persistent memory,
and requirements/details can be found at the following url.

https://pmem.io/2020/01/20/memkind-dax-kmem.html

Differential Revision: https://reviews.llvm.org/D94353
The file was modifiedopenmp/runtime/src/kmp_alloc.cpp
Commit 914e2f5a02f4f896eec9a00f536d1118bf1d9961 by kai.wang
[NFC] Use generic name for scalable vector stack ID.

Differential Revision: https://reviews.llvm.org/D94471
The file was modifiedllvm/test/CodeGen/AArch64/framelayout-sve-scavengingslot.mir
The file was modifiedllvm/test/CodeGen/AArch64/live-debugvalues-sve.mir
The file was modifiedllvm/test/CodeGen/AArch64/framelayout-sve.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/framelayout-sve-basepointer.mir
The file was modifiedllvm/test/CodeGen/AArch64/sve-localstackalloc.mir
The file was modifiedllvm/include/llvm/CodeGen/TargetFrameLowering.h
The file was modifiedllvm/test/CodeGen/AArch64/framelayout-sve-calleesaves-fix.mir
The file was modifiedllvm/include/llvm/CodeGen/MIRYamlMapping.h
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/spillfill-sve.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/debug-info-sve-dbg-value.mir
The file was modifiedllvm/test/CodeGen/AArch64/debug-info-sve-dbg-declare.mir
The file was modifiedllvm/test/CodeGen/AArch64/sve-calling-convention-byref.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-alloca-stackid.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.h
Commit e5553b9a6ab9f02f382a31cc5117b52c3bfaf77a by Jonas Devlieghere
[dsymutil] Warn on timestmap mismatch between object file and debug map

Add a warning when the timestmap doesn't match between the object file
and the debug map entry. We were already emitting such warnings for
archive members and swift interface files. This patch also unifies the
warning across all three.

rdar://65614640

Differential revision: https://reviews.llvm.org/D94536
The file was modifiedllvm/tools/dsymutil/BinaryHolder.cpp
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.cpp
The file was modifiedllvm/test/tools/dsymutil/debug-map-parsing.test
The file was modifiedllvm/tools/dsymutil/BinaryHolder.h
The file was addedllvm/test/tools/dsymutil/Inputs/basic.macho.x86_64.o
The file was modifiedllvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
Commit cd8a80de96080da33d0a7d5d5821120ddcfc4ece by Lang Hames
[Orc] Add a unit test for asynchronous definition generation.
The file was modifiedllvm/lib/ExecutionEngine/Orc/Core.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Core.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
Commit f454c9f102a7f0df9d2802e30538192d4fe2f97a by serguei.katkov
[InlineSpiller] Re-tie operands if folding failed

InlineSpiller::foldMemoryOperand unties registers before an attempt to fold and
does not restore tied-ness in case of failure.

I do not have a particular test for demo of invalid behavior.
This is something of clean-up.
It is better to keep the behavior correct in case some time in future it happens.

Reviewers: reames, dantrushin
Reviewed By: dantrushin, reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D94389
The file was modifiedllvm/lib/CodeGen/InlineSpiller.cpp
Commit 8a47d875b071823455931bbc119ca1e455559176 by Jonas Devlieghere
[dsymutil] Copy eh_frame content into the dSYM companion file.

Copy over the __eh_frame from the binary into the dSYM. This helps
kernel developers that are working with only dSYMs (i.e. no binaries)
when debugging a core file. This only kicks in when the __eh_frame
exists in the linked binary. Most of the time ld64 will remove the
section in favor of compact unwind info. When it is emitted, it's
generally small enough and should not bloat the dSYM.

rdar://69774935

Differential revision: https://reviews.llvm.org/D94460
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/eh_frame/eh_frame.out
The file was modifiedllvm/tools/dsymutil/MachOUtils.cpp
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/eh_frame/eh_frame.o
The file was addedllvm/test/tools/dsymutil/X86/eh_frame.test
Commit 84e0b14a0a419f26d0a2f7389e06aa8e36569808 by jonathanchesterfield
[libomptarget][nvptx] Include omp_data.cu in bitcode deviceRTL

[libomptarget][nvptx] Include omp_data.cu in bitcode deviceRTL

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D94565
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Commit ad735badb69f389dd52e3ccef93694a0724e1293 by Jonas Devlieghere
[dsymutil] s/dwarfdump/llvm-dwarfdump/ in test
The file was modifiedllvm/test/tools/dsymutil/X86/eh_frame.test
Commit 35e4998f0c9a2f50567f5d2953db266c32fb1a25 by Jonas Devlieghere
[dsymutil] Fix spurious space in REQUIRES: line

This test is incorrectly running on non-darwin hosts.
The file was modifiedllvm/test/tools/dsymutil/X86/eh_frame.test
Commit 790c75c16373d37846c8433a69efd9b0d5e4ad12 by carl.ritson
[AMDGPU] Add SI_EARLY_TERMINATE_SCC0 for early terminating shader

Add pseudo instruction to allow early termination of pixel shader
anywhere based on the value of SCC.  The intention is to use this
when a mask of live lanes is updated, e.g. live lanes in WQM pass.
This facilitates early termination of shaders even when EXEC is
incomplete, e.g. in non-uniform control flow.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D88777
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertSkips.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was addedllvm/test/CodeGen/AMDGPU/early-term.mir
Commit 157efd84abf812c1689ba6a9ecb4da2b87dde756 by serguei.katkov
[Statepoint Lowering] Add an option to allow use gc values in regs for landing pad

Default value is not changed, so it is NFC actually.

The option allows to use gc values on registers in landing pads.

Reviewers: reames, dantrushin
Reviewed By: reames, dantrushin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D94469
The file was modifiedllvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
Commit fba9805ba3491db03ad538ea2db2f225f57ff98e by serguei.katkov
[Verifier] Extend statepoint verifier to cover more constants

Also old mir tests are updated to meet last changes in STATEPOINT format.

Reviewers: reames, dantrushin
Reviewed By: reames, dantrushin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D94482
The file was modifiedllvm/include/llvm/CodeGen/StackMaps.h
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
The file was modifiedllvm/lib/CodeGen/StackMaps.cpp
The file was modifiedllvm/test/CodeGen/X86/statepoint-fixup-call.mir
The file was modifiedllvm/test/CodeGen/X86/statepoint-fixup-copy-prop-neg.mir
The file was modifiedllvm/test/CodeGen/X86/non-value-mem-operand.mir
Commit 12fc9ca3a4037a26d4bc0ac98213c846ad96e51b by kazu
[llvm] Remove redundant string initialization (NFC)

Identified with readability-redundant-string-init.
The file was modifiedllvm/utils/TableGen/CodeGenInstruction.cpp
The file was modifiedllvm/utils/TableGen/CodeGenDAGPatterns.cpp
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/lib/Target/Mips/MipsRegisterBankInfo.h
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
The file was modifiedllvm/include/llvm/LTO/Config.h
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
The file was modifiedllvm/tools/llvm-objdump/MachODump.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/utils/TableGen/CodeGenMapTable.cpp
The file was modifiedllvm/lib/Analysis/ConstraintSystem.cpp
The file was modifiedllvm/lib/Analysis/CallPrinter.cpp
The file was modifiedllvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
The file was modifiedllvm/tools/llvm-ifs/llvm-ifs.cpp
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 2c2d489b78c43072b65f3d8c88c91def4c69f320 by kazu
[CodeGen] Remove unused function isRegLiveInExitBlocks (NFC)

The last use was removed on Jan 17, 2020 in commit
42350cd893a9cf6c199b17441dc2ba526c7cca71.
The file was modifiedllvm/include/llvm/CodeGen/MachineLoopUtils.h
The file was modifiedllvm/lib/CodeGen/MachineLoopUtils.cpp
Commit 8a20e2b3d3e149f9e40dc34673fce7953d985c24 by kazu
[llvm] Use Optional::getValueOr (NFC)
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/lib/Target/VE/VETargetMachine.cpp
The file was modifiedllvm/lib/Target/Lanai/LanaiTargetMachine.cpp
The file was modifiedllvm/lib/Target/XCore/XCoreTargetMachine.cpp
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/lib/Target/ARC/ARCTargetMachine.cpp
The file was modifiedllvm/lib/Analysis/InlineAdvisor.cpp
The file was modifiedllvm/lib/Target/CSKY/CSKYTargetMachine.cpp
The file was modifiedllvm/lib/Target/BPF/BPFTargetMachine.cpp
The file was modifiedllvm/lib/Target/Sparc/SparcTargetMachine.cpp
The file was modifiedllvm/lib/Target/AVR/AVRTargetMachine.cpp
The file was modifiedllvm/lib/Transforms/Utils/InlineFunction.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
Commit f1d5cbbdee5526bc86eac0a5652b115d9bc158e5 by Jonas Devlieghere
[dsymutil] Add preliminary support for DWARF 5.

Currently dsymutil will silently fail when processing binaries with
Dwarf 5 debug info. This patch adds rudimentary support for Dwarf 5 in
dsymutil.

- Recognize relocations in the debug_addr section.
- Recognize (a subset of) Dwarf 5 form values.
- Emits valid Dwarf 5 compile unit header chains.

To simplify things (and avoid having to emit indexed sections) I decided
to emit the relocated addresses directly in the debug info section.

- DW_FORM_strx gets relocated and rewritten to DW_FORM_strp
- DW_FORM_addrx gets relocated and rewritten to DW_FORM_addr

Obviously there's a lot of work left, but this should be a step in the
right direction.

rdar://62345491

Differential revision: https://reviews.llvm.org/D94323
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/dwarf5/dwarf5.o
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFStreamer.h
The file was addedllvm/test/tools/dsymutil/X86/dwarf5.test
The file was modifiedllvm/lib/DWARFLinker/DWARFStreamer.cpp
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.h
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/dwarf5/dwarf5.out
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFLinker.h
The file was modifiedllvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.cpp
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
Commit 0b99385e151c7cb674d6d29acfe92680f7148434 by jianzhouzh
[MSan] Partially revert some changes from D94552

Because of line 55, actually aligned_beg always equals to beg.
The file was modifiedcompiler-rt/lib/msan/msan_poisoning.cpp
Commit 8f8c207b8f2e69be652ef7afa30a92312bbb2bf0 by serguei.katkov
[Verifier] Add tied-ness verification to statepoint intsruction

Reviewers: reames, dantrushin
Reviewed By: reames, dantrushin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D94483
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
The file was addedllvm/test/MachineVerifier/verifier-statepoint.mir
Commit 3aeb30d1a68a76616c699587e07a7d8880c29d1c by david.green
[ARM] Additional tests for different interleaving patterns. NFC
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vqdmulh.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmovnstore.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-shuffleext.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vcvt.ll
Commit 141906fa149ffaa37bb5b65e9890ab1f0f3effd5 by grimar
[llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections.

Currently we don't support multiple SHT_SYMTAB_SHNDX sections
and the DT_SYMTAB_SHNDX tag currently.

This patch implements it and fixes the
https://bugs.llvm.org/show_bug.cgi?id=43991.

I had to introduce the `struct DataRegion` to ELF.h,
it is used to represent a region that might have no known size.
It is needed, because we don't know the size of the extended
section indices table when it is located via DT_SYMTAB_SHNDX.
In this case we still want to validate that we don't read
past the end of the file.

Differential revision: https://reviews.llvm.org/D92923
The file was modifiedllvm/test/Object/invalid.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/mips-plt.test
The file was modifiedllvm/unittests/Object/ELFTest.cpp
The file was addedllvm/test/tools/llvm-readobj/ELF/symtab-shndx.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/symbol-shndx.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/mips-got.test
The file was modifiedllvm/include/llvm/Object/ELF.h
The file was modifiedllvm/test/tools/llvm-readobj/ELF/section-symbols.test
The file was modifiedllvm/test/tools/yaml2obj/ELF/sht-symtab-shndx.yaml
The file was modifiedllvm/test/tools/obj2yaml/ELF/sht-symtab-shndx.yaml
Commit c29ca8551afff316976c2befcd65eeef53798499 by david.green
[ARM] Update isVMOVNOriginalMask to handle single input shuffle vectors

The isVMOVNOriginalMask was previously only checking for two input
shuffles that could be better expanded as vmovn nodes. This expands that
to single input shuffles that will later be legalized to multiple
vectors.

Differential Revision: https://reviews.llvm.org/D94189
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmovnstore.ll
Commit 6d3098e7ff968ad7d3033d7751af05a1fcd2ed9b by grimar
[obj2yaml,yaml2obj] - Refine how we set/dump the sh_entsize field.

This reuses the code from yaml2obj (moves it to ELFYAML.h).
With it we can set the `sh_entsize` in a single place in `obj2yaml`.

Note that it also fixes a bug of `yaml2obj`: we do not
set the `sh_entsize` field for the `SHT_ARM_EXIDX` section properly.

Differential revision: https://reviews.llvm.org/D93858
The file was modifiedllvm/test/tools/obj2yaml/ELF/sht-symtab-shndx.yaml
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
The file was modifiedllvm/test/Object/obj2yaml.test
The file was modifiedllvm/test/tools/obj2yaml/ELF/mips-abi-flags.yaml
The file was modifiedllvm/test/tools/yaml2obj/ELF/arm-exidx-section.yaml
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/test/tools/obj2yaml/ELF/call-graph-profile-section.yaml
The file was modifiedllvm/test/tools/obj2yaml/ELF/versym-section.yaml
Commit cbea6737d5130724c7c8cf8ee4ccf1c3dd099450 by andrzej.warzynski
[clang][driver] Restore the original help text for `-I`

The help text for `-I` was recently expanded in [1]. The expanded
version focuses on explaining the semantics of `-I` in Clang. We are now
in the process of adding support for `-I` in Flang and this new
description is incompatible with the semantics of `-I` in Flang. This
was brought up in this review:
  * https://reviews.llvm.org/D93453

This patch reverts the original change in Options.td. This way the help
text for `-I` remains generic enough so that it applies to both Clang
and Flang.

The expanded description of `-I` from [1] is moved to the
`DocBrief` field for `-I`. This field is prioritised over the help text
when generating ClangCommandLineReference.rst, so the user facing
documentation for Clang retains the expanded description:
  * https://clang.llvm.org/docs/ClangCommandLineReference.html
`DocBrief` fields are currently not used in Flang.

As requested in the reviews, the help text and the expanded description
are slightly refined.

[1] Commit: 8dd4e3ceb804a58bcf25e6856fc6fde5e1995a66

Differential Revision: https://reviews.llvm.org/D94169
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/docs/ClangCommandLineReference.rst
Commit f638c2eb4ee6d0a0bd0e80cd305ad93e382db8f5 by flo
[LTO] Replace anonymous namespace with static functions (NFC).

Only class declarations should be inside anonymous namespaces
(https://llvm.org/docs/CodingStandards.html#anonymous-namespaces)

Instead of using a anonymous namespace, just mark the functions in it as
static (some of them already were).

This simplifies the diff for D94486.
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
Commit 4cd48535eca06245c89a9158844bb177c6f8eb63 by david.sherwood
[NFC][InstructionCost] Use InstructionCost in Transforms/Scalar/RewriteStatepointsForGC.cpp

In places where we calculate costs using TTI.getXXXCost() interfaces
I have changed the code to use InstructionCost instead of unsigned.
The change is non functional since InstructionCost behaves in the
same way as an integer for valid costs. Currently the getXXXCost()
functions used in this file do not return invalid costs.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Differential revision: https://reviews.llvm.org/D94484
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Commit 3122c66aee7b709046753873c4e94db73742b3de by joe.ellis
[AArch64][SVE] Remove chains of unnecessary SVE reinterpret intrinsics

This commit extends SVEIntrinsicOpts::optimizeConvertFromSVBool to
identify and remove longer chains of redundant SVE reintepret
intrinsics. For example, the following chain of redundant SVE
reinterprets is now recognised as redundant:

    %a = <vscale x 2 x i1>
    %1 = <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool(<vscale x 2 x i1> %a)
    %2 = <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool(<vscale x 16 x i1> %1)
    %3 = <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool(<vscale x 4 x i1> %2)
    %4 = <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool(<vscale x 16 x i1> %3)
    %5 = <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool(<vscale x 4 x i1> %4)
    %6 = <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool(<vscale x 16 x i1> %5)
    ret <vscale x 2 x i1> %6

and will be replaced with:

    ret <vscale x 2 x i1> %a

Eliminating these can sometimes mean emitting fewer unnecessary
loads/stores when lowering to assembly.

Differential Revision: https://reviews.llvm.org/D94074
The file was modifiedllvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-intrinsic-opts-reinterpret.ll
Commit 0f59d099571d3d803b54e2ce06aa94babb9b26db by llvm-dev
[X86][AVX] combineVectorSignBitsTruncation - limit AVX512 truncations to 128-bits (PR48727)

rG73a44f437bf1 result in 256-bit packss/packus ops with additional shuffles that shuffle combining can sometimes try to convert back into a truncation.
The file was addedllvm/test/CodeGen/X86/pr48727.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-pack-256.ll
Commit ad85e3967067154a579f7989ce0e736f8cd56be9 by cullen.rhodes
[SVE] Add ISel pattern for addvl

Reviewed By: cameron.mcinally

Differential Revision: https://reviews.llvm.org/D94504
The file was modifiedllvm/test/CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll
The file was modifiedllvm/test/CodeGen/AArch64/split-vector-insert.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-pred-contiguous-ldst-addressing-mode-reg-imm.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-gep.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-intrinsics-loads-nf.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-pred-non-temporal-ldst-addressing-mode-reg-imm.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/sve-ld1-addressing-mode-reg-imm.ll
Commit 1854594b80b444dc21b830b51e53e05d38fc7d60 by matthew.malcomson
Hwasan InitPrctl check for error using internal_iserror

When adding this function in https://reviews.llvm.org/D68794 I did not
notice that internal_prctl has the API of the syscall to prctl rather
than the API of the glibc (posix) wrapper.

This means that the error return value is not necessarily -1 and that
errno is not set by the call.

For InitPrctl this means that the checks do not catch running on a
kernel *without* the required ABI (not caught since I only tested this
function correctly enables the ABI when it exists).
This commit updates the two calls which check for an error condition to
use `internal_iserror`.  That function sets a provided integer to an
equivalent errno value and returns a boolean to indicate success or not.

Tested by running on a kernel that has this ABI and on one that does
not.  Verified that running on the kernel without this ABI the current
code prints the provided error message and does not attempt to run the
program.  Verified that running on the kernel with this ABI the current
code does not print an error message and turns on the ABI.
All tests done on an AArch64 Linux machine.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D94425
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
Commit ceb9379a90f5a320d19f5694ef00b4d1164fa7d6 by n.james93
[ADT] Fix join_impl using the wrong size when calculating total length

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D83305
The file was modifiedllvm/include/llvm/ADT/StringExtras.h
Commit ada96fa62179d2addd6c85a02381f1353fe7a2d1 by flo
[LTO] Add test to ensure objc-arc-contract is executed.

This test adds additional test coverage for upcoming refactorings.
The file was addedllvm/test/LTO/X86/objc-arc-contract.ll
Commit af1bb4bc823f823df9869d354f639ee86b83d747 by n.james93
Fix build errors after ceb9379a9

For some reason some builds dont like the arrow operator access. using the deref then access should fix the issue.

/home/buildbots/ppc64le-flang-mlir-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/iterator.h:171:34: error: taking the address of a temporary object of type 'llvm::StringRef' [-Waddress-of-temporary]
  PointerT operator->() { return &static_cast<DerivedT *>(this)->operator*(); }
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildbots/ppc64le-flang-mlir-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/StringExtras.h:387:13: note: in instantiation of member function 'llvm::iterator_facade_base<llvm::mapped_iterator<mlir::tblgen::TypeParameter *, (lambda at /home/buildbots/ppc64le-flang-mlir-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:414:19), llvm::StringRef>, std::random_access_iterator_tag, llvm::StringRef, long, llvm::StringRef *, llvm::StringRef &>::operator->' requested here
    Len += I->size();
The file was modifiedllvm/include/llvm/ADT/StringExtras.h
Commit c6e341c89957db31432baffb72ee015f37d8c48d by dave
Revert "[dsymutil] Warn on timestmap mismatch between object file and debug map"

This reverts commit e5553b9a6ab9f02f382a31cc5117b52c3bfaf77a.

Tests are not allowed to modify the source. Please figure out a way to
use %t rather than dynamically modifying the inputs.
The file was modifiedllvm/test/tools/dsymutil/debug-map-parsing.test
The file was modifiedllvm/tools/dsymutil/BinaryHolder.cpp
The file was modifiedllvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
The file was removedllvm/test/tools/dsymutil/Inputs/basic.macho.x86_64.o
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.cpp
The file was modifiedllvm/tools/dsymutil/BinaryHolder.h
Commit 2170e0ee60db638175a8c57230d46fbaafa06d4c by kerry.mclaughlin
[SVE][CodeGen] CTLZ, CTTZ & CTPOP operations (predicates)

Canonicalise the following operations in getNode() for predicate types:
- CTLZ(Pred)  -> bitwise_NOT(Pred)
- CTTZ(Pred)  -> bitwise_NOT(Pred)
- CTPOP(Pred) -> Pred

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D94428
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-bit-counting-pred.ll
Commit f8cece18630575dccd62ba6a12f21acf5fd38c26 by markus.lavin
[ValueTracking] Fix one s/dyn_cast/dyn_cast_or_null/

Handle if Constant::getAggregateElement() returns nullptr in
canCreateUndefOrPoison().

Differential Revision: https://reviews.llvm.org/D94494
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/unittests/Analysis/ValueTrackingTest.cpp
Commit 704831fe1f1f02e41ab7440a6f6c2c390ec183b1 by thakis
Revert "Hwasan InitPrctl check for error using internal_iserror"

This reverts commit 1854594b80b444dc21b830b51e53e05d38fc7d60.
See https://reviews.llvm.org/D94425#2495621
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
Commit d307d892ade9384a5d8b40ddb6a9c0b2dffbdb81 by Dávid Bolvanský
[Tests] Added test for memcpy loop idiom recognization
The file was addedllvm/test/Transforms/LoopIdiom/memcpy.ll
Commit 0a0ee7f5a5af0f5dae65452f649ab665e787e7d6 by llvm-dev
[X86] canonicalizeShuffleMaskWithHorizOp - minor refactor to support multiple src ops. NFCI.

canonicalizeShuffleMaskWithHorizOp currently only supports shuffles with 1 or 2 sources, but PR41813 will require us to support higher numbers of sources.

This patch just generalizes the initial setup stages to ensure all src ops are the same type and opcode and then will continue to early out if we have more than 2 sources.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit ab577807165c45abfbadc117125ec7275cdcc0cf by gchatelet
[libc] Refresh benchmark progress bar when needed.
The file was modifiedlibc/benchmarks/LibcMemoryBenchmarkMain.cpp
Commit 7c77b536efdd953d6d97bffbd9ca320c517b26d7 by sven.vanhaastregt
[OpenCL] Improve OpenCL operator tests

Extend testing of increment/decrement operators and make sure these
operators are tested in only one dedicated test file.

Rename logical-ops.cl to operators.cl, as it was already containing
more than just logical operators.

Add testing for the remainder operator on floating point types.
The file was modifiedclang/test/SemaOpenCL/vector_inc_dec_ops.cl
The file was addedclang/test/SemaOpenCL/operators.cl
The file was modifiedclang/test/SemaOpenCL/invalid-vector-literals.cl
The file was removedclang/test/SemaOpenCL/logical-ops.cl
Commit b7b1e8c37a920fcf2755a99fbf78cc570cf76c60 by flo
[X86] Add tests for rv_marker lowering.

Precommit tests for D94597.
The file was addedllvm/test/CodeGen/X86/call-rv-marker.ll
Commit 3bc7555ffac0a803e44c4b1462e0c4c5eee865ea by antiagainst
[mlir][linalg] Use attributes in named ops' indexing maps

This commit adds support for parsing attribute uses in indexing
maps. These attribute uses are represented as affine symbols in
the resultant indexing maps because we can only know their
concrete value (which are coming from op attributes and are
constants) for specific op instances. The `indxing_maps()`
calls are synthesized to read these attributes and create affine
constants to replace the placeholder affine symbols and simplify.

Depends on D94240

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D94335
The file was modifiedmlir/test/mlir-linalg-ods-gen/test-linalg-ods-gen.tc
The file was modifiedmlir/docs/Dialects/Linalg.md
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
Commit 90164ba957a2532daef6515d7114af69eca025a7 by sam.mccall
[clangd] Split out a base class for delegating GlobalCompilationDatabases. NFC

This prepares for adding another delegatable method (blockUntilIdle) to GCDB.
The file was modifiedclang-tools-extra/clangd/GlobalCompilationDatabase.cpp
The file was modifiedclang-tools-extra/clangd/QueryDriverDatabase.cpp
The file was modifiedclang-tools-extra/clangd/GlobalCompilationDatabase.h
Commit dda60035e9f0769c8907cdf6561489e0435c2275 by nicholas.guy
[AArch64] Attempt to sink mul operands

Following on from D91255, this patch is responsible for sinking relevant mul
operands to the same block so that umull/smull instructions can be correctly
generated by the mul combine implemented in the aforementioned patch.

Differential revision: https://reviews.llvm.org/D91271
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was addedllvm/test/CodeGen/AArch64/aarch64-matrix-umull-smull.ll
Commit d55d592a921f1cd6a922bff0000f6662f8722d9c by Matthew.Arsenault
GlobalISel: Do not set observer of MachineIRBuilder in LegalizerHelper

This fixes double printing of insertion debug messages in the
legalizer.

Try to cleanup usage of observers. Currently the use of observers is
pretty hard to follow and it's not clear what is responsible for
them. Observers are referenced in 3 places:

1. In the MachineFunction
2. In the MachineIRBuilder
3. In the LegalizerHelper

The observers in the MachineFunction and MachineIRBuilder are both
called only on insertions, and are redundant with each other. The
source of the double printing was the same observer was added to both
the MachineFunction, and the MachineIRBuilder. One of these references
needs to be removed. Arguably observers in general should be fully
removed from one or the other, but it may be useful to have a local
observer in the MachineIRBuilder that is not added to the function's
observers. Alternatively, the wrapper observer could manage a local
observer in one place.

The LegalizerHelper only ever calls the observer on changing/changed
instructions, and never insertions. Logically these are two different
types of observers, for changes and for insertions.

Additionally, some places used the GISelObserverWrapper when they only
needed a single observer they could use directly.

Setting the observer in the LegalizerHelper constructor is not
flexible enough if the LegalizerHelper is constructed anywhere outside
the one used by the legalizer. AMDGPU calls the LegalizerHelper in
RegBankSelect, and needs to use a local observer to apply the regbank
to newly created instructions. Currently it accomplishes this by
constructing a local MachineIRBuilder. I'm trying to move the
MachineIRBuilder to be owned/maintained by the RegBankSelect pass
itself, but the locally constructed LegalizerHelper would reset the
observer.

Mips also has a special case use of the LegalizationArtifactCombiner
in applyMappingImpl; I think we do need to run the artifact combiner
during RegBankSelect, but in a more consistent way outside of
applyMappingImpl.
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
The file was modifiedllvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-ext-csedebug-output.mir
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
Commit 350c0552c66bf0ca6907b6aa8cede425dedde516 by kai.wang
[NFC][RISCV] Add double type in RISC-V V CodeGen test cases for RV32.

Differential Revision: https://reviews.llvm.org/D94584
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfdiv-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfsgnjx-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmin-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfredosum-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfrsub-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfwnmsac-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmsub-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfnmacc-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfwmacc-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmadd-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmul-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfwnmacc-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfnmadd-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfnmsub-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vslidedown-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfredmin-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfslide1up-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfsqrt-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfwmsac-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfadd-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vcompress-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfnmsac-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfsgnjn-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfredsum-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfsgnj-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfrdiv-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmsac-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmacc-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfredmax-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfsub-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vslideup-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfmax-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vfslide1down-rv32.ll
Commit 4e8e888905a4258932dcb593a5531a6329cc821a by muhammad.asif.manzoor
[AArch64][GlobalISel] Add support for FCONSTANT of FP128 type

Add support for G_FCONSTANT of FP128 (Quadruple precision) type.
It replaces the constant by emitting a load with a constant pool entry.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D94437
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/legalize-fp128-fconstant.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Commit 07b6aeb5685fa6474cbeae797ebc5ea1f17da0f7 by sbc
[lld][WebAssembly] Fix for TLS + --relocatable

When running in `-r/--relocatable` we output relocations but the
new TLS relocations type was missing from `ObjFile::calcNewAddend`
causing this combination of inputs/flags to crash the linker.

Also avoid creating tls variables in relocatable mode.  These variables
are only needed when linking final executables.

Fixes: https://github.com/emscripten-core/emscripten/issues/12934
Fixes: PR48506

Differential Revision: https://reviews.llvm.org/D93554
The file was modifiedlld/test/wasm/tls.s
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/test/wasm/tls-no-shared.s
The file was modifiedlld/wasm/Writer.cpp
Commit f0abe2aeaca76a24b1e17295ab797068c057a15d by Xiangling.Liao
[Frontend] Add pragma align natural and sort out pragma pack stack effect

- Implemente the natural align for XL on AIX
- Sort out pragma pack stack effect
- Add -fxl-pragma-stack option to enable XL on AIX pragma stack effect

Differential Revision: https://reviews.llvm.org/D87702
The file was modifiedclang/lib/Sema/SemaAttr.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/test/Layout/aix-double-struct-member.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Serialization/ASTWriter.cpp
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was addedclang/test/Driver/aix-pragma-pack.c
The file was addedclang/test/PCH/aix-pragma-pack.c
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/include/clang/Serialization/ASTReader.h
The file was modifiedclang/lib/Sema/Sema.cpp
The file was addedclang/test/Layout/aix-power-natural-interaction.cpp
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedclang/test/Sema/aix-pragma-pack-and-align.c
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/include/clang/Serialization/ASTWriter.h
The file was modifiedclang/lib/AST/RecordLayoutBuilder.cpp
The file was modifiedclang/lib/Parse/ParsePragma.cpp
Commit a957634942a48c963a8ed99b1bb90f7b985a3602 by jhuber6
[OpenMP] Add documentation for error messages and release notes

Add extra information to the runtime page describing the error messages and add information to the release notes for clang 12.0

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D94562
The file was modifiedopenmp/docs/design/Runtimes.rst
The file was modifiedopenmp/docs/ReleaseNotes.rst
Commit 4fe17ada55ade9b77e18521dae0985cb4a88f6c4 by nawrin.sultana
[OpenMP] Fix hierarchical barrier

Hierarchical barrier is an experimental barrier algorithm that uses aspects
of machine hierarchy to define the barrier tree structure. This patch fixes
offset calculation in hierarchical barrier. The offset is used to store info
on a flag about sleeping threads waiting on a location stored in the flag.
This commit also fixes a potential deadlock in hierarchical barrier when
using infinite blocktime by adjusting the offset value of leaf kids so that
it matches the value of leaf state. It also adds testing of default barriers
with infinite blocktime, and also tests hierarchical barrier algorithm with
both default and infinite blocktime.

Patch by Terry Wilmarth and Nawrin Sultana.

Differential Revision: https://reviews.llvm.org/D94241
The file was modifiedopenmp/runtime/src/kmp_barrier.cpp
The file was modifiedopenmp/runtime/test/barrier/omp_barrier.c
Commit 66d5994bd38a9be4a0c05de2b69f88b64e6845ce by sam.mccall
[clangd] Explicitly avoid background-indexing the same file twice.

This used to implicitly never happen due to only discovering each CDB
once.

We may want to carefully support reindexing one day, but we need to do
it carefully (tricky tradeoffs) and it would need further support in
background indexer.

Making this explicit here rather than just turning off rebroadcast in
background index for a few reasons:
- allows *new* files in the same CDB to be indexed
- relying on bugs-at-a-distance cancelling each other out is bound to bite us
- gets us closer to actually supporting reindexing, which requires similar tracking

Differential Revision: https://reviews.llvm.org/D94503
The file was modifiedclang-tools-extra/clangd/index/BackgroundQueue.cpp
The file was modifiedclang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.h
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
Commit 466acd694861138997d668a3f9cb29aa87bd316e by sam.mccall
[clangd] Avoid reallocating buffers for each message read:

- reuse std::string we read messages into
- when reading line-wise, use SmallVector<128> and read in chunks of 128
   (this affects headers, which are short, and tests, which don't matter)

Differential Revision: https://reviews.llvm.org/D93653
The file was modifiedclang-tools-extra/clangd/JSONTransport.cpp
Commit e433ca28ec923929efe4f6babb8d33b4e6673ac1 by spatel
[SLP] add reduction test for FMF; NFC
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/horizontal-list.ll
Commit 17863614da1efbe61e91c9f6f08ad80cdd257bb4 by nikita.ppv
[InstCombine] Fold select -> and/or using impliesPoison

We can fold a ? b : false to a & b if is_poison(b) implies that
is_poison(a), at which point we're able to reuse all the usual fold
on ands. In particular, this covers the very common case of
icmp X, C && icmp X, C'. The same applies to ors.

This currently only has an effect if the
-instcombine-unsafe-select-transform=0 option is set.

Differential Revision: https://reviews.llvm.org/D94550
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select-and-or.ll
Commit a4f386688239b06e09f28fd31f93bf761aa9c76f by usx
[clangd] Remove "decision-forest-base" experimental flag.

The value of this flag can only be fine tuned by using A/B testing on large
user base.
We do not expect individual users to use and fine tune this flag.

Differential Revision: https://reviews.llvm.org/D94513
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
Commit 0bbc6a6bb643af69baaf85f7f380dbcfe1f5ad54 by sam.mccall
[clangd] Remove some old CodeCompletion options that are never (un)set.  NFC
The file was modifiedclang-tools-extra/clangd/CodeComplete.cpp
The file was modifiedclang-tools-extra/clangd/CodeComplete.h
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
Commit 05b1a15f703c3e01f4123424700bc37188af8af1 by andrew.litteken
[IROutliner] Adapting to hoisted bitcasts in CodeExtractor

In commit 700d2417d8281ea56dfd7ac72d1a1473d03d2d59 the CodeExtractor
was updated so that bitcasts that have lifetime markers that beginning
outside of the region are deduplicated outside the region and are not
used as an output.  This caused a discrepancy in the IROutliner, where
in these cases there were arguments added to the aggregate function
that were not needed causing assertion errors.

The IROutliner queries the CodeExtractor twice to determine the inputs
and outputs, before and after `findAllocas` is called with the same
ValueSet for the outputs causing the duplication. This has been fixed
with a dummy ValueSet for the first call.

However, the additional bitcasts prevent us from using the same
similarity relationships that were previously defined by the
IR Similarity Analysis Pass. In these cases, we check whether the
initial version of the region being analyzed for outlining is still the
same as it was previously.  If it is not, i.e. because of the additional
bitcast instructions from the CodeExtractor, we discard the region.

Reviewers: yroux

Differential Revision: https://reviews.llvm.org/D94303
The file was addedllvm/test/Transforms/IROutliner/outlining-bitcasts.ll
The file was modifiedllvm/lib/Transforms/IPO/IROutliner.cpp
Commit 48d2068fb738302b9fba91c9bf8e4b051c3909eb by Jonas Devlieghere
[dsymutil] Warn on timestmap mismatch between object file and debug map

This re-lands e5553b9a6ab9 with two small fixes to the tests:

- Don't touch the source directory in debug-map-parsing.test but
   instead copy everything over in a temporary directory in
   timestamp-mismatch.test.
- Don't redirect stderr to stdout to avoid the output getting
   intertwined in extern-alias.test.
The file was modifiedllvm/tools/dsymutil/BinaryHolder.cpp
The file was modifiedllvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.cpp
The file was addedllvm/test/tools/dsymutil/X86/timestamp-mismatch.test
The file was modifiedllvm/tools/dsymutil/BinaryHolder.h
The file was modifiedllvm/test/tools/dsymutil/ARM/extern-alias.test
The file was modifiedllvm/test/tools/dsymutil/debug-map-parsing.test
Commit cbbfc8258615bc971a54c6287abe33c4215d2eac by llvm-dev
[X86][SSE] canonicalizeShuffleMaskWithHorizOp - simplify shuffle(HOP(HOP(X,Y),HOP(Z,W))) style chains.

See if we can remove the shuffle by resorting a HOP chain so that the HOP args are pre-shuffled.

This initial version just handles (the most common) v4i32/v4f32 hadd/hsub reduction patterns - future work can extend this to v8i16 types plus PACK chains (2f64 HADD/HSUB should already be handled in the half-lane combine code later on).
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/horizontal-sum.ll
Commit efb6e45d2be8e3e0843bdc4c2766e6910083c08e by llvm-dev
[X86][AVX] Add test for another 'reverse HADD' pattern mentioned in PR41813
The file was modifiedllvm/test/CodeGen/X86/haddsub-4.ll
Commit 993c488ed2b347011d9d71990af38a82aaf5bdf5 by llvm-dev
[DAG] visitVECTOR_SHUFFLE - use all_of to check for all-undef shuffle mask. NFCI.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 60fda8ebb6dc4e2ac1cc181c0ab8019c4309cb22 by samuel.tebbs
[ARM] Add a pass that re-arranges blocks when there is a backwards WLS branch

Blocks can be laid out such that a t2WhileLoopStart branches backwards. This is forbidden by the architecture and so it fails to be converted into a low-overhead loop. This new pass checks for these cases and moves the target block, fixing any fall-through that would then be broken.

Differential Revision: https://reviews.llvm.org/D92385
The file was modifiedllvm/lib/Target/ARM/ARMTargetMachine.cpp
The file was addedllvm/lib/Target/ARM/ARMBlockPlacement.cpp
The file was modifiedllvm/lib/Target/ARM/ARM.h
The file was modifiedllvm/lib/Target/ARM/CMakeLists.txt
The file was addedllvm/test/CodeGen/Thumb2/block-placement.mir
The file was modifiedllvm/test/CodeGen/ARM/O3-pipeline.ll
Commit 14f322f074b933af1e26bf6288b88ec2e7c3a551 by llvmgnsyncbot
[gn build] Port 60fda8ebb6d
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn
Commit a50bb84ec0c2d47a2a7403ad29842ca48cd6b828 by pklausler
[flang] Fix classification of shape inquiries in specification exprs

In some contexts, including the motivating case of determining whether
the expressions that define the shape of a variable are "constant expressions"
in the sense of the Fortran standard, expression rewriting via Fold()
is not necessary, and should not be required.  The inquiry intrinsics LBOUND,
UBOUND, and SIZE work correctly now in specification expressions and are
classified correctly as being constant expressions (or not).  Getting this right
led to a fair amount of API clean-up as a consequence, including the
folding of shapes and TypeAndShape objects, and new APIs for shapes
that do not fold for those cases where folding isn't needed.  Further,
the symbol-testing predicate APIs in Evaluate/tools.h now all resolve any
associations of their symbols and work transparently on use-, host-, and
construct-association symbols; the tools used to resolve those associations have
been defined and documented more precisely, and their clients adjusted as needed.

Differential Revision: https://reviews.llvm.org/D94561
The file was modifiedflang/lib/Semantics/tools.cpp
The file was modifiedflang/include/flang/Evaluate/shape.h
The file was modifiedflang/include/flang/Evaluate/type.h
The file was modifiedflang/lib/Evaluate/fold.cpp
The file was modifiedflang/lib/Semantics/semantics.cpp
The file was modifiedflang/test/Semantics/resolve44.f90
The file was modifiedflang/lib/Semantics/check-declarations.cpp
The file was modifiedflang/lib/Evaluate/characteristics.cpp
The file was modifiedflang/lib/Semantics/check-do-forall.cpp
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/test/Semantics/shape.f90
The file was modifiedflang/lib/Evaluate/shape.cpp
The file was modifiedflang/include/flang/Evaluate/fold.h
The file was modifiedflang/lib/Evaluate/check-expression.cpp
The file was modifiedflang/test/Semantics/data04.f90
The file was modifiedflang/include/flang/Evaluate/characteristics.h
The file was modifiedflang/lib/Evaluate/tools.cpp
The file was modifiedflang/include/flang/Semantics/tools.h
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was modifiedflang/lib/Semantics/check-call.cpp
The file was modifiedflang/include/flang/Evaluate/tools.h
Commit a2e6506c47b1ab8cb085aa485fd0abf980a47a05 by kparzysz
[Hexagon] Improve legalizing of ISD::SETCC result
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
Commit 123674a816742254debdfcc978026b8107b502d8 by spatel
[SLP] simplify type check for reductions

This is NFC-intended. The 'valid' call allows int/FP/pointers
for other parts of SLP. The difference here is that we can't
reduce pointers.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 166e5c335cbe9f8144a7822ca655dc3352ec9e56 by pklausler
[flang] Do not create HostAssoc symbols in derived type scopes

When needed due to a specification expression in a derived type,
the host association symbols should be created in the surrounding
subprogram's scope instead.

Differential Revision: https://reviews.llvm.org/D94567
The file was modifiedflang/lib/Semantics/resolve-names.cpp
Commit b3154d11bc6dee59e581b731b7561f1ebab3aed6 by wlei
[CSSPGO][llvm-profgen] Pseudo probe decoding and disassembling

This change implements pseudo probe decoding and disassembling for llvm-profgen/CSSPGO. Please see https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s and https://reviews.llvm.org/D89707 for more context about CSSPGO and llvm-profgen.

**ELF section format**
Please see the encoding patch(https://reviews.llvm.org/D91878) for more details of the format, just copy the example here:

Two section(`.pseudo_probe_desc` and  `.pseudoprobe` ) is emitted in ELF to support pseudo probe.
The format of `.pseudo_probe_desc` section looks like:

```
.section   .pseudo_probe_desc,"",@progbits
.quad   6309742469962978389  // Func GUID
.quad   4294967295           // Func Hash
.byte   9                    // Length of func name
.ascii  "_Z5funcAi"          // Func name
.quad   7102633082150537521
.quad   138828622701
.byte   12
.ascii  "_Z8funcLeafi"
.quad   446061515086924981
.quad   4294967295
.byte   9
.ascii  "_Z5funcBi"
.quad   -2016976694713209516
.quad   72617220756
.byte   7
.ascii  "_Z3fibi"
```

For each `.pseudoprobe` section, the encoded binary data consists of a single function record corresponding to an outlined function (i.e, a function with a code entry in the `.text` section). A function record has the following format :

```
FUNCTION BODY (one for each outlined function present in the text section)
    GUID (uint64)
        GUID of the function
    NPROBES (ULEB128)
        Number of probes originating from this function.
    NUM_INLINED_FUNCTIONS (ULEB128)
        Number of callees inlined into this function, aka number of
        first-level inlinees
    PROBE RECORDS
        A list of NPROBES entries. Each entry contains:
          INDEX (ULEB128)
          TYPE (uint4)
            0 - block probe, 1 - indirect call, 2 - direct call
          ATTRIBUTE (uint3)
            reserved
          ADDRESS_TYPE (uint1)
            0 - code address, 1 - address delta
          CODE_ADDRESS (uint64 or ULEB128)
            code address or address delta, depending on ADDRESS_TYPE
    INLINED FUNCTION RECORDS
        A list of NUM_INLINED_FUNCTIONS entries describing each of the inlined
        callees.  Each record contains:
          INLINE SITE
            GUID of the inlinee (uint64)
            ID of the callsite probe (ULEB128)
          FUNCTION BODY
            A FUNCTION BODY entry describing the inlined function.
```

**Disassembling**
A switch `--show-pseudo-probe` is added to use along with `--show-disassembly` to print disassembly code with pseudo probe directives.

For example:
```
00000000002011a0 <foo2>:
  2011a0: 50                    push   rax
  2011a1: 85 ff                 test   edi,edi
  [Probe]:  FUNC: foo2  Index: 1  Type: Block
  2011a3: 74 02                 je     2011a7 <foo2+0x7>
  [Probe]:  FUNC: foo2  Index: 3  Type: Block
  [Probe]:  FUNC: foo2  Index: 4  Type: Block
  [Probe]:  FUNC: foo   Index: 1  Type: Block  Inlined: @ foo2:6
  2011a5: 58                    pop    rax
  2011a6: c3                    ret
  [Probe]:  FUNC: foo2  Index: 2  Type: Block
  2011a7: bf 01 00 00 00        mov    edi,0x1
  [Probe]:  FUNC: foo2  Index: 5  Type: IndirectCall
  2011ac: ff d6                 call   rsi
  [Probe]:  FUNC: foo2  Index: 4  Type: Block
  2011ae: 58                    pop    rax
  2011af: c3                    ret
```

**Implementation**
- `PseudoProbeDecoder` is added in ProfiledBinary as an infra for the decoding. It decoded the two section and generate two map: `GUIDProbeFunctionMap` stores all the `PseudoProbeFunction` which is the abstraction of a general function. `AddressProbesMap` stores all the pseudo probe info indexed by its address.
- All the inline info is encoded into binary as a trie(`PseudoProbeInlineTree`) and will be constructed from the decoding. Each pseudo probe can get its inline context(`getInlineContext`) by traversing its inline tree node backwards.

Test Plan:
ninja & ninja check-llvm

Differential Revision: https://reviews.llvm.org/D92334
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin
The file was addedllvm/tools/llvm-profgen/PseudoProbe.cpp
The file was modifiedllvm/tools/llvm-profgen/CMakeLists.txt
The file was addedllvm/test/tools/llvm-profgen/pseudoprobe-decoding.test
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h
The file was addedllvm/tools/llvm-profgen/PseudoProbe.h
Commit 414930b91bfd4196c457120932a1dbaf26db711d by wlei
[CSSPGO][llvm-profgen] Refactor to unify hashable interface for trace sample and context-sensitive counter

As we plan to support both CSSPGO and AutoFDO for llvm-profgen, we will have different kinds of perf sample and different kinds of sample counter(cs/non-cs, with/without pseudo probe) which both need to do aggregation in hash map.  This change implements the hashable interface(`Hashable`) and the unified base class for them to have better extensibility and reusability.

Currently perf trace sample and sample counter with context implemented this `Hashable` and  the class hierarchy is like:

```
| Hashable
           | PerfSample
                          | HybridSample
                          | LBRSample
           | ContextKey
                          | StringBasedCtxKey
                          | ProbeBasedCtxKey
                          | CallsiteBasedCtxKey
           | ...
```

- Class specifying `Hashable` should implement `getHashCode` and `isEqual`. Here we make `getHashCode` a non-virtual function to avoid vtable overhead, so derived class should calculate and assign the base class's HashCode manually. This also provides the flexibility for calculating the hash code incrementally(like rolling hash) during frame stack unwinding
- `isEqual` is a virtual function, which will have perf overhead. In the future, if we redesign a better hash function, then we can just skip this or switch to non-virtual function.
- Added `PerfSample` and `ContextKey` as base class for perf sample and counter context key, leveraging llvm-style RTTI for this.
- Added `StringBasedCtxKey` class extending  `ContextKey` to use string as context id.
- Refactor `AggregationCounter` to take all kinds of `PerfSample` as key
- Refactor `ContextSampleCounter` to take all kinds of `ContextKey` as key
- Other refactoring work:
- Create a wrapper class `SampleCounter` to wrap `RangeCounter` and `BranchCounter`
- Hoist `ContextId` and `FunctionProfile` out of `populateFunctionBodySamples` and `populateFunctionBoundarySamples` to reuse them in ProfileGenerator

Differential Revision: https://reviews.llvm.org/D92584
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.h
Commit c681400b25a66ae56b74cc1f11ffdc15190a65b8 by wlei
[CSSPGO][llvm-profgen] Virtual unwinding with pseudo probe

This change extends virtual unwinder to support pseudo probe in llvm-profgen. Please refer https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s and https://reviews.llvm.org/D89707 for more context about CSSPGO and llvm-profgen.

**Implementation**

- Added `ProbeBasedCtxKey` derived from `ContextKey` for sample counter aggregation. As we need string splitting to infer the profile for callee function, string based context introduces more string handling overhead, here we just use probe pointer based context.
- For linear unwinding, as inline context is encoded in each pseudo probe, we don't need to go through each instruction to extract range sharing same inliner. So just record the range for the context.
- For probe based context, we should ignore the top frame probe since it will be extracted from the address range. we defer the extraction in `ProfileGeneration`.
- Added `PseudoProbeProfileGenerator` for pseudo probe based profile generation.
- Some helper function to get pseduo probe info(call probe, inline context) from profiled binary.
- Added regression test for unwinder's output

The pseudo probe based profile generation will be in the upcoming patch.

Test Plan:

ninja & ninja check-llvm

Differential Revision: https://reviews.llvm.org/D92896
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/noinline-cs-noprobe.perfscript
The file was addedllvm/test/tools/llvm-profgen/Inputs/noinline-cs-pseudoprobe.perfscript
The file was modifiedllvm/tools/llvm-profgen/PseudoProbe.cpp
The file was modifiedllvm/tools/llvm-profgen/PseudoProbe.h
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfscript
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.h
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/inline-cs-noprobe.perfscript
The file was addedllvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
The file was addedllvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
The file was addedllvm/test/tools/llvm-profgen/Inputs/noinline-cs-pseudoprobe.perfbin
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
Commit 33a8466531e68698dc735a0a8dcb97eb41b35ba6 by wlei
[NFC] fix missing SectionName declaration
The file was modifiedllvm/tools/llvm-profgen/PseudoProbe.h
Commit 3bd620d4504915615b8368b20eb9e5c34f3fb779 by tpopp
[mlir] Correct 2 places that result in corrupted conversion rollbacks

This corrects the last 2 issues caught by tests when causing dialect
conversion rollbacks to occur.

Differential Revision: https://reviews.llvm.org/D94623
The file was modifiedmlir/lib/Transforms/Utils/DialectConversion.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Commit e7a371f9fd0076c187f4cd1a9c7546867faeb19b by alexandre.ganea
[LLD][COFF] Avoid std::vector resizes during type merging

Consistently saves approx. 0.6 sec (out of 18 sec) on a large output (400 MB EXE, 2 GB PDB).

Differential Revision: https://reviews.llvm.org/D94555
The file was modifiedlld/COFF/DebugTypes.cpp
Commit bb72adcaee7db0877e1cecb29d414003bf19ce02 by jeroen.dobbelaere
[NFC] Use correct ssa.copy spelling when referring to the intrinsic

Split out from D91250. Fixes wrong ssa_copy naming.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D94310
The file was modifiedllvm/docs/LangRef.rst
Commit f4f158b2f89e16ee7068d6292d2d46457d6932bb by ajcbik
[mlir][sparse] add vectorization strategies to sparse compiler

Similar to the parallelization strategies, the vectorization strategies
provide control on what loops should be vectorize. Unlike the parallel
strategies, only innermost loops are considered, but including reductions,
with the control of vectorizing dense loops only or dense and sparse loops.

The vectorized loops are always controlled by a vector mask to avoid
overrunning the iterations, but subsequent vector operation folding removes
redundant masks and replaces the operations with more efficient counterparts.
Similarly, we will rely on subsequent loop optimizations to further optimize
masking, e.g. using an unconditional full vector loop and scalar cleanup loop.

The current strategy already demonstrates a nice interaction between the
sparse compiler and all prior optimizations that went into the vector dialect.

Ongoing discussion at:
https://llvm.discourse.group/t/mlir-support-for-sparse-tensors/2020/10

Reviewed By: penpornk

Differential Revision: https://reviews.llvm.org/D94551
The file was modifiedmlir/test/lib/Transforms/TestSparsification.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was addedmlir/test/Dialect/Linalg/sparse_vector.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
Commit 01c3135850d15c8dce9374eec26dc2d555a87b7f by flo
[LTO] Add test for freestanding LTO option.

This patch adds a test for the -lto-freestanding option, similar to
llvm/test/ThinLTO/X86/tli-nobuiltin.ll.
The file was addedllvm/test/LTO/X86/tli-nobuiltin.ll
Commit 18278ff1aac47d9bffa0231c74277ffc89def13e by tkeith
[flang] Fix accessibility of USEd name in .mod file

If a module specifies default private accessibility, names that have
been use-associated are private by default. This was not reflected in
.mod files.

Differential Revision: https://reviews.llvm.org/D94602
The file was modifiedflang/test/Semantics/modfile03.f90
The file was modifiedflang/lib/Semantics/mod-file.cpp
Commit 4cfccd51335139871cad03ac451a2d27ebfe7761 by michaelrj
[libc][NFC] add macro for fuchsia to switch test backend to zxtest

This moves utils/UnitTest/Test.[h/cpp] to LibcTest.[h/cpp] and adds a
new Test.h that acts as a switcher so that Fuchsia can use the zxtest
backend for running our tests as part of their build.

FuchsiaTest.h is for including fuchsia's zxtest library and anything
else needed to make the tests work under fuchsia (currently just
undefining the isascii macro for the test).

Downstream users, please fix your build instead of reverting.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D94625
The file was addedlibc/utils/UnitTest/LibcTest.cpp
The file was removedlibc/utils/UnitTest/Test.cpp
The file was addedlibc/utils/UnitTest/LibcTest.h
The file was modifiedlibc/utils/UnitTest/CMakeLists.txt
The file was modifiedlibc/utils/UnitTest/Test.h
The file was addedlibc/utils/UnitTest/FuchsiaTest.h
Commit fb98a1be43645c87fff089c4cc9555ca2400268c by kazu
Fix the warnings on unused variables (NFC)
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedclang-tools-extra/clangd/AST.cpp
Commit f711cb9a8ad9fe80dd9f1844dbe15c0e7edb1450 by nikita.ppv
[FuncAttrs] Add additional willreturn tests (NFC)
The file was modifiedllvm/test/Transforms/FunctionAttrs/willreturn.ll
Commit 6077d55381a6aa3e947ef7abdc36a7515c598c8a by flo
[DSE] Add tests with stores of existing values.

This patch pre-commits test cases with dead stores of
existing values for D90328. It also updates a few tests that had such
stores by accident, to preserve the original spirit of those tests.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loops.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memoryphis.ll
The file was addedllvm/test/Transforms/DeadStoreElimination/MSSA/stores-of-existing-values.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-simple.ll
Commit ea8034ec35a9e3d6784d7e6f50617af3d87f6a9f by michaelrj
[libc][NFC] change isblank and iscntrl from implicit casting

isblank and iscntrl were casting an int to a char implicitly and this
was throwing errors under Fuchsia. I've added a static cast to resolve
this issue.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D94634
The file was modifiedlibc/src/ctype/isblank.cpp
The file was modifiedlibc/src/ctype/iscntrl.cpp
Commit 74a42aedfe14938e01d128456c76cede2ccbc26c by i
[test] Add Clang side tests for -fdebug-info-for-profiling

There is currently a driver test but no test for its effect on linkageName & pass pipeline.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94381
The file was addedclang/test/CodeGenCXX/fdebug-info-for-profiling.cpp
Commit 35debdfcaca10203a67ef3821d272a72d70e0490 by wlei
[NFC] Fix build break by a initializer list converting error
The file was modifiedllvm/tools/llvm-profgen/PseudoProbe.cpp
Commit 82c4153e66fa284729da86a8d6c302d4b8cec86c by jiancai
Revert "[AsmParser] make .ascii support spaces as separators"

This reverts commit e0963ae274be5b071d1e1b00f5e4e019483c09e9. The change
breaks some GDB tests. Revert it while we investigate.
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
The file was modifiedllvm/test/MC/AsmParser/directive_ascii.s
Commit 39e6d242378a0b645abbdfc6c02de5ef8dcfb9ed by aeubanks
[NewPM] Only non-trivially loop unswitch at -O3 and for non-optsize functions

This matches the legacy pipeline/pass.

Reviewed By: asbirlea, SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D94559
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
The file was modifiedllvm/test/Transforms/SimpleLoopUnswitch/ARM/nontrivial-unswitch-cost.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/SimpleLoopUnswitch/pipeline.ll
Commit 7ec8f43659861be42f9d600422678196849b6e90 by craig.topper
[SPARC] Fix fp128 load/stores

The generated code for the split fp128 load/stores was missing a small yet important adjustment to the pointer metadata being fed into `getStore` and `getLoad`, making it out of sync with the effective memory address.
This problem often resulted in instructions being scheduled in the wrong order.

I also took this chance to clean up some "wrong" uses of `getAlignment` as done in D77687.

Thanks @jrtc27 for finding the problem and providing a patch.

Patch by LemonBoy and Jessica Clarke(jrtc27)

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D94345
The file was addedllvm/test/CodeGen/SPARC/fp128-split.ll
The file was modifiedllvm/lib/Target/Sparc/SparcISelLowering.cpp
Commit 854f0984f0b7ab9a9a541a4bcda7ea173e4113d3 by dblaikie
Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable

Current code breaks this version of MSVC due to a mismatch between `std::is_trivially_copyable` and `llvm::is_trivially_copyable` for `std::pair` instantiations.  Hence I was attempting to use `std::is_trivially_copyable` to set `llvm::is_trivially_copyable<T>::value`.

I spent some time root causing an `llvm::Optional` build error on MSVC 16.8.3 related to the change described above:

```
62>C:\src\ocg_llvm\llvm-project\llvm\include\llvm/ADT/BreadthFirstIterator.h(96,12): error C2280: 'llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>>::operator =(const llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &)': attempting to reference a deleted function (compiling source file C:\src\ocg_llvm\llvm-project\llvm\unittests\ADT\BreadthFirstIteratorTest.cpp)
...
```
The "trivial" specialization of `optional_detail::OptionalStorage` assumes that the value type is trivially copy constructible and trivially copy assignable. The specialization is invoked based on a check of `is_trivially_copyable` alone, which does not imply both `is_trivially_copy_assignable` and `is_trivially_copy_constructible` are true.

[[ https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable | According to the spec ]], a deleted assignment operator does not make `is_trivially_copyable` false. So I think all these properties need to be checked explicitly in order to specialize `OptionalStorage` to the "trivial" version:
```
/// Storage for any type.
template <typename T, bool = std::is_trivially_copy_constructible<T>::value
                          && std::is_trivially_copy_assignable<T>::value>
class OptionalStorage {
```
Above fixed my build break in MSVC, but I think we need to explicitly check `is_trivially_copy_constructible` too since it might be possible the copy constructor is deleted.  Also would be ideal to move over to `std::is_trivially_copyable` instead of the `llvm` namespace verson.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D93510
The file was modifiedllvm/include/llvm/ADT/Optional.h
The file was modifiedllvm/unittests/ADT/OptionalTest.cpp
Commit 86341247c4a2ffa4328945b03e7a05b1c51c3889 by wmi
[NFC] Rename ThinLTOPhase to ThinOrFullLTOPhase and move it from PassBuilder.h
to Pass.h.

In some compiler passes like SampleProfileLoaderPass, we want to know which
LTO/ThinLTO phase the pass is in. Currently the phase is represented in enum
class PassBuilder::ThinLTOPhase, so it is only available in PassBuilder and
it also cannot represent phase in full LTO. The patch extends it to include
full LTO phases and move it from PassBuilder.h to Pass.h, then it is much
easier for PassBuilder to communiate with each pass about current LTO phase.

Differential Revision: https://reviews.llvm.org/D94613
The file was modifiedllvm/include/llvm/Pass.h
The file was modifiedllvm/include/llvm/Transforms/IPO/SampleProfile.h
The file was modifiedllvm/include/llvm/Passes/PassBuilder.h
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedpolly/lib/Support/RegisterPasses.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit ddd03842c3472fedf164274c479272089c426ee5 by paulsson
[SystemZ]  Clear Available set in SystemZPostRASchedStrategy::initialize().

This needs to be done in order to not crash with -misched-cutoff.

Fixes https://bugs.llvm.org/show_bug.cgi?id=45928

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D94383
The file was modifiedllvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp
The file was addedllvm/test/CodeGen/SystemZ/misched-cutoff.ll
Commit c82deed6764cbc63966374baf9721331901ca958 by rprichard
[libunwind] Unwind through aarch64/Linux sigreturn frame

An AArch64 sigreturn trampoline frame can't currently be described
in a DWARF .eh_frame section, because the AArch64 DWARF spec currently
doesn't define a constant for the PC register. (PC and LR may need to
be restored to different values.)

Instead, use the same technique as libgcc or github.com/libunwind and
detect the sigreturn frame by looking for the sigreturn instructions:

    mov x8, #0x8b
    svc #0x0

If a sigreturn frame is detected, libunwind restores all the GPRs by
assuming that sp points at an rt_sigframe Linux kernel struct. This
behavior is a fallback mode that is only used if there is no ordinary
unwind info for sigreturn.

If libunwind can't find unwind info for a PC, it assumes that the PC is
readable, and would crash if it isn't. This could happen if:
- The PC points at a function compiled without unwind info, and which
   is part of an execute-only mapping (e.g. using -Wl,--execute-only).
- The PC is invalid and happens to point to unreadable or unmapped
   memory.

In the tests, ignore a failed dladdr call so that the tests can run on
user-mode qemu for AArch64, which uses a stack-allocated trampoline
instead of a vDSO.

Reviewed By: danielkiss, compnerd, #libunwind

Differential Revision: https://reviews.llvm.org/D90898
The file was modifiedlibunwind/test/signal_unwind.pass.cpp
The file was modifiedlibunwind/src/UnwindCursor.hpp
The file was modifiedlibunwind/include/__libunwind_config.h
The file was modifiedlibunwind/test/unwind_leaffunction.pass.cpp
Commit 3de92ca78cd4e180920acc077452f87c44c7d935 by psteinfeld
[flang] Add tests for procedure arguments with implicit interfaces

It's possible to declare an external procedure and then pass it as an
actual argument to a subprogram expecting a procedure argument.  I added
tests for this and added an error message to distinguish passing an
actual argument with an implicit interface from passing an argument with
a mismatched explicit interface.

Differential Revision: https://reviews.llvm.org/D94505
The file was modifiedflang/test/Semantics/call09.f90
The file was modifiedflang/lib/Semantics/check-call.cpp
Commit dfc1901d513e1c5b9472d9b3403ca991b3d4a232 by craig.topper
[RISCV] Custom lower ISD::VSCALE.

This patch custom lowers ISD::VSCALE into a csrr vlenb followed
by a shift right by 3 followed by a multiply by the scale amount.

I've added computeKnownBits support to indicate that the csrr vlenb
always produces 3 trailng bits of 0s so the shift right is "exact".
This allows the shift and multiply sequence to be nicely optimized
into a single shift or removed completely when the scale amount is
a power of 2.

The non power of 2 case multiplying by 24 is still producing
suboptimal code. We could remove the right shift and use a
multiply by 3. Hopefully we can improve DAG combine to fix that
since it's not unique to this sequence.

This replaces D94144.

Reviewed By: HsiangKai

Differential Revision: https://reviews.llvm.org/D94249
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
The file was addedllvm/test/CodeGen/RISCV/rvv/rvv-vscale.i64.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was addedllvm/test/CodeGen/RISCV/rvv/rvv-vscale.i32.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVMCInstLower.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit cd4c55c97402246099ae865a66517a36af5c3a7c by richard
Fix grammar in diagnostic for wrong arity in a structured binding.
The file was modifiedclang/test/SemaCXX/cxx1z-decomposition.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
Commit 336ab2d51dfdd5ca09c2a9c506453db4fe653584 by alexandre.ganea
[Support] On Windows, take the affinity mask into account

The number of hardware threads available to a ThreadPool can be limited if setting an affinity mask.
For example:

> start /B /AFFINITY 0xF lld-link.exe ...

Would let LLD only use 4 hyper-threads.

Previously, there was an outstanding issue on Windows Server 2019 on dual-CPU machines, which was preventing from using both CPU sockets. In normal conditions, when no affinity mask was set, ProcessorGroup::AllThreads was different from ProcessorGroup::UsableThreads. The previous code in llvm/lib/Support/Windows/Threading.inc L201 was improperly assuming those two values to be equal, and consequently was limiting the execution to only one CPU socket.

Differential Revision: https://reviews.llvm.org/D92419
The file was modifiedllvm/include/llvm/Support/Program.h
The file was modifiedllvm/lib/Support/Program.cpp
The file was modifiedllvm/lib/Support/Unix/Program.inc
The file was modifiedllvm/lib/Support/Windows/Threading.inc
The file was modifiedllvm/lib/Support/Windows/Program.inc
The file was modifiedllvm/unittests/Support/ThreadPool.cpp
Commit ff40fb07ad6309131c2448ca00572a078c7a2d59 by esme.yi
[PowerPC] Try to fold sqrt/sdiv test results with the branch.

Summary: The patch tries to fold sqrt/sdiv test node, i.g FTSQRT, XVTDIVDP, and the branch, i.e br_cc if they meet these patterns:
(br_cc seteq, (truncateToi1 SWTestOp), 0) -> (BCC PRED_NU, SWTestOp)
(br_cc seteq, (and SWTestOp, 2), 0) -> (BCC PRED_NE, SWTestOp)
(br_cc seteq, (and SWTestOp, 4), 0) -> (BCC PRED_LE, SWTestOp)
(br_cc seteq, (and SWTestOp, 8), 0) -> (BCC PRED_GE, SWTestOp)
(br_cc setne, (truncateToi1 SWTestOp), 0) -> (BCC PRED_UN, SWTestOp)
(br_cc setne, (and SWTestOp, 2), 0) -> (BCC PRED_EQ, SWTestOp)
(br_cc setne, (and SWTestOp, 4), 0) -> (BCC PRED_GT, SWTestOp)
(br_cc setne, (and SWTestOp, 8), 0) -> (BCC PRED_LT, SWTestOp)

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D94054
The file was addedllvm/test/CodeGen/PowerPC/fold_swtest_br.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
Commit eec856848ccc481b2704ebf64d725e635a3d7dca by alexandre.ganea
Revert "[Support] On Windows, take the affinity mask into account"

This reverts commit 336ab2d51dfdd5ca09c2a9c506453db4fe653584.
The file was modifiedllvm/lib/Support/Unix/Program.inc
The file was modifiedllvm/unittests/Support/ThreadPool.cpp
The file was modifiedllvm/lib/Support/Program.cpp
The file was modifiedllvm/lib/Support/Windows/Program.inc
The file was modifiedllvm/lib/Support/Windows/Threading.inc
The file was modifiedllvm/include/llvm/Support/Program.h
Commit 9abac60309006db00eca0af406c2e16bef26807c by Duncan P. N. Exon Smith
ADT: Fix reference invalidation in SmallVector::push_back and single-element insert

For small enough, trivially copyable `T`, take the argument by value in
`SmallVector::push_back` and copy it when forwarding to
`SmallVector::insert_one_impl`. Otherwise, when growing, update the
argument appropriately.

Differential Revision: https://reviews.llvm.org/D93779
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
Commit b196dc6607233d6235846b4a1bde70a6e0cc8512 by aeubanks
[NFC] Remove unused entry in PassRegistry.def
The file was modifiedllvm/lib/Passes/PassRegistry.def
Commit 56d1ffb927d03958a7a31442596df749264a7792 by Duncan P. N. Exon Smith
Revert "ADT: Fix reference invalidation in SmallVector::push_back and single-element insert"

This reverts commit 9abac60309006db00eca0af406c2e16bef26807c since there
are some bot errors on Windows:
http://lab.llvm.org:8011/#/builders/127/builds/4489

```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.obj
C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\Support -IC:\b\slave\sanitizer-windows\llvm-project\llvm\lib\Support -Iinclude -IC:\b\slave\sanitizer-windows\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Zi /Zc:strictStrings /Oi /Zc:rvalueCast /bigobj /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2 -UNDEBUG -std:c++14  /EHs-c- /GR- /showIncludes /Folib\Support\CMakeFiles\LLVMSupport.dir\IntervalMap.cpp.obj /Fdlib\Support\CMakeFiles\LLVMSupport.dir\LLVMSupport.pdb /FS -c C:\b\slave\sanitizer-windows\llvm-project\llvm\lib\Support\IntervalMap.cpp
C:\b\slave\sanitizer-windows\llvm-project\llvm\include\llvm/ADT/SmallVector.h(746): error C2672: 'llvm::SmallVectorImpl<T>::insert_one_maybe_copy': no matching overloaded function found
        with
        [
            T=llvm::IntervalMapImpl::Path::Entry
        ]
C:\b\slave\sanitizer-windows\llvm-project\llvm\include\llvm/ADT/SmallVector.h(745): note: while compiling class template member function 'llvm::IntervalMapImpl::Path::Entry *llvm::SmallVectorImpl<T>::insert(llvm::IntervalMapImpl::Path::Entry *,T &&)'
        with
        [
            T=llvm::IntervalMapImpl::Path::Entry
        ]
C:\b\slave\sanitizer-windows\llvm-project\llvm\lib\Support\IntervalMap.cpp(22): note: see reference to function template instantiation 'llvm::IntervalMapImpl::Path::Entry *llvm::SmallVectorImpl<T>::insert(llvm::IntervalMapImpl::Path::Entry *,T &&)' being compiled
        with
        [
            T=llvm::IntervalMapImpl::Path::Entry
        ]
C:\b\slave\sanitizer-windows\llvm-project\llvm\include\llvm/ADT/SmallVector.h(1136): note: see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled
        with
        [
            T=llvm::IntervalMapImpl::Path::Entry
        ]
C:\b\slave\sanitizer-windows\llvm-project\llvm\include\llvm/ADT/IntervalMap.h(790): note: see reference to class template instantiation 'llvm::SmallVector<llvm::IntervalMapImpl::Path::Entry,4>' being compiled
C:\b\slave\sanitizer-windows\llvm-project\llvm\include\llvm/ADT/SmallVector.h(746): error C2783: 'llvm::IntervalMapImpl::Path::Entry *llvm::SmallVectorImpl<T>::insert_one_maybe_copy(llvm::IntervalMapImpl::Path::Entry *,ArgType &&)': could not deduce template argument for '__formal'
        with
        [
            T=llvm::IntervalMapImpl::Path::Entry
        ]
C:\b\slave\sanitizer-windows\llvm-project\llvm\include\llvm/ADT/SmallVector.h(727): note: see declaration of 'llvm::SmallVectorImpl<T>::insert_one_maybe_copy'
        with
        [
            T=llvm::IntervalMapImpl::Path::Entry
        ]
```
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit 5c1c39e8d808d7d08a2c3c5ed192d543a55f685c by kazu
[llvm] Use *Set::contains (NFC)
The file was modifiedllvm/lib/Transforms/IPO/IROutliner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
The file was modifiedllvm/lib/ExecutionEngine/MCJIT/MCJIT.h
The file was modifiedllvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
The file was modifiedllvm/include/llvm/ADT/DepthFirstIterator.h
The file was modifiedllvm/include/llvm/Analysis/DivergenceAnalysis.h
Commit 125ea20d55c554fbe14eb1f6cff7d44a720a51f5 by kazu
[llvm] Use llvm::stable_sort (NFC)
The file was modifiedllvm/utils/TableGen/DAGISelEmitter.cpp
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was modifiedllvm/utils/TableGen/RegisterInfoEmitter.cpp
The file was modifiedllvm/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp
The file was modifiedllvm/utils/TableGen/SearchableTableEmitter.cpp
The file was modifiedllvm/lib/CodeGen/SafeStackLayout.cpp
The file was modifiedllvm/lib/Transforms/IPO/IROutliner.cpp
Commit 4c1617dac8fa13a8eac9cc4ac13a8f1fb3da512e by kazu
[llvm] Use std::any_of (NFC)
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Commit 49142991a685bd427d7e877c29c77371dfb7634c by Duncan P. N. Exon Smith
Reapply "ADT: Fix reference invalidation in SmallVector::push_back and single-element insert"

This reverts commit 56d1ffb927d03958a7a31442596df749264a7792, reapplying
9abac60309006db00eca0af406c2e16bef26807c, removing insert_one_maybe_copy
and using a helper called forward_value_param instead. This avoids use
of `std::is_same` (or any SFINAE), so I'm hoping it's more portable and
MSVC will be happier.

Original commit message follows:

For small enough, trivially copyable `T`, take the argument by value in
`SmallVector::push_back` and copy it when forwarding to
`SmallVector::insert_one_impl`. Otherwise, when growing, update the
argument appropriately.

Differential Revision: https://reviews.llvm.org/D93779
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit 3043e5a5c33c4c871f4a1dfd621a8839f9a1f0b3 by Duncan P. N. Exon Smith
ADT: Fix reference invalidation in N-element SmallVector::append and insert

For small enough, trivially copyable `T`, take the parameter by-value in
`SmallVector::append` and `SmallVector::insert`.  Otherwise, when
growing, update the arugment appropriately.

Differential Revision: https://reviews.llvm.org/D93780
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit 752fafda3dbf1f4885c64408a13ddb67c91ccb13 by rupprecht
[NFC] Fix -Wsometimes-uninitialized

After 49142991a685bd427d7e877c29c77371dfb7634c, clang detects that MUL may be uninitialized. Set it to nullptr to suppress this check.

Adding an assert to check that it is ultimately set fails two test cases. Since this is not a new issue, leave the assertion commented out until a code owner can fix the bug. The two failing test cases are noted in the assertion comment.
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Commit 260a856c2abcef49c7cb3bdcd999701db3e2af38 by Duncan P. N. Exon Smith
ADT: Fix reference invalidation in SmallVector::resize

For small enough, trivially copyable `T`, take the parameter by-value in
`SmallVector::resize`.  Otherwise, when growing, update the arugment
appropriately.

Differential Revision: https://reviews.llvm.org/D93781
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit c224a834583ccbb3f8e8047d409ef3bf356abc01 by Duncan P. N. Exon Smith
ADT: Reduce code duplication in SmallVector::resize by using pop_back_n, NFC
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit 3f98b66f23f9844a61f63ee00a81b9914f9a039d by Duncan P. N. Exon Smith
ADT: Reduce code duplication in SmallVector by reusing reserve, NFC
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit 53b34601abf1d48e8df210ab8127b16fd35e275a by i
[Driver] -gsplit-dwarf: Produce .dwo regardless of -gN for -fthinlto-index=

-g is an IR generation option while -gsplit-dwarf is an object file generation option.
For -gsplit-dwarf in the backend phase of a distributed ThinLTO (-fthinlto-index=) which does object file generation and no IR generation, -g should not be needed.

This patch makes `-fthinlto-index= -gsplit-dwarf` emit .dwo even in the absence of -g.
This should fix https://crbug.com/1158215 after D80391.

```
// Distributed ThinLTO usage
clang -g -O2 -c -flto=thin -fthin-link-bitcode=a.indexing.o a.c
clang -g -O2 -c -flto=thin -fthin-link-bitcode=b.indexing.o b.c
clang -fuse-ld=lld -Wl,--thinlto-index-only=a.rsp -Wl,--thinlto-prefix-replace=';lto/' -Wl,--thinlto-object-suffix-replace='.indexing.o;.o' a.indexing.o b.indexing.o
clang -gsplit-dwarf -O2 -c -fthinlto-index=lto/a.o.thinlto.bc a.o -o lto/a.o
clang -gsplit-dwarf -O2 -c -fthinlto-index=lto/b.o.thinlto.bc b.o -o lto/b.o
clang -fuse-ld=lld @a.rsp -o exe
```

Note: for implicit regular/Thin LTO, .dwo emission works without this patch:
`clang -flto=thin -gsplit-dwarf a.o b.o` passes `-plugin-opt=dwo_dir=` to the linker.
The linker forwards the option to LTO. LTOBackend.cpp emits `$dwo_dir/[01234].dwo`.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94647
The file was modifiedclang/test/Driver/split-debug.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 6ed3083a96541a7483cb02bb3b2f52b1d0a37c84 by Duncan P. N. Exon Smith
ADT: Reduce code duplication in SmallVector by calling reserve and clear, NFC
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
Commit ff5e896425577f445ed080d88b582aab0896fba0 by lxfind
Fix unused variable in CoroFrame.cpp when building Release with GCC 10

When building with GCC 10, the following warning is reported:

```
/llvm-project/llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1527:28: warning: unused variable ‘CS’ [-Wunused-variable]
1527 |       if (CatchSwitchInst *CS =
```

This change adds a cast to `void` to avoid the warning.

Reviewed By: lxfind

Differential Revision: https://reviews.llvm.org/D94456
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
Commit 885eae9d85de4b1b1907ac9b3ecba26565932069 by Jason Molenda
Add func call so we don't instruction-step into the builtin_trap

The way this test is structured right now, I set a breakpoint on
the instruction before the __builtin_trap.  It hits the breakpoint,
disables the breakpoint, and instruction steps.  This hits the
builtin_trap instruction which debugserver (on arm64) now advances
to the next instruction and reports that address to lldb.  lldb
doesn't recognize this as a proper response to the instruction
step and continues executing until the next trap, and the test fails.
The file was modifiedlldb/test/API/macosx/builtin-debugtrap/main.cpp
Commit 7ad54d193871ce69968565ea46372e81c9f1ce62 by pavel
[lldb][wasm] Parse DWO section names

Mirror ELF section parsing to support DWARF section names for
debug fission.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D93621
The file was modifiedlldb/test/Shell/ObjectFile/wasm/embedded-debug-sections.yaml
The file was modifiedlldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
Commit 2bbf724feea9824f9b9e4d20d34828023dbec2af by pavel
Implement vAttachWait in lldb-server

This commit vAttachWait in lldb-server, so --waitfor can be used on
Linux

Reviewed By: labath, clayborg

Differential Revision: https://reviews.llvm.org/D93895
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
The file was addedlldb/test/API/tools/lldb-server/TestGdbRemoteAttachWait.py
Commit ed205f63b4a288ccbffc9af58333d09a7cec40dc by zinenko
[mlir] Update doc to omit the usage of LLVMIntegerType

Since [[ https://reviews.llvm.org/D94178 | the LLVMIntegerType was replaced with build-in integer type ]], the usage in the tutorial should be also updated accordingly.
We need to update chapter 6 for Toy tutorial specifically.

See: https://reviews.llvm.org/D94178

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D94651
The file was modifiedmlir/docs/Tutorials/Toy/Ch-6.md
Commit 4b284b9ca8098e284b8d965a633b71bd283043d6 by pavel
[lldb] Fix TestPlatformProcessConnect.py

The test was marked as remote-only, which means it was run ~never, and
accumulated various problems. This commit modifies the test to run
locally and includes a couple of other fixes necessary to make it run:
- moves the "invoke" method into the "Base" test class
- adds []'s around the IP address in a couple more places to make things
  work with IPv6

The test is now marked as skipped when running the remote test suite. It
would be possible to make it run both locally and remotely, but this
would require writing a lot special logic for the remote case, and that
is not worth it.
The file was modifiedlldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
The file was modifiedlldb/test/API/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
Commit 259936f4910ad7da7589f81862fc855386ae8621 by david.stuttard
[NFC][AsmPrinter] Windows warning: Use explicit cast

static_cast for uint64_t to unsigned gives a MS VC build warning
for Windows:

warning C4309: 'static_cast': truncation of constant value

Use an explicit cast instead.

Change-Id: I692d335b4913070686a102780c1fb05b893a2f69

Differential Revision: https://reviews.llvm.org/D94592
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit 2b1e25befefc20f012aa49011f46e11e8530ee21 by lucas.prates
[AArch64] Adding ACLE intrinsics for the LS64 extension

This introduces the ARMv8.7-A LS64 extension's intrinsics for 64 bytes
atomic loads and stores: `__arm_ld64b`, `__arm_st64b`, `__arm_st64bv`,
and `__arm_st64bv0`. These are selected into the LS64 instructions
LD64B, ST64B, ST64BV and ST64BV0, respectively.

Based on patches written by Simon Tatham.

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D93232
The file was modifiedclang/lib/Basic/Targets/AArch64.cpp
The file was addedclang/test/CodeGen/aarch64-ls64.c
The file was modifiedclang/include/clang/Basic/BuiltinsAArch64.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
The file was modifiedclang/lib/Headers/arm_acle.h
The file was modifiedllvm/include/llvm/IR/IntrinsicsAArch64.td
The file was addedllvm/test/CodeGen/AArch64/ls64-intrinsics.ll
The file was modifiedclang/test/Preprocessor/aarch64-target-features.c
Commit 4bb11b3eafbde75ab026ec180cae62799ba0fb3c by flo
[LTO] Expose opt() in LTOBackend (NFC).

Exposing opt() which runs middle-end LTO optimzation allows re-using it
in LTOCodeGenerator.

Reviewed By: steven_wu

Differential Revision: https://reviews.llvm.org/D94486
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
The file was modifiedllvm/include/llvm/LTO/LTOBackend.h
Commit 53e3b81faaf32a495189182e0e4d635cbe19c5dd by wingo
[lld][WebAssembly] Add support for handling table symbols

This commit adds table symbol support in a partial way, while still
including some special cases for the __indirect_function_table symbol.
No change in tests.

Differential Revision: https://reviews.llvm.org/D94075
The file was modifiedlld/wasm/InputFiles.h
The file was modifiedlld/wasm/WriterUtils.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Wasm.h
The file was modifiedllvm/include/llvm/Object/Wasm.h
The file was modifiedlld/wasm/WriterUtils.h
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/wasm/Symbols.h
The file was modifiedlld/include/lld/Common/LLVM.h
The file was modifiedlld/wasm/InputChunks.cpp
The file was modifiedlld/wasm/SymbolTable.h
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedlld/wasm/SyntheticSections.h
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedllvm/lib/Object/WasmObjectFile.cpp
The file was addedlld/wasm/InputTable.h
The file was modifiedlld/wasm/SymbolTable.cpp
The file was modifiedllvm/tools/llvm-readobj/WasmDumper.cpp
The file was modifiedlld/wasm/MarkLive.cpp
Commit d58512b2e31a255dccc2c9a351a4e47b2b4c9f79 by bjorn.a.pettersson
[SLP] Don't vectorize stores of non-packed types (like i1, i2)

In the spirit of commit fc783e91e0c0696e (llvm-svn: 248943) we
shouldn't vectorize stores of non-packed types (i.e. types that
has padding between consecutive variables in a scalar layout,
but being packed in a vector layout).

The problem was detected as a miscompile in a downstream test case.

Reviewed By: anton-afanasyev

Differential Revision: https://reviews.llvm.org/D94446
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/bad_types.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 17f8c458de631c0311828931a5bdf72b1a13c29d by mikhail.maltsev
[clang] Use SourceLocations in unions [NFCI]

Currently, there are many instances where `SourceLocation` objects are
converted to raw representation to be stored in structs that are
used as fields of tagged unions.

This is done to make the corresponding structs trivial.
Triviality allows avoiding undefined behavior when implicitly changing
the active member of the union.

However, in most cases, we can explicitly construct an active member
using placement new. This patch adds the required active member
selections and replaces `SourceLocation`-s represented as
`unsigned int` with proper `SourceLocation`-s.

One notable exception is `DeclarationNameLoc`: the objects of this class
are often not properly initialized (so the code currently relies on
its default constructor which uses memset). This class will be fixed
in a separate patch.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94237
The file was modifiedclang/include/clang/Sema/DeclSpec.h
The file was modifiedclang/lib/Sema/DeclSpec.cpp
The file was modifiedclang/lib/AST/Expr.cpp
The file was modifiedclang/include/clang/AST/DependentDiagnostic.h
The file was modifiedclang/include/clang/Sema/Designator.h
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/include/clang/Sema/Initialization.h
The file was modifiedclang/lib/AST/TemplateBase.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/include/clang/AST/TemplateBase.h
Commit af8d27a7a8266b89916b5e4db2b2fd97eb7d84e5 by llvm-dev
[DAG] visitVECTOR_SHUFFLE - pull out shuffle merging code into lambda helper. NFCI.

Make it easier to reuse in a future patch.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 8f1d7f3753ca132b310bbb0e62c394cfa75daee5 by llvm-dev
[X86] Improve sum-of-reductions v4f32 test coverage

Ensure that the v4f32 reductions use a -0.0f start value and add fast-math test variant.
The file was modifiedllvm/test/CodeGen/X86/horizontal-sum.ll
Commit a997a1d7fbe229433fb458bb0035b32424ecf3bd by pavel
[lldb/test] Ensure launched processes are ready to be attached

Linux systems can be configured (and most of them are configured that
way) to disable attaching to unrelated processes, /unless/ those
processes explicitly allow that.

Our test inferiors do that by explicitly calling prctl(PR_SET_PTRACER,
PR_SET_PTRACER_ANY) (a.k.a., lldb_enable_attach). This requires
additional synchronization to ensure that the test does not attempt
attach before that statement is executed.

This is working fine (albeit cumbersome) for most tests but
TestGdbRemoteAttachWait is special in that it wants to start the
inferior _after_ issuing the attach request. This means that the usual
synchronization method does not work.

This patch introduces a different solution -- enable attaching in the
test harness, before the process is launched. Besides fixing this
problem, this is also better because it avoids the need to add special
code to each attach test (which is a common error).

One gotcha here is that it won't work for remote test suites, as we
don't control launching there. However, we could add a similar option to
lldb-platform, or require that lldb-platform itself is started with
attaching enabled. At that point we could delete all lldb_enable_attach
logic.
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbplatformutil.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit 7c30c05ff71d062f0b8a05b7c3c12ede2c285371 by llvm-dev
[DAG] visitVECTOR_SHUFFLE - MergeInnerShuffle - reset shuffle ops and reorder early-out and second op matching. NFCI.

I'm hoping to reuse MergeInnerShuffle in some other folds - so ensure the candidate ops/mask are reset at the start of each run.

Also, move the second op matching before bailing to make it simpler to try to match other things afterward.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 2e25be0b6134e9544f7cee7bb7b31a921ca37cc0 by platonov.aleksandr
[clangd] Add main file macros into the main-file index.

This patch is a try to fix `WorkspaceSymbols.Macros` test after D93796.
If a macro definition is in the preamble section, then it appears to be in the preamble (static) index and not in the main-file (dynamic) index.
Thus, a such macro could not be found at a symbol search according to the logic that we skip symbols from the static index if the location of these symbols is inside the dynamic index files.
To fix this behavior this patch adds main file macros into the main-file (dynamic) index.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D94477
The file was modifiedclang-tools-extra/clangd/CollectMacros.h
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
The file was modifiedclang-tools-extra/clangd/XRefs.cpp
The file was modifiedclang-tools-extra/clangd/CollectMacros.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolCollector.cpp
The file was modifiedclang-tools-extra/clangd/SemanticHighlighting.cpp
The file was modifiedclang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/ParsedASTTests.cpp
Commit 19297a4171177b942832d49a3767609d2a112ae1 by nigelp
Change XCore code owner.

Discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-January/147603.html
The file was modifiedllvm/CODE_OWNERS.TXT
Commit 3bccd87a588b3c320b669686c8f006b92ff72182 by Jan Svoboda
[clang][cli] NFC: Remove SSPBufferSize assignment

This should've been part of D84669, but got overlooked. Removing the assignment is NFC, as it's also done by the marshalling infrastructure for the stack_protector_buffer_size option.

Reviewed By: dexonsmith in D94488
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit fa2fe9608c1c1b402296960b1edc157230c30062 by Jan Svoboda
[clang][cli] Port more CodeGenOptions to marshalling infrastructure

Leveraging the recently added TableGen constructs (ShouldParseIf and MarshallingInfoStringInt) to shift from manual command line parsing to automatic TableGen-driver marshalling.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D94488
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 6abbba3fca9fdf8d31f74800a7ddb40b103ae6e3 by alexandre.ganea
Revert "Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable"

This reverts commit 854f0984f0b7ab9a9a541a4bcda7ea173e4113d3.

This breaks compilation with clang-cl on Windows, while in a MSVC 16.8 cmd.exe.
This also breaks PPC: http://lab.llvm.org:8011/#/builders/93/builds/1435
And: https://reviews.llvm.org/D93510#2497737
The file was modifiedllvm/unittests/ADT/OptionalTest.cpp
The file was modifiedllvm/include/llvm/ADT/Optional.h
Commit 176f5e95e1afad75ff045a00f0fa9c781bd5f54a by mikhail.maltsev
[clang-tidy] Use DenseSet<SourceLocation> in UpgradeDurationConversionsCheck, NFCI

This change replaces `unordered_set<unsigned>` (which used to store
internal representation of `SourceLocation`-s) with
`DenseSet<SourceLocation>` (which stores `SourceLocation`-s directly).

Reviewed By: aaron.ballman, njames93

Differential Revision: https://reviews.llvm.org/D94601
The file was modifiedclang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h
Commit a1bbd1ef1dbd2a39777ef0b2d623f15f0523cdbf by andrzej.warzynski
[flang][driver] Unify f18_version.h.in and Version.inc.in

Flang has two CMake configurable header files that define compiler
version numbers:
* f18_version.h.in - only used in f18.cpp (uses version numbers from
  LLVM's macro definitions)
* Version.inc.in - not currently used (uses version numbers hard-coded
  in Flang's top CMake script)

Currently only f18_version.h.in provides version numbers consistent with
other subprojects in llvm-project. However, its location and name are
inconsistent with e.g. Clang. This patch merges the two headers
together:
  * hard-coded version numbers in Flang's top CMake script are deleted
  * Version.inc.in is updated to provide string versions of version
  numbers (required by f18.cpp)
  * f18_version.h.in is deleted as it's no longer needed

Differential Revision: https://reviews.llvm.org/D94422
The file was modifiedflang/tools/f18/f18.cpp
The file was modifiedflang/include/flang/Version.inc.in
The file was removedflang/tools/f18/f18_version.h.in
The file was modifiedflang/tools/f18/CMakeLists.txt
The file was modifiedflang/CMakeLists.txt
Commit c23e34e606bf23ee8d4060469ecebe0f7971c5dd by flo
[InferFunctionAttrs] Improve CHECK variable names (NFC).
The file was modifiedllvm/test/Transforms/InferFunctionAttrs/annotate.ll
Commit a1cba5b7a1fb09d2d4082967e2466a5a89ed698a by jay.foad
[SelectionDAG] Make use of KnownBits::commonBits. NFC.

Differential Revision: https://reviews.llvm.org/D94587
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit 517196e569129677be32d6ebcfa57bac552268a4 by jay.foad
[Analysis,CodeGen] Make use of KnownBits::makeConstant. NFC.

Differential Revision: https://reviews.llvm.org/D94588
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 90b310f6caf0b356075c70407c338b3c751eebb3 by jay.foad
[Support] Simplify KnownBits::icmp helpers. NFC.

Remove some special cases that aren't really any simpler than the
general case.

Differential Revision: https://reviews.llvm.org/D94595
The file was modifiedllvm/lib/Support/KnownBits.cpp
Commit e8622d27c0e3020177ff47ad57dd1e5371feb9cf by llvm-dev
[Support] Add KnownBits::sextInReg exhaustive tests

Requested by @foad in rG9cf4f493a72f
The file was modifiedllvm/unittests/Support/KnownBitsTest.cpp
Commit 332e220ef42b92df4e080cfa5b91c9accbe9731b by Stefan Gränitz
[docs] Update DebuggingJITedCode page after fix in LLDB

Generalize the documentation to include both, GDB and LLDB. Add a link to the interface
definition. Make a note on MCJIT's restriction to ELF. Mention the regression and bugfix
in LLDB as well as the jit-loader setting for macOS. Update the command line session to
use LLDB instead of GDB.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D90789
The file was modifiedllvm/docs/DebuggingJITedCode.rst
Commit 0b46f19a9ecd6215cffb51d19f2403c18b0226f5 by llvm-dev
[Support] Ensure KnownBits::sextInReg can handle the src == dst sext-in-reg case.

This was resulting in assertions inside APInt::zext that we were extending to the same bitwidth.
The file was modifiedllvm/lib/Support/KnownBits.cpp
The file was modifiedllvm/unittests/Support/KnownBitsTest.cpp
Commit 3e41ab18db2255028c288a11665c08d260654299 by tkeith
[flang] Fix dangling pointer in LabelEnforce

`DirectiveStructureChecker` was passing in a pointer to a temporary
string for the `construct` argument to the constructor for `LabelEnforce`.
The `LabelEnforce` object had a lifetime longer than the temporary,
resulting in accessing a dangling pointer when emitting an error message
for `omp-parallell01.f90`.

The fix is to make the lifetime of the temporary as long as the lifetime
of the `LabelEnforce` object.

Differential Revision: https://reviews.llvm.org/D94618
The file was modifiedflang/lib/Semantics/check-directive-structure.h
Commit adb77a7456920a46908c7e20b2d3008789274975 by anastasia.stulova
[OpenCL] Improve online documentation.

Update UsersManual and OpenCLSupport pages to reflect
recent functionality i.e. SPIR-V generation,
C++ for OpenCL, OpenCL 3.0 development plans.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D93942
The file was modifiedclang/docs/OpenCLSupport.rst
The file was modifiedclang/docs/UsersManual.rst
Commit 6b9fa8a50d0f9e1e54f238b1c50fee8ff7011218 by antiagainst
[mlir][linalg] Add docstring support for named op spec

Depends on D94335

Reviewed By: nicolasvasilache, hanchung

Differential Revision: https://reviews.llvm.org/D94548
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
The file was modifiedmlir/docs/Dialects/Linalg.md
The file was modifiedmlir/test/mlir-linalg-ods-gen/test-linalg-ods-gen.tc
Commit c0939fddf80c16829502186e2e5b78f77696310a by llvm-dev
[Support] Simplify KnownBits::sextInReg implementation.

As noted by @foad in rG9cf4f493a72f all we need to do is sextInReg both KnownBits One and Zero.
The file was modifiedllvm/lib/Support/KnownBits.cpp
Commit a022be625387370cf67b26c6b99b05f16b2a8610 by Paul C. Anagnostopoulos
[TableGen] Enhance !cast<string> to handle bit and bits types.

Add a test for this.

Differential Revision: https://reviews.llvm.org/D94529
The file was modifiedllvm/lib/TableGen/Record.cpp
The file was addedllvm/test/TableGen/cast-string.td
Commit dbaa6a1858a42f72b683f700d3bd7a9632f7a518 by martin
Revert "[AArch64] Attempt to sink mul operands"

This reverts commit dda60035e9f0769c8907cdf6561489e0435c2275.

This commit caused failures to compile some sources, erroring out
with "error in backend: Cannot select: t85: v2i32 = AArch64ISD::DUP t15",
see https://reviews.llvm.org/D91271 for the full reproduction case.
The file was removedllvm/test/CodeGen/AArch64/aarch64-matrix-umull-smull.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit d0dbb0468c26bafa88e7340781fb3a0a79379470 by llvm-dev
[Support] Remove redundant sign bit tests from KnownBits::getSignedMinValue/getSignedMaxValue

As noted by @foad on rG6895581fd2c1
The file was modifiedllvm/include/llvm/Support/KnownBits.h
Commit 0a59647ee407524e6468cc5be4ba288861aa700d by llvm-dev
[SystemZ] misched-cutoff tests can only be tested on non-NDEBUG (assertion) builds

Fixes clang-with-thin-lto-ubuntu buildbot after D94383/rGddd03842c347
The file was modifiedllvm/test/CodeGen/SystemZ/misched-cutoff.ll
Commit 17fb21f875f4aaf6ad2cf9499cb75d76588167f2 by sam.mccall
[clangd] Remove another option that was effectively always true. NFC
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/CodeComplete.h
Commit 7c9c2a2ea5e3760d7310309c96c9a4ce41fa4d9b by selliott
Revert "[RISCV] Legalize select when Zbt extension available"

We found issues with this patch in additional testing. Backing out while
we work on a fix.

This reverts commit 71ed4b6ce57d8843ef705af8f98305976a8f107a.
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbt.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbs.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbb.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbt.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoB.td
Commit 0afdbb4d2dead42df14361ca9f5613d56667481c by andrzej.warzynski
[flang][driver] Use __FLANG_VERISION__ in f18.cpp (nfc)

Just a minor improvement suggested in a post-commit review here:
https://reviews.llvm.org/D94422
The file was modifiedflang/tools/f18/f18.cpp
Commit e21bf875c0f709a721d98450203781a605483a1d by mtrofin
[NFC] Disallow unused prefixes under MC/ARM

Differential Revision: https://reviews.llvm.org/D94620
The file was modifiedllvm/test/MC/ARM/ldr-pseudo-cond-darwin.s
The file was modifiedllvm/test/MC/ARM/ldr-pseudo-cond.s
The file was modifiedllvm/test/MC/ARM/lsl-zero.s
The file was modifiedllvm/test/MC/ARM/lit.local.cfg
The file was modifiedllvm/test/MC/ARM/thumbv8m.s
The file was modifiedllvm/test/MC/ARM/mve-fp-registers.s
The file was modifiedllvm/test/MC/ARM/lsl-zero-errors.s
Commit 2f395b7092bdac0e39bb4e2bb5e6b03e521a45dd by usx
[clangd] Make AST-based signals available to runWithPreamble.

Many useful signals can be derived from a valid AST which is regularly updated by
the ASTWorker. `runWithPreamble` does not have access to the ParsedAST
but it can be provided access to some signals derived from a (possibly
stale) AST.

Differential Revision: https://reviews.llvm.org/D94424
The file was modifiedclang-tools-extra/clangd/TUScheduler.h
The file was addedclang-tools-extra/clangd/unittests/ASTSignalsTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
The file was addedclang-tools-extra/clangd/ASTSignals.cpp
The file was addedclang-tools-extra/clangd/ASTSignals.h
The file was modifiedclang-tools-extra/clangd/unittests/CMakeLists.txt
The file was modifiedclang-tools-extra/clangd/TUScheduler.cpp
The file was modifiedclang-tools-extra/clangd/CMakeLists.txt
Commit 8b09cf7956d8abc722fa736874e4cea667a9d3cb by usx
[clangd] Trivial: Documentation fix in ASTSignals.
The file was modifiedclang-tools-extra/clangd/ASTSignals.cpp
The file was modifiedclang-tools-extra/clangd/ASTSignals.h
Commit b4e083b0ef7ca86851b5b1d043004ae632a63f8d by llvmgnsyncbot
[gn build] Port 2f395b7092bd
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
Commit 4864d9f7e91fdd58a84e4ae576f1ad16f71f9d91 by pklausler
[flang] Fix some module file issues exposed by Whizard

Generic type-bound interfaces for user-defined operators need to be formatted
as "OPERATOR(.op.)", not just ".op."

PRIVATE generics need to be marked as such.

Declaration ordering: when a generic interface shadows a
derived type of the same name, it needs to be emitted to the
module file at the point of definition of the derived type;
otherwise, the derived type's definition may appear after its
first use.

The module symbol for a module read from a module file needs
to be marked as coming from a module file before semantic
processing is performed on the contents of the module so that
any special handling for declarations in module files can be
properly activated.

IMPORT statements were sometimes missing for use-associated
symbols in surrounding scopes; fine-tune NeedImport().

Differential Revision: https://reviews.llvm.org/D94636
The file was modifiedflang/lib/Semantics/mod-file.cpp
The file was addedflang/test/Semantics/modfile37.f90
The file was modifiedflang/test/Semantics/modfile35.f90
The file was addedflang/test/Semantics/modfile38.f90
Commit 35c8a6cbf5ff0b525e2c01e5d746067bdda1dde7 by mtrofin
[NFC] Disallow unused prefixes under MC/AArch64

Differential Revision: https://reviews.llvm.org/D94616
The file was modifiedllvm/test/MC/AArch64/armv8.7a-ls64.s
The file was modifiedllvm/test/MC/AArch64/armv8.7a-xs.s
The file was modifiedllvm/test/MC/AArch64/lit.local.cfg
Commit a03ffa98503bb6d5a990e61df060ed480c3e3f3b by aeubanks
[NewPM] Fix placement of LoopFlatten

https://reviews.llvm.org/D90402 was inconsistent with where it put
LoopFlatten between the two pass managers. It also missed adding it to
the non-O1 function simplification pipeline.

PR48738

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D94650
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit b99782cf7850a481fa36fd95ae04923739e0da6d by llvm-dev
[X86][AVX] Adjust unsigned saturation downconvert negative test

D87145 was showing that this test (added in D45315) could always be constant folded (with suitable value tracking).

What we actually needed was smax(smin()) negative test coverage, the invert of negative_test2_smax_usat_trunc_wb_256_mem, so I've tweaked the test to provide that instead.
The file was modifiedllvm/test/CodeGen/X86/avx512-trunc.ll
Commit 5d165f0b893d4fc5fb5caeb2b05c566dd26e4d89 by jonathanchesterfield
[libomptarget][amdgpu] Fix kernel launch tracing to match previous behavior

Restore control of kernel launch tracing to be >= 1 as it was before

export LIBOMPTARGET_KERNEL_TRACE=1

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D94695
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Commit 868da2ea939baf8c71a6dcb878cf6094ede9486e by jay.foad
[SelectionDAG] Remove an early-out from computeKnownBits for smin/smax

Even if we know nothing about LHS, it can still be useful to know that
smax(LHS, RHS) >= RHS and smin(LHS, RHS) <= RHS.

Differential Revision: https://reviews.llvm.org/D87145
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/known-bits-vector.ll
Commit 85dfcaadc5f0920dc8ecbece6c786701b8f45ab4 by jotrem
[LLDB] MinidumpParser: Prefer executable module even at higher address

When a program maps one of its own modules for reading, and then
crashes, breakpad can emit two entries for that module in the
ModuleList.  We have logic to identify this case by checking permissions
on mapped memory regions and report just the module with an executable
region.  As currently written, though, the check is asymmetric -- the
entry with the executable region must be the second one encountered for
the preference to kick in.

This change makes the logic symmetric, so that the first-encountered
module will similarly be preferred if it has an executable region but
the second-encountered module does not.  This happens for example when
the module in question is the executable itself, which breakpad likes to
report first -- we need to ignore the other entry for that module when
we see it later, even though it may be mapped at a lower virtual
address.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D94629
The file was modifiedlldb/source/Plugins/Process/minidump/MinidumpParser.cpp
The file was modifiedlldb/unittests/Process/minidump/MinidumpParserTest.cpp
Commit be40c12040a0d5551bf3430cbb184b5ef23e25fd by enye.shi
[HIP] Add signbit(long double) decl

An _MSC_VER version of signbit(long double) is required for MSVC headers.

Fixes: SWDEV-256409

Differential Revision: https://reviews.llvm.org/D93062
The file was modifiedclang/lib/Headers/__clang_cuda_math_forward_declares.h
Commit 6ebeba88f51959d763a8f274cdfecea46d51d28c by zinenko
Support emptiness checks for unbounded FlatAffineConstraints.

With this, we have complete support for emptiness checks. This also paves the way for future support to check if two FlatAffineConstraints are equal.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D94272
The file was modifiedmlir/unittests/Analysis/AffineStructuresTest.cpp
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
The file was addedmlir/include/mlir/Analysis/LinearTransform.h
The file was modifiedmlir/include/mlir/Analysis/Presburger/Matrix.h
The file was modifiedmlir/lib/Analysis/Presburger/CMakeLists.txt
The file was modifiedmlir/include/mlir/Analysis/Presburger/Simplex.h
The file was addedmlir/lib/Analysis/LinearTransform.cpp
The file was addedmlir/unittests/Analysis/LinearTransformTest.cpp
The file was modifiedmlir/include/mlir/Analysis/Presburger/Fraction.h
The file was modifiedmlir/unittests/Analysis/CMakeLists.txt
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/lib/Analysis/Presburger/Matrix.cpp
The file was modifiedmlir/lib/Analysis/Presburger/Simplex.cpp
Commit 763c1f9933463c40c39c04b68bbe4d296823b003 by tianshilei1992
[OpenMP] Drop the static library libomptarget-nvptx

For NVPTX target, OpenMP provides a static library `libomptarget-nvptx`
built by NVCC, and another bitcode `libomptarget-nvptx-sm_{$sm}.bc` generated by
Clang. When compiling an OpenMP program, the `.bc` file will be fed to `clang`
in the second run on the program that compiles the target part. Then the generated
PTX file will be fed to `ptxas` to generate the object file, and finally the driver
invokes `nvlink` to generate the binary, where the static library will be appened
to `nvlink`.

One question is, why do we need two libraries? The only difference is, the static
library contains `omp_data.cu` and the bitcode library doesn't. It's unclear why
they were implemented in this way, but per D94565, there is no issue if we also
include the file into the bitcode library. Therefore, we can safely drop the
static library.

This patch is about the change in OpenMP. The driver will be updated as well if
this patch is accepted.

Reviewed By: jdoerfert, JonChesterfield

Differential Revision: https://reviews.llvm.org/D94573
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Commit 4fffbc150cca1638051b8ad2a20f4b8240df0869 by zequanwu
[clang][MSVC] Fix missing MSInheritanceAttr in template specialization.

Fix PR48687.

Differential Revision: https://reviews.llvm.org/D94646
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
Commit 202d359753d1f130a228c3ad52dfaabf384250d1 by yamauchi
[X86] Add the FSRM feature (Fast Short Rep Mov) to Zen3.

Note -x86-use-fsrm-for-memcpy is still disabled by default and there's no
default behavior change.

Differential Revision: https://reviews.llvm.org/D94436
The file was modifiedllvm/test/CodeGen/X86/memcpy-inline-fsrm.ll
The file was modifiedllvm/lib/Target/X86/X86.td
Commit 64e9e9aeee0155fc12d7d40d56e7611a63d8e47d by tianshilei1992
[OpenMP] Dropped unnecessary define when compiling deviceRTLs for NVPTX

The comment said CUDA 9 header files use the `nv_weak` attribute which
`clang` is not yet prepared to handle. It's three years ago and now things have
changed. Based on my test, removing the definition doesn't have any problem on
my machine with CUDA 11.1 installed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D94700
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
Commit a8520f6970fd4d44ceae1ec5969563a0dbe30f54 by 31459023+hctim
[GWP-ASan] Minor refactor of optional components.

In preparation for the inbuilt options parser, this is a minor refactor
of optional components including:
- Putting certain optional elements in the right header files,
according to their function and their dependencies.
- Cleaning up some old and mostly-dead code.
- Moving some functions into anonymous namespaces to prevent symbol
export.

Reviewed By: cryptoad, eugenis

Differential Revision: https://reviews.llvm.org/D94117
The file was addedcompiler-rt/lib/gwp_asan/tests/platform_specific/printf_sanitizer_common.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/tests/harness.h
The file was modifiedcompiler-rt/lib/gwp_asan/optional/backtrace.h
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/gwp_asan/optional/backtrace_fuchsia.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/optional/segv_handler_fuchsia.cpp
The file was removedcompiler-rt/lib/gwp_asan/tests/optional/printf_sanitizer_common.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/optional/backtrace_linux_libc.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/optional/segv_handler_posix.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/optional/segv_handler.h
The file was modifiedcompiler-rt/lib/gwp_asan/tests/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/scudo_allocator.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/optional/backtrace_sanitizer_common.cpp
The file was addedcompiler-rt/lib/gwp_asan/optional/printf.h
Commit ca98baa042538e1a8654dd86b24d1602df9a1aec by clementval
[openacc] Rename generated file from ACC.cpp.inc to ACC.inc to match D92955

This patch rename the tablegen generated file ACC.cpp.inc to ACC.inc in order
to match what was done in D92955. This file is included in header file as well as .cpp
file so it make more sense.

Reviewed By: sameeranjoshi

Differential Revision: https://reviews.llvm.org/D93485
The file was modifiedllvm/include/llvm/Frontend/OpenACC/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Frontend/OpenACC/BUILD.gn
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedflang/include/flang/Parser/dump-parse-tree.h
The file was modifiedflang/lib/Semantics/check-acc-structure.h
The file was modifiedflang/lib/Parser/unparse.cpp
Commit 9e53c94d8dd737fcedb543d6ac687ea9696db8a6 by erich.keane
[NFC] Update test to not check for 'opaque' in the file name.

The intent presumably is to avoid generating 'opaque' in the IR, but the
header contains the filename. Thus, having the workspace in a directory
with opaque in it causes this test to fail.

This just adds a 'CHECK' line on target-triple, which is the last line
of the IR-header.
The file was modifiedclang/test/CodeGen/incomplete-function-type.c
Commit 1d973b7ded124dd19f766db0c8e07d1c686dfb1b by rob.suderman
[MLIR][TOSA] First lowerings from Tosa to Linalg

Initial commit to add support for lowering from TOSA to Linalg. The focus is on
the essential infrastructure for these lowerings and integration with existing
passes.

Includes lowerings for a subset of operations including:
  abs, add, sub, pow, and, or, xor, left shift, right shift, tanh

Lit tests are used to validate correctness.

Differential Revision: https://reviews.llvm.org/D94247
The file was addedmlir/include/mlir/Conversion/TosaToLinalg/TosaToLinalg.h
The file was addedmlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was addedmlir/lib/Conversion/TosaToLinalg/CMakeLists.txt
The file was addedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
The file was addedmlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
Commit d8113cda782b56477d71321027c50389f05f5d31 by joker.eph
Add newline to terminate debug message (NFC)
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit a3904cc77f181cff7355357688edfc392a236f5d by nikita.ppv
[BasicAA] Handle recursive queries more efficiently

An alias query currently works out roughly like this:

* Look up location pair in cache.
* Perform BasicAA logic (including cache lookup and insertion...)
* Perform a recursive query using BestAAResults.
   * Look up location pair in cache (and thus do not recurse into BasicAA)
   * Query all the other AA providers.
* Query all the other AA providers.

This is a lot of unnecessary work, all ultimately caused by the
BestAAResults query at the end of aliasCheck(). The reason we perform
it, is that aliasCheck() is getting called recursively, and we of
course want those recursive queries to also make use of other AA
providers, not just BasicAA. We can solve this by making the recursive
queries directly use BestAAResults (which will check both BasicAA
and other providers), rather than recursing into aliasCheck().

There are some tradeoffs:

* We can no longer pass through the precomputed underlying object
   to aliasCheck(). This is not a major concern, because nowadays
   getUnderlyingObject() is quite cheap.
* Results from other AA providers are no longer cached inside
   BasicAA. The way this worked was already a bit iffy, in that a
   result could be cached, but if it was MayAlias, we'd still end
   up re-querying other providers anyway. If we want to cache
   non-BasicAA results, we should do that in a more principled manner.

In any case, despite those tradeoffs, this works out to be a decent
compile-time improvment. I think it also simplifies the mental model
of how BasicAA works. It took me quite a while to fully understand
how these things interact.

Differential Revision: https://reviews.llvm.org/D90094
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
Commit 00a61b327dd8a7071ce0baadd16ea4c7b7e31e73 by riddleriver
[mlir][ODS] Add new RangedTypesMatchWith operation predicate

This is a variant of TypesMatchWith that provides support for variadic arguments. This is necessary because ranges generally can't use the default operator== comparators for checking equality.

Differential Revision: https://reviews.llvm.org/D94574
The file was modifiedmlir/test/mlir-tblgen/op-format.mlir
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit 93592b726c7587aa86548cc74268346e25a4a7f2 by riddleriver
[mlir][OpFormatGen] Format enum attribute cases as keywords when possible

In the overwhelmingly common case, enum attribute case strings represent valid identifiers in MLIR syntax. This revision updates the format generator to format as a keyword in these cases, removing the need to wrap values in a string. The parser still retains the ability to parse the string form, but the printer will use the keyword form when applicable.

Differential Revision: https://reviews.llvm.org/D94575
The file was modifiedmlir/test/Dialect/Vector/vector-contract-transforms.mlir
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
The file was modifiedmlir/test/Conversion/OpenMPToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/test/Dialect/SPIRV/IR/barrier-ops.mlir
The file was modifiedmlir/test/Dialect/Linalg/sparse_3d.mlir
The file was modifiedmlir/test/Transforms/buffer-loop-hoisting.mlir
The file was modifiedmlir/test/Dialect/Linalg/tile-and-distribute.mlir
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/test/Transforms/copy-removal.mlir
The file was modifiedmlir/test/Dialect/SPIRV/IR/target-env.mlir
The file was modifiedmlir/test/Target/SPIRV/group-ops.mlir
The file was modifiedmlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir
The file was modifiedmlir/test/Dialect/Linalg/sparse_2d.mlir
The file was modifiedmlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir
The file was modifiedmlir/test/Dialect/Standard/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Linalg/sparse_1d.mlir
The file was modifiedmlir/test/Transforms/buffer-deallocation.mlir
The file was modifiedmlir/test/Dialect/SPIRV/IR/non-uniform-ops.mlir
The file was modifiedmlir/test/Dialect/Standard/expand-tanh.mlir
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/test/Transforms/sccp.mlir
The file was modifiedmlir/test/Transforms/sccp-structured.mlir
The file was modifiedmlir/test/Dialect/GPU/all-reduce.mlir
The file was modifiedmlir/test/Transforms/buffer-hoisting.mlir
The file was modifiedmlir/test/Transforms/canonicalize-block-merge.mlir
The file was modifiedmlir/test/Transforms/canonicalize.mlir
The file was modifiedmlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir
The file was modifiedmlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
The file was modifiedmlir/test/Dialect/Standard/expand-ops.mlir
The file was modifiedmlir/test/Transforms/sccp-callgraph.mlir
The file was modifiedmlir/test/Conversion/SCFToGPU/parallel_loop.mlir
The file was modifiedmlir/test/Dialect/SPIRV/IR/group-ops.mlir
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/test/Transforms/parametric-tiling.mlir
The file was modifiedmlir/test/Transforms/cse.mlir
The file was modifiedmlir/test/Analysis/test-liveness.mlir
The file was modifiedmlir/test/Analysis/test-dominance.mlir
The file was modifiedmlir/test/Conversion/AffineToStandard/lower-affine.mlir
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
The file was modifiedmlir/test/Conversion/VectorToSCF/vector-to-loops.mlir
The file was modifiedmlir/test/Dialect/Affine/parallelize.mlir
The file was modifiedmlir/test/Dialect/SCF/ops.mlir
The file was modifiedmlir/test/Conversion/ShapeToStandard/convert-shape-constraints.mlir
The file was modifiedmlir/test/Target/SPIRV/non-uniform-ops.mlir
The file was modifiedmlir/test/Target/SPIRV/barrier-ops.mlir
The file was modifiedmlir/integration_test/Dialect/Linalg/CPU/matmul-vs-matvec.mlir
The file was modifiedmlir/test/Dialect/SPIRV/IR/availability.mlir
The file was modifiedmlir/test/Dialect/SCF/parallel-loop-specialization.mlir
The file was modifiedmlir/test/Dialect/Vector/vector-transforms.mlir
The file was modifiedmlir/test/mlir-tblgen/op-format.mlir
The file was modifiedmlir/test/Dialect/Linalg/convert-elementwise-to-linalg.mlir
The file was modifiedmlir/test/Dialect/GPU/all-reduce-max.mlir
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
The file was modifiedmlir/test/Transforms/promote-buffers-to-stack.mlir
The file was modifiedmlir/test/Dialect/SCF/for-loop-specialization.mlir
The file was modifiedmlir/test/Transforms/constant-fold.mlir
Commit e3b9af92a4821fec25c207e2d1e443e09ff6b11e by i
[Driver] -gsplit-dwarf: Produce .dwo regardless of -gN for IR input

This generalizes D94647 to IR input, as suggested by @tejohnson.
Ideally the driver should just forward split dwarf options, but doing this currently will cause `clang -gsplit-dwarf -c a.c` to create a .dwo with just `.strtab`.

Reviewed By: dblaikie, tejohnson

Differential Revision: https://reviews.llvm.org/D94655
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/split-debug.c
Commit 387d3c24792f7ab5f2f8aab37d64948f42523825 by craig.topper
[RISCV] Merge Utils library into MCTargetDesc

MCTargetDesc includes headers from Utils and Utils includes headers
from MCTargetDesc. So from a library layering perspective it makes sense
for them to be in the same library. I guess the other option might be to
move the tablegen includes from RISCVMCTargetDesc.h to RISCVBaseInfo.h
so that RISCVBaseInfo.h didn't need to include RISCVMCTargetDesc.h.
Everything else that depends on Utils also depends on MCTargetDesc so
having one library seemed simpler.

Differential Revision: https://reviews.llvm.org/D93168
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was removedllvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h
The file was addedllvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
The file was modifiedllvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
The file was addedllvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
The file was modifiedllvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
The file was addedllvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
The file was removedllvm/lib/Target/RISCV/Utils/CMakeLists.txt
The file was addedllvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h
The file was modifiedllvm/lib/Target/RISCV/CMakeLists.txt
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
The file was removedllvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
The file was removedllvm/lib/Target/RISCV/Utils/RISCVMatInt.h
The file was modifiedllvm/lib/Target/RISCV/RISCV.h
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
The file was modifiedllvm/lib/Target/RISCV/AsmParser/CMakeLists.txt
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp
The file was removedllvm/lib/Target/RISCV/Utils/RISCVMatInt.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetMachine.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVSubtarget.h
Commit c8fb6ee34151b18bcc9ed1a6b8f502a0b40a414e by riddleriver
[mlir][PatternRewriter] Add a new hook to selectively replace uses of an operation

This revision adds a new `replaceOpWithIf` hook that replaces uses of an operation that satisfy a given functor. If all uses are replaced, the operation gets erased in a similar manner to `replaceOp`. DialectConversion support will be added in a followup as this requires adjusting how replacements are tracked there.

Differential Revision: https://reviews.llvm.org/D94632
The file was modifiedmlir/lib/IR/PatternMatch.cpp
The file was addedmlir/test/Transforms/test-pattern-selective-replacement.mlir
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/lib/Transforms/Utils/DialectConversion.cpp
Commit 5cf2696317afb0631a4a09414ae40a4e226a905e by tpopp
[mlir] Remove TosaToLinalg dependency on all Passes

TosaToLinalg was depending on its header file indirectly through
Passes.h rather than directly. This removes that indirection.

Differential Revision: https://reviews.llvm.org/D94706
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
Commit a71877edfbb7094584f6d20d93f6091e7d374024 by adamcz
[clang] Do not crash when CXXRecordDecl has a non-CXXRecordDecl base.

This can happen on some invalid code, like the included test case.

Differential Revision: https://reviews.llvm.org/D94704
The file was modifiedclang/test/SemaTemplate/temp_class_spec.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
Commit e2d7d3cb0eade079690c3938f694c8f7ef2b686b by silvasean
[mlir][docs] Bring bufferization docs up to date.

This spilts out BufferDeallocationInternals.md, since buffer
deallocation is not part of bufferization per se.

Differential Revision: https://reviews.llvm.org/D94351
The file was addedmlir/docs/BufferDeallocationInternals.md
The file was modifiedmlir/docs/Bufferization.md
Commit 0f588ac03e15a204b68f0214dda2b9f67410ff62 by Jinsong Ji
[PowerPC] Only use some extend mne if assembler is modern enough

Legacy AIX assembly might not support all extended mnes,
add one feature bit to control the generation in MC,
and avoid generating them by default on AIX.

Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D94458
The file was modifiedllvm/lib/Target/PowerPC/PPC.td
The file was modifiedllvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/lib/Target/PowerPC/PPCSubtarget.h
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCTargetMachine.cpp
The file was addedllvm/test/MC/PowerPC/modern-aix-as.s
The file was modifiedllvm/lib/Target/PowerPC/PPCInstr64Bit.td
The file was modifiedllvm/lib/Target/PowerPC/PPCSubtarget.cpp
Commit 0975604cc013b51ef2435199bd74a6d635b11150 by thakis
[gn build] (manually) port 387d3c24792f
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/RISCV/MCTargetDesc/BUILD.gn
The file was removedllvm/utils/gn/secondary/llvm/lib/Target/RISCV/Utils/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/RISCV/Disassembler/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/RISCV/AsmParser/BUILD.gn
Commit e7228062b2bb87abf762abcb77668452a1ed35d4 by mcgrathr
[libc] Use #undef isascii in specific header

Standard C allows all standard headers to declare macros for all
their functions.  So after possibly including any standard header
like <ctype.h>, it's perfectly normal for any and all of the
functions it declares to be defined as macros.  Standard C requires
explicit `#undef` before using that identifier in a way that is not
compatible with function-like macro definitions.

The C standard's rules for this are extended to POSIX as well for
the interfaces it defines, and it's the expected norm for
nonstandard extensions declared by standard C library headers too.

So far the only place this has come up for llvm-libc's code is with
the isascii function in Fuchsia's libc.  But other cases can arise
for any standard (or common extension) function names that source
code in llvm-libc is using in nonstandard ways, i.e. as C++
identifiers.

The only correct and robust way to handle the possible inclusion of
standard C library headers when building llvm-libc source code is to
use `#undef` explicitly for each identifier before using it.  The
easy and obvious place to do that is in the per-function header.
This requires that all code, such as test code, that might include
any standard C library headers, e.g. via utils/UnitTest/Test.h, make
sure to include those *first* before the per-function header.

This change does that for isascii and its test.  But it should be
done uniformly for all the code and documented as a consistent
convention so new implementation files are sure to get this right.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D94642
The file was modifiedlibc/src/ctype/isascii.h
The file was modifiedlibc/test/src/ctype/isascii_test.cpp
The file was modifiedlibc/utils/UnitTest/FuchsiaTest.h
Commit f85b1531666d12e6ca9b29217b5c5da30dfd93cf by douglas.yung
Add -fexceptions to test as it uses them and fails on platforms where it is not on by default (like the PS4).
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/readability-function-cognitive-complexity.cpp
Commit b894a9fb237345db64d14ce3881d3195e124df0d by craig.topper
[RISCV] Optimize select_cc after fp compare expansion

Some FP compares expand to a sequence ending with (xor X, 1) to invert the result. If
the consumer is a select_cc we can likely get rid of this xor by fixing
up the select_cc condition.

This patch combines (select_cc (xor X, 1), 0, setne, trueV, falseV) -
(select_cc X, 0, seteq, trueV, falseV) if we can prove X is 0/1.

Reviewed By: lenary

Differential Revision: https://reviews.llvm.org/D94546
The file was modifiedllvm/test/CodeGen/RISCV/half-select-fcmp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/float-select-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/double-select-fcmp.ll
Commit 4fcb25583c3ccbe10c4367d02086269e5fa0bb87 by alexandre.ganea
Re-land [Support] On Windows, take the affinity mask into account

The number of hardware threads available to a ThreadPool can be limited if setting an affinity mask.
For example:

    > start /B /AFFINITY 0xF lld-link.exe ...

Would let LLD only use 4 hyper-threads.

Previously, there was an outstanding issue on Windows Server 2019 on dual-CPU machines, which was preventing from using both CPU sockets. In normal conditions, when no affinity mask was set, ProcessorGroup::AllThreads was different from ProcessorGroup::UsableThreads. The previous code in llvm/lib/Support/Windows/Threading.inc L201 was improperly assuming those two values to be equal, and consequently was limiting the execution to only one CPU socket.

Differential Revision: https://reviews.llvm.org/D92419
The file was modifiedllvm/include/llvm/Support/Program.h
The file was modifiedllvm/lib/Support/Windows/Program.inc
The file was modifiedllvm/lib/Support/Program.cpp
The file was modifiedllvm/lib/Support/Windows/Threading.inc
The file was modifiedllvm/unittests/Support/ThreadPool.cpp
The file was modifiedllvm/lib/Support/Unix/Program.inc
Commit 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144 by tejohnson
[LTO] Test format fix (NFC)

As requested in D91583, use ';;' instead of ';' to preceed comments in
lld test. I did this in the equivalent gold test as well.
The file was modifiedllvm/test/tools/gold/X86/devirt_vcall_vis_public.ll
The file was modifiedlld/test/ELF/lto/devirt_vcall_vis_public.ll
Commit 8a53a7375a86a5a89ba124de9e17aa5701544104 by selliott
[RISCV][NFC] Regenerate Calling Convention Tests

This regenerates these tests using utils/update_llc_test_checks.py so
that future changes in this area don't have the noise of lots of `@plt`
lines being added.

I also removed the `nounwind`s from the stack-realignment.ll test to
increase coverage on the generated call frame information.
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-ilp32d.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-lp64-lp64f-common.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-ilp32f-ilp32d-common.ll
The file was modifiedllvm/test/CodeGen/RISCV/vararg.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-lp64.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-ilp32-ilp32f-ilp32d-common.ll
The file was modifiedllvm/test/CodeGen/RISCV/callee-saved-fpr32s.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-lp64-lp64f-lp64d-common.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-ilp32-ilp32f-common.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-ilp32.ll
The file was modifiedllvm/test/CodeGen/RISCV/callee-saved-gprs.ll
The file was modifiedllvm/test/CodeGen/RISCV/callee-saved-fpr64s.ll
The file was modifiedllvm/test/CodeGen/RISCV/calling-conv-rv32f-ilp32.ll
The file was modifiedllvm/test/CodeGen/RISCV/stack-realignment.ll
Commit a55a0a3056b8163d9e709b534bd737730fbb5d44 by youngar17
[mlir] Remove over specified memory effects

The standard and gpu dialect both have `alloc` operations which use the
memory effect `MemAlloc`.  In both cases, it is specified on both  the
operation itself and on the result.  This results in two memory effects
being created for these operations.  When `MemAlloc` is defined on an
operation, it represents some background effect which the compiler
cannot reason about, and  inhibits the ability of the compiler to
remove dead `std.alloc` operations.  This change removes the uneeded
`MemAlloc` effect from these operations and leaves the effect on the
result, which allows dead allocs to be erased.

There is the same problem, but to a lesser extent, with MemFree, MemRead
and MemWrite. Over-specifying these traits is not currently inhibiting
any optimization.

Differential Revision: https://reviews.llvm.org/D94662
The file was modifiedmlir/test/Transforms/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Linalg/sparse_3d.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/test/Dialect/Linalg/sparse_2d.mlir
The file was modifiedmlir/test/Dialect/Linalg/sparse_1d.mlir
The file was modifiedmlir/docs/Interfaces.md
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
Commit 4183999e0fe1ffbc8bdb2f06f2e5f210a0c94e35 by sam.mccall
[clangd] Reduce logspam for CDB scanning
The file was modifiedclang-tools-extra/clangd/GlobalCompilationDatabase.cpp
Commit 722ae10907e06a0bafa00c557e5242b53419a3ce by ravishankarm
[mlir][Linalg] Add canonicalization to remove no-op linalg operations.

linalg.generic/indexed_generic operations on tensors whose body is
just yielding the (non-induction variable) arguments of the operation
can be canonicalized by replacing uses of the result with the
corresponding arguments.

Differential Revision: https://reviews.llvm.org/D94581
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit b21905dfe3797289791443661540b72cb43dfdf3 by spatel
[SLP] remove unnecessary state in matching reductions

This is NFC-intended. I'm still trying to figure out
how the loop where this is used works. It does not
seem like we require this data at all, but it's
hard to confirm given the complicated predicates.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 547b032ccc8e1da5d1716afeb0afa8988e129fd0 by tianshilei1992
[OpenMP] Remove omptarget-nvptx from deps as it is no longer a valid target

`omptarget-nvptx` is still a dependence for `check-libomptarget-nvtpx`
although it has been removed by D94573.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D94725
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/test/CMakeLists.txt
Commit 774c9c6ef3addc735939a388965a0a694bbd4f57 by ravishankarm
[mlir][Linalg] Add canonicalization of linalg op -> dim op.

Add canonicalization to replace use of the result of a linalg
operation on tensors in a dim operation, to use one of the operands of
the linalg operations instead. This allows the linalg op itself to be
deleted when all its non-dim uses are removed (say through tiling, etc.)

Differential Revision: https://reviews.llvm.org/D93076
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
The file was modifiedmlir/include/mlir/IR/AffineExprVisitor.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
Commit 42444d0cf0c9cf92f89acf16f11f3b7242d81619 by ravishankarm
[mlir][Linalg] NFC: Verify tiling on linalg.generic operation on tensors.

With the recent changes to linalg on tensor semantics, the tiling
operations works out-of-the-box for generic operations. Add a test to
verify that and some minor refactoring.

Differential Revision: https://reviews.llvm.org/D93077
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/test/Dialect/Linalg/tile-tensors.mlir
The file was modifiedmlir/include/mlir/IR/AffineMap.h
Commit 6e7094c14b22a202c15959316033c164d7a84122 by jonathanchesterfield
[libomptarget][nvptx][nfc] Move target_impl functions out of header

[libomptarget][nvptx][nfc] Move target_impl functions out of header

This removes most of the differences between the two target_impl.h.

Also change name mangling from C to C++ for __kmpc_impl_*_lock.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D94728
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
Commit d6acf3c2012b00f06a422e8704609676be7729b2 by tkeith
[flang] Fix use-associated procedure in generic

When a use-associated procedure was included in a generic, we weren't
correctly recording that fact. The ultimate symbol was added rather than
the local symbol.

Also, improve the message emitted for the specific procedure by
mentioning the module it came from.

This fixes one of the problems in https://bugs.llvm.org/show_bug.cgi?id=48648.

Differential Revision: https://reviews.llvm.org/D94696
The file was modifiedflang/test/Semantics/resolve53.f90
The file was modifiedflang/test/Semantics/modfile07.f90
The file was modifiedflang/lib/Semantics/resolve-names.cpp
Commit 036bc798f2ae4d266fe01e70778afe0b3381c088 by Amara Emerson
[AArch64][GlobalISel] Assign FPR banks to loads which are used by integer->float conversions.

G_[US]ITOFP users of loads on AArch64 can operate on both gpr and fpr banks for scalars.
Because of this, if their source is a load, then that load can be assigned to an fpr
bank and therefore avoid having to do a cross bank copy via a gpr->fpr conversion.

Differential Revision: https://reviews.llvm.org/D94701
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/regbank-fp-use-def.mir
Commit 9dfeec853008109b1cbe926c22675c96226040d9 by jiancai
Reland "[AsmParser] make .ascii support spaces as separators"

This relands commit e0963ae274be5b071d1e1b00f5e4e019483c09e9, which was
reverted on commit 82c4153e66fa284729da86a8d6c302d4b8cec86c due to a
test failure, which turned out to be a false positive.
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
The file was modifiedllvm/test/MC/AsmParser/directive_ascii.s
Commit 214387c2c694c92fec713f7ad224f10c1aebc1cf by jonathanchesterfield
[libomptarget][nvptx] Reduce calls to cuda header

[libomptarget][nvptx] Reduce calls to cuda header

Remove use of clock_t in favour of a builtin. Drop a preprocessor branch.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D94731
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
Commit 1fabe6e51917bcd7a1242294069c682fe6dffa45 by yitzhakm
[libTooling] Change `addInclude` to use expansion locs.

This patch changes the default range used to anchor the include insertion to use
an expansion loc.  This ensures that the location is valid, when the user relies
on the default range.

Driveby: extend a FIXME for a problem that was emphasized by this change; fix some spellings.

Differential Revision: https://reviews.llvm.org/D93703
The file was modifiedclang/include/clang/Tooling/Transformer/RewriteRule.h
The file was modifiedclang/lib/Tooling/Transformer/RewriteRule.cpp
Commit 8f283cafddfa8d6d01a94b48cdc5d25817569e91 by Amara Emerson
[AArch64][GlobalISel] Add selection support for fpr bank source variants of G_SITOFP and G_UITOFP.

In order to import patterns for these, we need to define new ops that can map to
the AArch64ISD::[SU]ITOF nodes. We then transform fpr->fpr variants of the generic
opcodes to these custom opcodes in preisel-lowering. We have to do it here and
not the PostLegalizer combiner because this has to run after regbankselect.

Differential Revision: https://reviews.llvm.org/D94702
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrGISel.td
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fp-casts.mir
Commit 2423ec583761304f93b5d01493a26aeb11cb5b8f by chennngwang
[libc] Add memmove implementation.

Use `memcpy` rather than copying bytes one by one, for there might be large
size structs to move.

Reviewed By: gchatelet, sivachandra

Differential Revision: https://reviews.llvm.org/D93195
The file was addedlibc/test/src/string/memmove_test.cpp
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was modifiedlibc/test/src/string/CMakeLists.txt
The file was addedlibc/src/string/memmove.cpp
The file was addedlibc/src/string/memmove.h
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
Commit 9bcc0d1040ddd63b7f82e309c0d5feb4e0c9005e by kazu
[CodeGen, Transforms] Use llvm::sort (NFC)
The file was modifiedllvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
The file was modifiedllvm/lib/Transforms/Scalar/ConstraintElimination.cpp
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
The file was modifiedllvm/lib/CodeGen/RegAllocFast.cpp
The file was modifiedllvm/lib/CodeGen/RDFLiveness.cpp
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedllvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
Commit 2efcbe24a75b2a9ff6d59d242f560dca96e5f7e0 by kazu
[llvm] Use llvm::drop_begin (NFC)
The file was modifiedllvm/lib/Analysis/LazyCallGraph.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86MCInstLower.cpp
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
The file was modifiedllvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
The file was modifiedllvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp
The file was modifiedllvm/tools/llvm-xray/xray-stacks.cpp
The file was modifiedllvm/lib/Analysis/ModuleSummaryAnalysis.cpp
The file was modifiedllvm/lib/Analysis/VFABIDemangling.cpp
The file was modifiedllvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
Commit 7dc3575ef2dc85d92aa3ad916d0eb73a0aa088c9 by kazu
[llvm] Remove redundant return and continue statements (NFC)

Identified with readability-redundant-control-flow.
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/lib/Transforms/IPO/IROutliner.cpp
The file was modifiedllvm/include/llvm/CodeGen/LiveRegUnits.h
The file was modifiedllvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
The file was modifiedllvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/tools/llvm-profdata/llvm-profdata.cpp
The file was modifiedllvm/lib/TextAPI/MachO/InterfaceFile.cpp
The file was modifiedllvm/utils/TableGen/X86FoldTablesEmitter.cpp
The file was modifiedllvm/lib/Target/X86/X86IndirectThunks.cpp
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
The file was modifiedllvm/lib/Support/Unix/Path.inc
The file was modifiedllvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
The file was modifiedllvm/lib/FileCheck/FileCheck.cpp
The file was modifiedllvm/lib/CodeGen/MachinePipeliner.cpp
The file was modifiedllvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
The file was modifiedllvm/lib/Demangle/MicrosoftDemangleNodes.cpp
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
The file was modifiedllvm/tools/llvm-mca/CodeRegion.cpp
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86FlagsCopyLowering.cpp
The file was modifiedllvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
The file was modifiedllvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
Commit 39665d9aabb7cd92d58f8ba45b32a1899922ec01 by yhegde
Add Semantic check for Flang OpenMP 4.5 - 2.7.1  Do Loop restrictions on single directive and firstprivate clause.

Semantic checks added to check the worksharing 'single' region closely nested inside a worksharing 'do' region. And also to check whether the 'do' iteration variable is a variable in 'Firstprivate' clause.

Files:
check-directive-structure.h
check-omp-structure.h
check-omp-structure.cpp

Testcases:
omp-do01-positivecase.f90
omp-do01.f90
omp-do05-positivecase.f90
omp-do05.f90

Reviewed by: Kiran Chandramohan @kiranchandramohan , Valentin Clement @clementval

Differential Revision: https://reviews.llvm.org/D93205
The file was modifiedflang/test/Semantics/omp-do01.f90
The file was modifiedflang/test/Semantics/omp-do05.f90
The file was modifiedflang/lib/Semantics/check-directive-structure.h
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was addedflang/test/Semantics/omp-do05-positivecase.f90
The file was modifiedflang/lib/Semantics/check-omp-structure.h
The file was addedflang/test/Semantics/omp-do01-positivecase.f90
Commit 5508516b06633e95fb5c2d6a5e196e4dcaa72c8d by ajcbik
[mlir][sparse] retry sparse-only for cyclic iteration graphs

This is a very minor improvement during iteration graph construction.
If the first attempt considering the dimension order of all tensors fails,
a second attempt is made using the constraints of sparse tensors only.
Dense tensors prefer dimension order (locality) but provide random access
if needed, enabling the compilation of more sparse kernels.

Reviewed By: penpornk

Differential Revision: https://reviews.llvm.org/D94709
The file was addedmlir/test/Dialect/Linalg/sparse_nd.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
Commit c495dfe0268bc2be8737725d657411baa1399e9d by Jan Svoboda
[clang][cli] NFC: Decrease the scope of ParseLangArgs parameters

Instead of passing the whole `TargetOptions` and `PreprocessorOptions` to `ParseLangArgs` give it only the necessary members.
This makes tracking the dependencies between various parsers and option groups easier.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94674
The file was modifiedclang/include/clang/Frontend/CompilerInvocation.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 1a49944b59dbbfd62bd860b564919087f274a5bf by Jan Svoboda
[clang][cli] NFC: Decrease the scope of ParseCodeGenArgs parameters

Instead of passing the whole `TargetOptions` and `FrontendOptions` to `ParseCodeGenArgs` give it only the necessary members.
This makes tracking the dependencies between various parsers and option groups easier.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94675
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit b6575bfd0eeb5a364dd2e4f4a2e461679da1f8a9 by Jan Svoboda
[clang][cli] Specify KeyPath prefixes via TableGen classes

It turns out we need to handle `LangOptions` separately from the rest of the options. `LangOptions` used to be conditionally parsed only when `!(DashX.getFormat() == InputKind::Precompiled || DashX.getLanguage() == Language::LLVM_IR)` and we need to restore this order (for more info, see D94682).

We could do this similarly to how `DiagnosticOptions` are handled: via a counterpart to the `IsDiag` mix-in (e.g. `IsLang`). These mix-ins would prefix the option key path with the appropriate `CompilerInvocation::XxxOpts` member. However, this solution would be problematic, as we'd now have two kinds of options (`Lang` and `Diag`) with seemingly incomplete key paths in the same file. To understand what `CompilerInvocation` member an option affects, one would need to read the whole option definition and notice the `IsDiag` or `IsLang` class.

Instead, this patch introduces more robust way to handle different kinds of options separately: via the `KeyPathAndMacroPrefix` class. We have one specialization of that class per `CompilerInvocation` member (e.g. `LangOpts`, `DiagnosticOpts`, etc.). Now, instead of specifying a key path with `"LangOpts->UndefPrefixes"`, we use `LangOpts<"UndefPrefixes">`. This keeps the readability intact (you don't have to look for the `IsLang` mix-in, the key path is complete on its own) and allows us to specify a custom macro prefix within `LangOpts`.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94676
The file was modifiedllvm/include/llvm/Option/OptParser.td
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedllvm/unittests/Option/OptionMarshallingTest.cpp
The file was modifiedllvm/unittests/Option/Opts.td
The file was modifiedclang/include/clang/Driver/Options.td
Commit b54337070b198cf66356a4ee3e420666151a2023 by t-kawashima
[AArch64] Add Fujitsu A64FX scheduling model

Basic support of A64FX was added in D75594 but its scheduling model
was missing. This commit adds the scheduling model. Also, this commit
amends/adds some subtarget parameters of A64FX.

The A64FX Microarchitecture Manual, which is source information of
this commit, is on GitHub.

https://github.com/fujitsu/A64FX/

Differential Revision: https://reviews.llvm.org/D93791
The file was modifiedllvm/lib/Target/AArch64/AArch64.td
The file was modifiedllvm/test/CodeGen/AArch64/preferred-function-alignment.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.cpp
The file was modifiedllvm/test/CodeGen/AArch64/machine-combiner-madd.ll
The file was addedllvm/lib/Target/AArch64/AArch64SchedA64FX.td
Commit 38dfce706f796dc109ea495dd69a8cb4c8fa819d by wingo
[WebAssembly] Add support for table linking to wasm-ld

This patch adds support to wasm-ld for linking multiple table references
together, in a manner similar to wasm globals. The indirect function
table is synthesized as needed.

To manage the transitional period in which the compiler doesn't yet
produce TABLE_NUMBER relocations and doesn't residualize table symbols,
the linker will detect object files which have table imports or
definitions, but no table symbols. In that case it will synthesize
symbols for the defined and imported tables.

As a change, relocatable objects are now written with table symbols,
which can cause symbol renumbering in some of the tests. If no object
file requires an indirect function table, none will be written to the
file. Note that for legacy ObjFile inputs, this test is conservative: as
we don't have relocs for each use of the indirecy function table, we
just assume that any incoming indirect function table should be
propagated to the output.

Differential Revision: https://reviews.llvm.org/D91870
The file was modifiedlld/test/wasm/shared.ll
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedlld/test/wasm/local-symbols.ll
The file was modifiedlld/wasm/SymbolTable.cpp
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/test/wasm/section-symbol-relocs.yaml
The file was modifiedlld/wasm/MarkLive.cpp
The file was modifiedlld/test/wasm/init-fini.ll
The file was modifiedlld/wasm/SyntheticSections.h
The file was modifiedlld/test/wasm/pie.ll
The file was modifiedlld/test/wasm/signature-mismatch.ll
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/test/wasm/alias.s
The file was modifiedlld/wasm/SymbolTable.h
The file was modifiedlld/test/wasm/stack-pointer.ll
The file was modifiedlld/test/wasm/locals-duplicate.test
The file was modifiedlld/wasm/Symbols.h
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/test/wasm/weak-alias.ll
The file was modifiedlld/wasm/InputFiles.h
The file was modifiedlld/wasm/Writer.cpp
Commit 33be50daa9ce1074c3b423a4ab27c70c0722113a by nikita.ppv
Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and single-element insert""

This reverts commit 260a856c2abcef49c7cb3bdcd999701db3e2af38.
This reverts commit 3043e5a5c33c4c871f4a1dfd621a8839f9a1f0b3.
This reverts commit 49142991a685bd427d7e877c29c77371dfb7634c.

This change had a larger than anticipated compile-time impact,
possibly because the small value optimization is not working as
intended. See D93779.
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
Commit 168be4208304e36d3bb156b5c413b340a391383e by qiucofan
[Clang] Mutate long-double math builtins into f128 under IEEE-quad

Under -mabi=ieeelongdouble on PowerPC, IEEE-quad floating point semantic
is used for long double. This patch mutates call to related builtins
into f128 version on PowerPC. And in theory, this should be applied to
other targets when their backend supports IEEE 128-bit style libcalls.

GCC already has these mutations except nansl, which is not available on
PowerPC along with other variants (nans, nansf).

Reviewed By: RKSimon, nemanjai

Differential Revision: https://reviews.llvm.org/D92080
The file was modifiedclang/test/CodeGen/math-builtins-long.c
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 1185d3f43d2186fa9291fe7779abf48d9b962ef4 by grimar
[llvm-readobj] - Fix the compilation with GCC < 7.0.

This addressed post commit comments for D93900.

GCC had an issue and requires placing a specialization of
`printUnwindInfo` to a namespace to compile:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 89e84dec1879417fb7eb96edaa55dac7eca204ab by Amara Emerson
[AArch64][GlobalISel] Fix fallbacks introduced for G_SITOFP in 8f283cafddfa8d6d01a94b48cdc5d25817569e91

If we have an integer->fp convert that has differing sizes, e.g. s32 to s64,
then don't try to convert it to AArch64::G_SITOF since it won't select.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fp-casts.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit 78036360573c35ea9e6a697d2eed92db893b4850 by ikudrin
[libcxx testing] Fix UB in tests for std::lock_guard

If mutex::try_lock() is called in a thread that already owns the mutex,
the behavior is undefined. The patch fixes the issue by creating another
thread, where the call is allowed.

Differential Revision: https://reviews.llvm.org/D94656
The file was modifiedlibcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp
Commit 104a9f99ccab9d6dbc07a70f569246c23feaf4c1 by AlokKumar.Sharma
[Debuginfo][DW_OP_implicit_pointer] (1/7) Support for DW_OP_LLVM_implicit_pointer

New dwarf operator DW_OP_LLVM_implicit_pointer is introduced (present only in LLVM IR)
This operator is required as it is different than DWARF operator
DW_OP_implicit_pointer in representation and specification (number
and types of operands) and later can not be used as multiple level.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D84113
The file was modifiedllvm/lib/BinaryFormat/Dwarf.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Dwarf.h
The file was modifiedllvm/lib/IR/DebugInfoMetadata.cpp
The file was modifiedllvm/docs/LangRef.rst
The file was addedllvm/test/DebugInfo/X86/LLVM_implicit_pointer.ll
Commit bfb8f45ef3f46102d290f11039faa82456c920ae by grimar
[llvm-nm] - Move MachO specific logic out from the dumpSymbolNamesFromObject(). NFC.

`dumpSymbolNamesFromObject` is the method that dumps symbol names.

It has 563 lines, mostly because of huge piece of MachO specific code.
In this patch I move it to separate helper method.

The new size of `dumpSymbolNamesFromObject` is 93 lines. With it it becomes
much easier to maintain it.

I had to change the type of 2 name fields to `std::string`, because MachO logic
uses temporarily buffer strings (e.g `ExportsNameBuffer`, `BindsNameBuffer` etc):

```
  std::string ExportsNameBuffer;
  raw_string_ostream EOS(ExportsNameBuffer);
```

these buffers were moved to `dumpSymbolsFromDLInfoMachO` by this patch and
invalidated after return. Technically, before this patch we had a situation
when local pointers (symbol names) were assigned to members of global static `SymbolList`,
what is dirty by itself.

Differential revision: https://reviews.llvm.org/D94667
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
Commit a10300a2b27c426556f9266364337d5d546a3c14 by gchatelet
[libc] Allow customization of memcpy via flags.

- Adds LLVM_LIBC_IS_DEFINED macro to libc/src/__support/common.h
- Adds a few knobs to memcpy to help with experimentations:
   - LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB replaces the implementation with a single call to rep;movsb
   - LLVM_LIBC_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE customizes where the usage of rep;movsb

Differential Revision: https://reviews.llvm.org/D94692
The file was modifiedlibc/src/string/x86/memcpy.cpp
The file was modifiedlibc/src/__support/common.h
Commit 021ea78a97ed8f4796d92a61cdf62284def36f1e by grimar
[llvm-nm] - Simplify the code in dumpSymbolNamesFromObject. NFC.

It is possible to simplify the logic that extracts symbol names.

D94667 made the `NMSymbol::Name` to be `std::string`,
what allowed this simplification.

Differential revision: https://reviews.llvm.org/D94669
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
Commit 3676ef105389f0a8fd7d0efa1477adc209f0b486 by oliver.stannard
[ARM][GISel] Treat calls as variadic even if only fixed arguments provided

For the ARM hard-float calling convention, calls to variadic functions
need to be treated diffrently, even if only the fixed arguments are
provided.

This fixes GCC-C-execute-pr68390 in the test-suite, which is failing on
the ARM GlobaISel bot.
The file was modifiedllvm/test/CodeGen/ARM/GlobalISel/irtranslator-varargs-lowering.ll
The file was modifiedllvm/lib/Target/ARM/ARMCallLowering.cpp
Commit d9afe8588e49f1a2779ab1fe7ff2ec39e8d080fd by grimar
[yaml2obj/obj2yaml] - Refine handling of SHT_GNU_verdef sections.

This patch:
1) Makes `Version`, `Flags`, `VersionNdx` and `Hash` fields to be `Optional<>`.
2) Disallows dumping version definitions that have `vd_version != 1`.
   `vd_version` identifies the version of the structure itself.
   (https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html,
    https://docs.oracle.com/cd/E19683-01/816-7777/chapter6-80869/index.html)
3) Stops dumping default values for `Version`, `Flags`, `VersionNdx` and `Hash` fields.
4) Refines testing.

Differential revision: https://reviews.llvm.org/D94659
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/test/tools/obj2yaml/ELF/verdef-section.yaml
The file was modifiedllvm/test/tools/yaml2obj/ELF/verdef-section.yaml
The file was modifiedllvm/tools/obj2yaml/elf2yaml.cpp
Commit 45ef053bd70952d35e9bea58fc4af11d6e507ce2 by grimar
[llvm-readobj][test] - Remove excessive YAML fields from tests.

This removes excessive YAML keys from `SHT_GNU_verdef` sections.
Those keys are set by default.

Differential revision: https://reviews.llvm.org/D94660
The file was modifiedllvm/test/tools/llvm-readobj/ELF/verdef-invalid.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/versioninfo.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
Commit 9cc221b99becf20397d935981eeb48cba5be7faf by ilya.golovenko
[clangd] exclude symbols from document outline which do not originate from the main file

Differential Revision: https://reviews.llvm.org/D94753
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
The file was modifiedclang-tools-extra/clangd/FindSymbols.cpp
Commit 4fd77668b2cc215f0605fe20bb989b90b29f4346 by omair.javaid
[LLDB] Add per-thread register infos shared pointer in gdb-remote

In gdb-remote process we have register infos defind as a refernce object of
GDBRemoteDynamicRegisterInfo class. In past register infos have remained
constant througout the life time of a process.

This has changed after AArch64 SVE support where register infos will have
per-thread configuration. SVE registers will have per-thread size and can
be updated while running. This patch aims to build up for that support by
changing GDBRemoteDynamicRegisterInfo reference to a shared pointer deinfed
per-thread.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D82857
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h
Commit b9993fcbf53aa28ca2e7696a1855affeb558b51c by omair.javaid
DynamicRegisterInfo calculate offsets in separate function

This patch pull offset calculation logic out of DynamicRegisterInfo::Finalize
into a separate function. We are going to call this function whenever we
update SVE register sizes.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D94008
The file was modifiedlldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h
Commit 141e45b99ca09235b985504e8108dbb3cf210fbd by selliott
[RISCV] Optimize Branch Comparisons

I noticed in D94450 that there were quite a few places where we generate
the sequence:
```
  xN <- comparison ...
  xN <- xor xN, 1
  bnez xN, symbol
```

Given we know the XOR will be used by BRCOND, which only looks at the lowest
bit, I think we can remove the XOR and just invert the branch condition in
these cases?

The case mostly seems to come up in floating point tests, where there is often
more logic to combine the results of multiple SETCCs, rather than a single
(BRCOND (SETCC ...) ...).

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D94535
The file was modifiedllvm/test/CodeGen/RISCV/double-br-fcmp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.td
The file was modifiedllvm/test/CodeGen/RISCV/float-br-fcmp.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-br-fcmp.ll
Commit 2b8db40c92186731effd8948049919db8cf37dee by paul.walker
[SVE] Restrict the usage of REINTERPRET_CAST.

In order to limit the number of combinations of REINTERPRET_CAST,
whilst at the same time prevent overlap with BITCAST, this patch
establishes the following rules:

1. The operand and result element types must be the same.
2. The operand and/or result type must be an unpacked type.

Differential Revision: https://reviews.llvm.org/D94593
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit a5eb9df1e3ba0a1c5d755f29f6f4cdcca4aec285 by Stefan Gränitz
[Orc][NFC] Turn LLJIT member ObjTransformLayer into unique_ptr

All other layers in LLJIT are stored as unique_ptr's already. At this point, it is not strictly necessary for ObjTransformLayer, but it makes a follow-up change more straightforward.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D94689
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
Commit cf905274c6f4ec119fdb06a283070dcae4ed5881 by Stefan Gränitz
[Orc] Allow LLJITBuilder's CreateObjectLinkingLayer to return errors

It can be useful for an ObjectLinkingLayerCreator to allow callee errors to get propagated to the builder. Specifically, this is the case when the ObjectLayer uses the EHFrameRegistrationPlugin, because it requires a TPCEHFrameRegistrar and instantiation for it may fail (e.g. if the required registration symbols are missing in the target process).

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D94690
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp
Commit 619eb14775990d610236288f414a486d86df47cc by kai.wang
[NFC][RISCV] Remove useless code in RISCVRegisterInfo.td.

Differential Revision: https://reviews.llvm.org/D94750
The file was modifiedllvm/lib/Target/RISCV/RISCVRegisterInfo.td
Commit bab121a1b66e85390cad019ec921febcba35519d by Raphael Isemann
[lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference

Currently LLDB uses epydoc to generate the Python API reference for the website.
epydoc however is unmaintained since more than a decade and no longer works with
Python 3. Also whatever setup we had once for generating the documentation on
the website server no longer seems to work, so the current website documentation
has been stale since more than a year.

This patch replaces epydoc with sphinx and its automodapi plugin that can
generate Python API references. LLVM already uses sphinx for the rest of the
documentation, so this way we are more consistent with the rest of LLVM. The
only new dependency is the automodapi plugin for sphinx.

This patch effectively does the following things:
* Remove the epydoc code.
* Make a new dummy Python API page in our website that just calls the Sphinx
  command for generated the API documentation.
* Add a mock _lldb module that is only used when generating the Python API.
This way we don't have to build all of LLDB to generate the API reference.

Some notes:
* The long list of skips is necessary due to boilerplate functions that SWIG
  is generating. Sadly automodapi is not really scriptable from what I can see,
  so we have to blacklist this stuff manually.
* The .gitignore change because automodapi wants a subfolder of our
  documentation directory to place generated documentation files there. The path
  is also what is used on the website, so we can't really workaround this
  (without copying the whole `docs` dir somewhere else when we build).
* We have to use environment variables to pass our build path to our sphinx
  configuration. Sphinx doesn't support passing variables onto that script.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D94489
The file was modifiedlldb/docs/conf.py
The file was modifiedllvm/cmake/modules/AddSphinxTarget.cmake
The file was modified.gitignore
The file was addedlldb/docs/python_api.rst
The file was modifiedlldb/docs/index.rst
The file was modifiedlldb/docs/CMakeLists.txt
The file was addedlldb/docs/_lldb/__init__.py
Commit 6edc3fe598aff04f9c1de6cc2ac97950b73b832d by Stefan Gränitz
[Orc] Fix OrcV2Examples after D94690

Differential Revision: https://reviews.llvm.org/D94690
The file was modifiedllvm/examples/OrcV2Examples/LLJITDumpObjects/LLJITDumpObjects.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp
Commit 9d2053f61aacc4d78f4f238cbc0edb215b096b70 by Raphael Isemann
Revert "[lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference"

This reverts commit bab121a1b66e85390cad019ec921febcba35519d. It seems the
docs buildbot doesn't have the required Python headers.
The file was modifiedlldb/docs/index.rst
The file was modifiedlldb/docs/CMakeLists.txt
The file was modifiedlldb/docs/conf.py
The file was removedlldb/docs/python_api.rst
The file was modified.gitignore
The file was modifiedllvm/cmake/modules/AddSphinxTarget.cmake
The file was removedlldb/docs/_lldb/__init__.py
Commit aeaeb9e6bdc90d9c4b839ac0e4edc6255021cced by adamcz
[clangd] Make ExpandAutoType not available on template params.

We cannot expand auto when used inside a template param (C++17 feature),
so do not offer it there.

Differential Revision: https://reviews.llvm.org/D94719
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
The file was modifiedclang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp
Commit c77c3d1d18cdd58989f9d35bbf6c31f5fda0a125 by adamcz
[clangd] Set correct CWD when using compile_flags.txt

This fixes a bug where clangd would attempt to set CWD to the
compile_flags.txt file itself.

Differential Revision: https://reviews.llvm.org/D94699
The file was modifiedclang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp
The file was modifiedclang-tools-extra/clangd/GlobalCompilationDatabase.cpp
Commit 4017c6fe7f11db5f266306bcd504690be586620a by Raphael Isemann
[lldb][docs] Translate ASCII art to restructured text formatting

This translates most of the old ASCII art in our documentation to the
equivalent in restructured text (which the new version of the LLDB docs
is using).
The file was modifiedlldb/bindings/interface/SBCommandReturnObject.i
The file was modifiedlldb/bindings/interface/SBTarget.i
The file was modifiedlldb/bindings/interface/SBError.i
The file was modifiedlldb/bindings/interface/SBListener.i
The file was modifiedlldb/bindings/interface/SBModule.i
The file was modifiedlldb/bindings/interface/SBSymbolContext.i
The file was modifiedlldb/bindings/interface/SBCommandInterpreterRunOptions.i
The file was modifiedlldb/bindings/interface/SBCompileUnit.i
The file was modifiedlldb/bindings/python/python.swig
The file was modifiedlldb/bindings/interface/SBFileSpec.i
The file was modifiedlldb/bindings/interface/SBFunction.i
The file was modifiedlldb/bindings/interface/SBCommandInterpreter.i
The file was modifiedlldb/bindings/interface/SBEvent.i
The file was modifiedlldb/bindings/interface/SBSymbolContextList.i
The file was modifiedlldb/bindings/interface/SBInstructionList.i
The file was modifiedlldb/bindings/interface/SBValueList.i
The file was modifiedlldb/bindings/interface/SBPlatform.i
The file was modifiedlldb/bindings/interface/SBType.i
The file was modifiedlldb/bindings/interface/SBEnvironment.i
The file was modifiedlldb/bindings/interface/SBLineEntry.i
The file was modifiedlldb/bindings/python/python-extensions.swig
The file was modifiedlldb/bindings/interface/SBThread.i
The file was modifiedlldb/bindings/interface/SBAddress.i
The file was modifiedlldb/bindings/interface/SBSymbol.i
The file was modifiedlldb/bindings/interface/SBBreakpointLocation.i
The file was modifiedlldb/bindings/interface/SBSection.i
The file was modifiedlldb/bindings/interface/SBFrame.i
The file was modifiedlldb/bindings/interface/SBBreakpoint.i
The file was modifiedlldb/bindings/interface/SBWatchpoint.i
The file was modifiedlldb/bindings/interface/SBValue.i
The file was modifiedlldb/bindings/interface/SBStream.i
The file was modifiedlldb/bindings/interface/SBTypeEnumMember.i
The file was modifiedlldb/bindings/interface/SBBreakpointName.i
The file was modifiedlldb/bindings/interface/SBProcess.i
The file was modifiedlldb/bindings/interface/SBSourceManager.i
Commit 1dfd5c9ad8cf677fb4c9c3ccf39d7b1f20c397d3 by llvm-dev
[X86][AVX] combineHorizOpWithShuffle - support target shuffles in HOP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y))

Be more aggressive on (AVX2+) folds of lane shuffles of 256-bit horizontal ops by working on target/faux shuffles as well.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/haddsub-undef.ll
The file was modifiedllvm/test/CodeGen/X86/haddsub-2.ll
Commit e9f1ed2306b1b3aedcb1acef2b50e252a77a04b9 by wingo
[WebAssembly] MC layer writes table symbols to object files

Now that the linker handles table symbols, we can allow the frontend to
produce them.

Depends on D91870.

Differential Revision: https://reviews.llvm.org/D92215
The file was modifiedllvm/test/MC/WebAssembly/debug-info64.ll
The file was modifiedllvm/test/MC/WebAssembly/weak-alias.s
The file was modifiedllvm/test/MC/WebAssembly/reloc-pic.s
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedllvm/test/MC/WebAssembly/type-index.s
The file was modifiedllvm/test/MC/WebAssembly/function-alias.ll
The file was modifiedllvm/test/MC/WebAssembly/global-ctor-dtor.ll
The file was modifiedllvm/test/MC/WebAssembly/debug-info.ll
Commit 5e4480b6c0f02beef5ca7f62c3427031872fcd52 by samuel.tebbs
[ARM] Don't run the block placement pass at O0

The block placement pass shouldn't run unless optimisations are enabled.

Differential Revision: https://reviews.llvm.org/D94691
The file was modifiedllvm/lib/Target/ARM/ARMBlockPlacement.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetMachine.cpp
Commit 0acc260b574e28f5247e8ad4d8c9805b8005c841 by antiagainst
[mlir][linalg] Support generating builders for named op attributes

This commit adds support to generate an additional builder for
each named op that has attributes. This gives better experience
when creating the named ops.

Along the way adds support for i64.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D94733
The file was modifiedmlir/test/mlir-linalg-ods-gen/test-linalg-ods-gen.tc
The file was modifiedmlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
Commit 061d1520858a6e394663e12cc715ddfe3ab0240d by herhut
[SVE] Fix unused variable.

Introduced by [SVE] Restrict the usage of REINTERPRET_CAST.

Differential Revision: https://reviews.llvm.org/D94773
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit d1862a16310379179a40b309a9721318ae7e3254 by anastasia.stulova
[OpenCL][Docs] Fixed malformed table in OpenCLSupport

Tags: #clang
The file was modifiedclang/docs/OpenCLSupport.rst
Commit 791634b999e33e029aeeda91eeb5fae13757dcdc by Jan Svoboda
[clang][cli] Parse & generate options necessary for LangOptions defaults manually

It turns out we need to handle `LangOptions` separately from the rest of the options. `LangOptions` used to be conditionally parsed only when `!(DashX.getFormat() == InputKind::Precompiled || DashX.getLanguage() == Language::LLVM_IR)` and we need to restore this order (for more info, see D94682).

D94682 moves the parsing of marshalled `LangOpts` from `parseSimpleArgs` back to `ParseLangArgs`.

We need to parse marshalled `LangOpts` **after** `ParseLangArgs` calls `setLangDefaults`. This will enable future patches, where values of some `LangOpts` depend on the defaults.

However, two language options (`-finclude-default-header` and `-fdeclare-opencl-builtins`) need to be parsed **before** `ParseLangArgs` calls `setLangDefaults`, because they are necessary for setting up OpenCL defaults correctly.
This patch implements this by removing their marshalling info and manually parsing (and generating) them exactly where necessary.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94678
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 5183a13d37825f93d92c23c257dbb1c994098bdc by llvm-dev
[X86] Add umin knownbits/demandedbits ult test for D94532
The file was modifiedllvm/test/CodeGen/X86/combine-umin.ll
Commit 17d0fb7f574ebc8a6449382983d91715b6977c32 by schmeise
Set option default for enabling memory ssa for new pass manager loop sink pass to true.
Summary:
Set the default for the option enabling memory ssa use in the loop sink
pass to true for the new pass manager.
Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: asbirlea (Alina Sbirlea)
Differential Revision: https://reviews.llvm.org/D92486
The file was modifiedllvm/lib/Transforms/Scalar/LoopSink.cpp
Commit 46aa3c6c331c20b8a4c358488fefab96f944e814 by llvm-dev
[DAG] visitVECTOR_SHUFFLE - MergeInnerShuffle - improve shuffle(shuffle(x,y),shuffle(x,y)) merging

MergeInnerShuffle currently attempts to merge shuffle(shuffle(x,y),z) patterns into a single shuffle, using 1 or 2 of the x,y,z ops.

However if we already match 2 ops we might be able to handle the third op if its also a shuffle that references one of the previous ops, allowing us to handle some cases like:

shuffle(shuffle(x,y),shuffle(x,y))
shuffle(shuffle(shuffle(x,z),y),z)
shuffle(shuffle(x,shuffle(x,y)),z)
etc.

This isn't an exhaustive match and is dependent on the order the candidate ops are encountered - if one of the matched ops was a shuffle that was peek-able we don't go back and try to split that, I haven't found much need for that amount of analysis yet.

This is a preliminary patch that will allow us to later improve x86 HADD/HSUB matching - but needs to be reviewed separately as its in generic code and affects existing Thumb2 tests.

Differential Revision: https://reviews.llvm.org/D94671
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vst2.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmull-loop.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit cf0173de69a760d1b17f8ef5b2c3b4f2b6f58966 by clementval
[mlir] Add better support for f80 and f128

Add builtin f80 and f128 following @schweitz proposition
https://llvm.discourse.group/t/rfc-adding-better-support-for-higher-precision-floating-point/2526/5

Reviewed By: ftynse, rriddle

Differential Revision: https://reviews.llvm.org/D94737
The file was modifiedmlir/lib/Parser/TypeParser.cpp
The file was modifiedmlir/test/Target/llvmir-types.mlir
The file was modifiedmlir/include/mlir/IR/BuiltinTypes.td
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/include/mlir/IR/BuiltinTypes.h
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/test/Dialect/LLVMIR/roundtrip.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/IR/Builders.h
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
The file was modifiedmlir/lib/Parser/TokenKinds.def
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/lib/IR/BuiltinDialect.cpp
The file was modifiedmlir/utils/gdb-scripts/prettyprinters.py
The file was modifiedmlir/test/Dialect/LLVMIR/types.mlir
The file was modifiedmlir/include/mlir/IR/Types.h
The file was modifiedmlir/lib/IR/Types.cpp
The file was modifiedmlir/lib/Target/LLVMIR/TypeTranslation.cpp
The file was modifiedmlir/docs/Dialects/LLVM.md
The file was modifiedmlir/docs/LangRef.md
The file was modifiedmlir/docs/ConversionToLLVMDialect.md
The file was modifiedmlir/lib/IR/BuiltinTypes.cpp
Commit 5bf47e142b6ebe1baf0cab257800c27a1a3bbde7 by gchatelet
[libc] CopyAlignedBlocks can now specify alignment on top of block size

This has been requested in D92236

Differential Revision: https://reviews.llvm.org/D94770
The file was modifiedlibc/test/src/string/memory_utils/memcpy_utils_test.cpp
The file was modifiedlibc/src/string/memory_utils/utils.h
The file was modifiedlibc/src/string/memory_utils/memcpy_utils.h
Commit bf1aa5db5c76d187df8dfef28bc5b8889fb53c4b by selliott
[RISCV][NFC] Fix order of parameters in cmov ge/le tests

The first parameter should be selected if the condition is true and
the last parameter if the condition is false. Prior to this change
it was the other way round which was confusing.

Differential Revision: https://reviews.llvm.org/D94729
The file was modifiedllvm/test/CodeGen/RISCV/rv32Zbt.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbt.ll
Commit 383262933045e1c138362105be4ee4d1b62ab4cc by Jan Svoboda
[clang][cli] NFC: Add PIE parsing for precompiled input and IR

This patch effectively reverts a small part of D83979.

When we stop parsing `LangOpts` unconditionally in `parseSimpleArgs` (above the diff) and move them back to `ParseLangArgs` (called in `else` branch) in D94682, `LangOpts.PIE` would never get parsed in this `if` branch. This patch ensures this doesn't happen.

Right now, this causes `LangOpts.PIE` to be parsed twice, but that will be immediately corrected in D94682.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94679
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit a7dcd3aeb0fb58ad774bc89428ed6c925f31f8aa by Jan Svoboda
[clang][cli] NFC: Parse some LangOpts after the defaults are set

This patch ensures we only parse the necessary options before calling `setLangDefaults` (explained in D94678).

Because neither `LangOpts.CFProtectionBranch` nor `LangOpts.SYCLIsDevice` are used in `setLangDefaults`, this is a NFC.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94680
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 1744f4c676411ebd2e38afd5a6b56e5dd533c6ac by Jan Svoboda
[clang][cli] NFC: Promote ParseLangArgs and ParseCodeGenArgs to members

This patch promotes `ParseLangArgs` and `ParseCodeGenArgs` to members of `CompilerInvocation`. That will be useful in the following patch D94682, where we need to access protected members of `LangOptions` and `CodeGenOptions`. Both of those classes already have `friend CompilerInvocation`.

This is cleaner than keeping those functions freestanding and having to specify the exact signature of both in extra `friend` declarations.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94681
The file was modifiedclang/include/clang/Frontend/CompilerInvocation.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 1a497ae9b83653682d6d20f1ec131394e523375d by samuel.tebbs
[ARM][Block placement] Check the predecessor exists before processing it

Not all machine loops will have a predecessor. so the pass needs to
check it before continuing.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D94780
The file was modifiedllvm/test/CodeGen/Thumb2/block-placement.mir
The file was modifiedllvm/lib/Target/ARM/ARMBlockPlacement.cpp
Commit be69e66b1cd826f499566e1c3dadbf04e872baa0 by llvm-dev
[X86][SSE] Attempt to fold shuffle(binop(),binop()) -> binop(shuffle(),shuffle())

If this will help us fold shuffles together, then push the shuffle through the merged binops.

Ideally this would be performed in DAGCombiner::visitVECTOR_SHUFFLE but getting an efficient+legal merged shuffle can be tricky - on SSE we can be confident that for 32/64-bit elements vectors shuffles should easily fold.
The file was modifiedllvm/test/CodeGen/X86/haddsub-shuf.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 1e1a011b09d0e6e9ff62b37721906485c386708c by psteinfeld
[flang] Disallow INTENT attribute on procedure dummy arguments

C843 states that "An entity with the INTENT attribute shall be a dummy
data object or a dummy procedure pointer."  This change enforces that
and fixes some tests that erroneously violated this rule.

Differential Revision: https://reviews.llvm.org/D94781
The file was modifiedflang/test/Semantics/assign03.f90
The file was modifiedflang/lib/Semantics/check-declarations.cpp
The file was modifiedflang/test/Semantics/separate-mp02.f90
The file was modifiedflang/test/Semantics/call09.f90
Commit 4c5066b0789d9c38d6362a684346b68261911d29 by craig.topper
[TargetLowering] Don't speculatively call ComputeNumSignBits. NFC

These methods are recursive so a little costly.

We only look at the result in one place in this function and it's
conditional. We also only need the second call if the first had
enough returned enough sign bits.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit b6e06a740c26b2b9d91455ad49a5009335089242 by andrzej.warzynski
[flang][driver] Copy test file into a temp dir when testing (nfc)

The following driver invocation will generate an output file
in the same directory as the input file:

```
flang-new -fc1 -test-io test-input.f90
```

This is the desired behaviour. However, when testing we need to make
sure that we don't pollute the source directory. To this end, copy the
input file into a temporary directory before testing.

This is similar to https://reviews.llvm.org/D94243.
The file was modifiedflang/test/Frontend/input-output-file.f90
Commit d5047d762f391c94939d67fc84cae25b24125694 by usx
[clangd] Update CC Ranking model with better sampling.

A better sampling strategy was used to generate the dataset for this
model.
New signals introduced in this model:
- NumNameInContext: Number of words in the context that matches the name
of the candidate.
- FractionNameInContext: Fraction of the words in context matching the
name of the candidate.

We remove the signal `IsForbidden` from the model and down rank
forbidden signals aggresively.

Differential Revision: https://reviews.llvm.org/D94697
The file was modifiedclang-tools-extra/clangd/quality/model/features.json
The file was modifiedclang-tools-extra/clangd/Quality.cpp
The file was modifiedclang-tools-extra/clangd/quality/model/forest.json
Commit bc84f89c71ab62d510973f64f022bee31e53af96 by anastasia.stulova
[OpenCL][Docs] Fixed cross-section reference in OpenCLSupport

Tags: #clang
The file was modifiedclang/docs/OpenCLSupport.rst
Commit 6227069bdce6b0c3c22f0a0c8f1aef705985125a by akhuang
[DebugInfo][CodeView] Change in line tables only mode to emit type information
for function scopes, rather than using the qualified name.

In line-tables-only mode, we used to emit qualified names as the display name for functions when using CodeView.
This patch changes to emitting the parent scopes instead, with forward declarations for class types.
The total object file size ends up being slightly smaller than if we use the full qualified names.

Differential Revision: https://reviews.llvm.org/D94639
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was addedclang/test/CodeGenCXX/debug-info-codeview-scopes.cpp
The file was modifiedclang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
Commit a0770f9e4e923292066dd095cf01a28671e40ad6 by david.green
[ARM] Constant tripcount tail predication loop tests. NFC
The file was addedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
Commit f5abf0bd485a1fa7e332f5f8266c25755d385a8a by david.green
[ARM] Tail predication with constant loop bounds

The TripCount for a predicated vector loop body will be
ceil(ElementCount/Width). This alters the conversion of an
active.lane.mask to a VCPT intrinsics to match.

Differential Revision: https://reviews.llvm.org/D94608
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tp-multiple-vpst.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
Commit cc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93 by Jessica Paquette
[MIPatternMatch] Add m_OneNonDBGUse

Add a matcher that checks if the given subpattern has only one non-debug use.

Also improve existing m_OneUse testcase.

Differential Revision: https://reviews.llvm.org/D94705
The file was modifiedllvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
Commit d0cb0d30a431578ecedb98c57780154789f3c594 by pifon
[mlir] Add Complex dialect.

Differential Revision: https://reviews.llvm.org/D94764
The file was addedmlir/include/mlir/Dialect/Complex/IR/Complex.h
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/include/mlir/Dialect/CMakeLists.txt
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was addedmlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
The file was addedmlir/include/mlir/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
The file was addedmlir/include/mlir/Dialect/Complex/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/CMakeLists.txt
The file was addedmlir/include/mlir/Conversion/ComplexToLLVM/ComplexToLLVM.h
The file was modifiedmlir/lib/Dialect/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/lib/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/ComplexOps.cpp
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/test/mlir-opt/commandline.mlir
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
The file was addedmlir/test/Conversion/ComplexToLLVM/convert-to-llvm.mlir
The file was addedmlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
The file was addedmlir/test/Dialect/Complex/ops.mlir
The file was modifiedmlir/lib/Conversion/PassDetail.h
Commit 86e604c4d68528478333a8901d7c79c09ca16fa8 by craig.topper
[RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates.

SimplifyDemandedBits can remove set bits from immediates from instructions
like AND/OR/XOR. This can prevent them from being efficiently
codegened on RISCV.

This adds an initial version that tries to keep or form 12 bit
sign extended immediates for AND operations to enable use of ANDI.
If that doesn't work we'll try to create a 32 bit sign extended immediate
to use LUI+ADDIW.

More optimizations are possible for different size immediates or
different operations. But this is a good starting point that already
has test coverage.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D94628
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/stack-realignment-with-variable-sized-objects.ll
The file was modifiedllvm/test/CodeGen/RISCV/vararg.ll
The file was modifiedllvm/test/CodeGen/RISCV/srem-lkk.ll
The file was modifiedllvm/test/CodeGen/RISCV/srem-vector-lkk.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/frame-info.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/copysign-casts.ll
Commit 84de4faf4cae2885056c608db8256e9f039050b3 by julian.lettner
GetMacosAlignedVersion() fails if sysctl is not setup

`GetMacosAlignedVersion()` fails for ASan-ified launchd because the
sanitizer initialization code runs before `sysctl` has been setup by
launchd.  In this situation, `sysctl kern.osproductversion` returns a
non-empty string that does not match our expectations of a
well-formatted version string.

Retrieving the kernel version (via `sysctl kern.osrelease`) still works,
so we can use it to add a fallback for this corner case.

Differential Revision: https://reviews.llvm.org/D94190
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
Commit 4f24d0dd5386cc0ff61be23062b89855da87094b by rnk
Fix libc++ clang-cl build, swap attribute order

Clang insists that __attribute__ attributes precede __declspec
attributes. This is a longstanding known issue:
https://llvm.org/pr24559. Re-order the visibility and deprecation macros
to fix the build.

Differential Revision: https://reviews.llvm.org/D94788
The file was modifiedlibcxx/include/__locale
The file was modifiedlibcxx/src/locale.cpp
Commit a9e939760c6f21476109559cc3e21779bddddaff by craig.topper
[CodeGen] Removes unwanted optimisation for TargetConstantFP

This 'FIXME' popped up in the development of an out-of-tree backend.
Quick fix, but first llvm upstream patch, therefore I do not have commit rights, so if approved please commit?

- Test is not included as this came up in an out-of-tree backend (if required, please hint on how to test this).

Patch by simveg (Simon)

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D93219
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit 1f21de535d37997c41b9b1ecb2f7ca0e472e9f77 by spatel
[SLP] remove unused reduction functions; NFC

These were made obsolete by simplifying the code in recent patches.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit a1be47b4771467998d7549dcd1b9f9cebdaa9af9 by akhuang
[CodeView][DebugInfo] Add test case to show that linkage names are not
being added to class types in -gline-tables-only.
Also changed the name of the test file for clarity.
(follow up to D94639)
The file was addedclang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp
The file was removedclang/test/CodeGenCXX/debug-info-codeview-scopes.cpp
Commit 64db296e5a8c9fdc2f7feb4afb60d59c140a78aa by rnk
Revert "[BasicAA] Handle recursive queries more efficiently"

This reverts commit a3904cc77f181cff7355357688edfc392a236f5d.
It causes the compiler to crash while building Harfbuzz for ARM in
Chromium, reduced reproducer forthcoming:
https://crbug.com/1167305
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp
Commit 61ec2280308bd5e2161efe2959d7d26798c85cb4 by lebedev.ri
[NFC][SimplifyCFG] Add testcase showing that we fail to preserve DomTree in switchToSelect()
The file was addedllvm/test/Transforms/SimplifyCFG/switchToSelect-domtree-preservation-edgecase.ll
Commit b81f75fa79162e9e2ba84d6b4cdd72f564b050c6 by lebedev.ri
[Utils] splitBlockBefore() always operates on DomTreeUpdater, so take it, not DomTree

Even though not all it's users operate on DomTreeUpdater,
it itself internally operates on DomTreeUpdater,
so it must mean everything is fine with that,
so just do that globally.
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
Commit c845c724c2323660e81a0b284aaa461842f1b402 by lebedev.ri
[Utils][SimplifyCFG] Port SplitBlock() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 286cf6cb029a9942df6ff1d99570e93c25fe29f0 by lebedev.ri
[SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit c6654a4cdab4156bae51970fa64993e790fc4adb by lebedev.ri
[SimplifyCFG][BasicBlockUtils] Port SplitBlockPredecessors()/SplitLandingPadPredecessors() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Commit a14c36fe27f5c36de44049237011d140a7277774 by lebedev.ri
[SimplifyCFG] switchToSelect(): don't forget to insert DomTree edge iff needed

DestBB might or might not already be a successor of SelectBB,
and it wasn't we need to ensure that we record the fact in DomTree.

The testcase used to crash in lazy domtree updater mode + non-per-function
domtree validity checks disabled.
The file was modifiedllvm/test/Transforms/SimplifyCFG/switchToSelect-domtree-preservation-edgecase.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 6a42cbf6d2116b52cb59aa3e23bef93a30cf2dc8 by 31459023+hctim
[GWP-ASan] Add inbuilt options parser.

Adds a modified options parser (shamefully pulled from Scudo, which
shamefully pulled it from sanitizer-common) to GWP-ASan. This allows
customers (Android) to parse options strings in a common way.

Depends on D94117.

AOSP side of these patches is staged at:

- sepolicy (sysprops should only be settable by the shell, in both root and
unrooted conditions):
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1517238

- zygote updates:
https://android-review.googlesource.com/c/platform/frameworks/base/+/1515009

- bionic changes to add `gwp_asan.<process_name>` system property, and
GWP_ASAN_OPTIONS environment variable:
https://android-review.googlesource.com/c/platform/bionic/+/1514989

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D92696
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/flags_test.cpp
The file was modifiedcompiler-rt/tools/gwp_asan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/tests/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/standalone/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/scudo_allocator.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/optional/options_parser.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/flags.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was addedcompiler-rt/tools/gwp_asan/options_parser_fuzzer.cpp
The file was addedcompiler-rt/lib/gwp_asan/tests/options.cpp
The file was modifiedcompiler-rt/test/scudo/standalone/unit/lit.site.cfg.py.in
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/options.inc
The file was modifiedcompiler-rt/lib/gwp_asan/optional/options_parser.h
Commit 98c89ccfbd7467f946874c2af170d0f504355dd1 by rnk
[MSVC] Don't add -nostdinc++ -isystem to runtimes builds

If the host compiler is MSVC or clang-cl, then the compiler used to
buidl the runtimes will be clang-cl, and it doesn't support either of
those flags.

Worse, because -isystem is a space separated flag, it causes all cmake
try_compile tests to fail, so none of the -Wno-* flags make it to the
compiler in libcxx. I noticed that we weren't passing
-Wno-user-defined-literals to clang-cl and were getting warnings in the
build, and this fixes that for me.

Differential Revision: https://reviews.llvm.org/D94817
The file was modifiedruntimes/CMakeLists.txt
Commit 4a47da2cf440c2f2006d9b04acfef4292de1e263 by cjdb
[Sema] turns -Wfree-nonheap-object on by default

We'd discussed adding the warning to -Wall in D89988. This patch honours that.
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/test/Analysis/free.c
The file was modifiedclang/test/Analysis/NewDelete-intersections.mm
Commit ed0fd567ebdbbbbc61eb87346a58196a73f9b814 by ndesaulniers
BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor

Otherwise we'll fail the assertion in SplitBlockPredecessors() related
to splitting the edges from CallBr's.

Fixes: https://github.com/ClangBuiltLinux/linux/issues/1161
Fixes: https://github.com/ClangBuiltLinux/linux/issues/1252

Reviewed By: void, MaskRay, jyknight

Differential Revision: https://reviews.llvm.org/D88438
The file was addedllvm/test/Transforms/LoopStrengthReduce/callbr-critical-edge-splitting2.ll
The file was modifiedllvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
The file was addedllvm/test/Transforms/LoopStrengthReduce/callbr-critical-edge-splitting.ll
Commit d7bc3b7ce23b664d6620cdc32370a8614523ca2f by ravishankarm
[mlir][Linalg] Add missing check to canonicalization of GenericOp that are identity ops.

The operantion is an identity if the values yielded by the operation
is the argument of the basic block of that operation. Add this missing check.

Differential Revision: https://reviews.llvm.org/D94819
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit 10ac9b29a4ca9e75bcbfa9576e3d8ee83cc9cd78 by Jason Molenda
Skip 'g' packet tests when running on darwin; debugserver doesn't impl

Differential Revision: https://reviews.llvm.org/D94754
The file was modifiedlldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
Commit ceb3cdccd0fb597659147e0f538fdee91414541e by spatel
[SLP] remove dead code in reduction matching; NFC

To get into this block we had: !A || B || C
and we checked C in the first 'if' clause
leaving !A || B. But the 2nd 'if' is checking:
A && !B --> !(!A || B)
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit ceaf0110ff5e0c2de1f03d65d13703d34d0d5737 by Duncan P. N. Exon Smith
Revert "Revert "ADT: Fix reference invalidation in SmallVector...""

This reverts commit 33be50daa9ce1074c3b423a4ab27c70c0722113a,
effectively reapplying:

- 260a856c2abcef49c7cb3bdcd999701db3e2af38
- 3043e5a5c33c4c871f4a1dfd621a8839f9a1f0b3
- 49142991a685bd427d7e877c29c77371dfb7634c

... with a fix to skip a call to `SmallVector::isReferenceToStorage()`
when we know the parameter had been taken by value for small, POD-like
`T`. See https://reviews.llvm.org/D93779 for the discussion on the
revert.

At a high-level, these commits fix reference invalidation in
SmallVector's push_back, append, insert (one or N), and resize
operations. For more details, please see the original commit messages.

This commit fixes a bug that crept into
`SmallVectorTemplateCommon::reserveForAndGetAddress()` during the review
process after performance analysis was done. That function is now called
`reserveForParamAndGetAddress()`, clarifying that it only works for
parameter values. It uses that knowledge to bypass
`SmallVector::isReferenceToStorage()` when `TakesParamByValue`. This is
`constexpr` and avoids adding overhead for "small enough", trivially
copyable `T`.

Performance could potentially be tuned further by increasing the
threshold for `TakesParamByValue`, which is currently defined as:
```
bool TakesParamByValue = sizeof(T) <= 2 * sizeof(void *);
```
in the POD-like version of SmallVectorTemplateBase (else, `false`).

Differential Revision: https://reviews.llvm.org/D94800
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
Commit aa8a2d8a3da3704f82ba4ea3a6e7b463737597e1 by Amara Emerson
[AArch64][GlobalISel] Select immediate fcmp if the zero is on the LHS.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fcmp.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit 76f5c5a7b059929f0e0352ad4ff5ec1b78511868 by dblaikie
[ADT][Support] Fix C4146 error from MSVC

Unary minus operator applied to unsigned type, result still unsigned.

Use `~0U` instead of `-1U` and `1 + ~VAL` instead of `-VAL`.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D94417
The file was modifiedllvm/include/llvm/ADT/StringExtras.h
The file was modifiedllvm/include/llvm/Support/MathExtras.h
Commit a1500105ee6074f992f376c916dcfa3a54acb717 by Dávid Bolvanský
[SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument

Example:

```
__attribute__((nonnull,noinline)) char * pinc(char *p)  {
  return ++p;
}

char * foo(bool b, char *a) {
       return pinc(b ? 0 : a);

}
```

optimize to

```
char * foo(bool b, char *a) {
       return pinc(a);

}
```

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D94180
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
Commit e65b9b04cdeff17fbcdae8d2bb268da832e4a267 by dschuff
Revert "[WebAssembly] MC layer writes table symbols to object files"

This reverts commit e9f1ed2306b1b3aedcb1acef2b50e252a77a04b9.

Reverting because it depends on 38dfce706f
The file was modifiedllvm/test/MC/WebAssembly/reloc-pic.s
The file was modifiedllvm/test/MC/WebAssembly/debug-info64.ll
The file was modifiedllvm/test/MC/WebAssembly/function-alias.ll
The file was modifiedllvm/test/MC/WebAssembly/global-ctor-dtor.ll
The file was modifiedllvm/test/MC/WebAssembly/type-index.s
The file was modifiedllvm/test/MC/WebAssembly/weak-alias.s
The file was modifiedllvm/test/MC/WebAssembly/debug-info.ll
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
Commit 187d771d27ed9059675b53e92e8fb8aeee9c43d8 by dschuff
Revert "[WebAssembly] Add support for table linking to wasm-ld"

This reverts commit 38dfce706f796dc109ea495dd69a8cb4c8fa819d.
CI discovered a bug where the table is exported twice: see
D91870
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/wasm/InputFiles.h
The file was modifiedlld/wasm/Symbols.h
The file was modifiedlld/test/wasm/locals-duplicate.test
The file was modifiedlld/test/wasm/pie.ll
The file was modifiedlld/test/wasm/signature-mismatch.ll
The file was modifiedlld/test/wasm/weak-alias.ll
The file was modifiedlld/wasm/Symbols.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/test/wasm/stack-pointer.ll
The file was modifiedlld/wasm/MarkLive.cpp
The file was modifiedlld/test/wasm/alias.s
The file was modifiedlld/test/wasm/shared.ll
The file was modifiedlld/wasm/SyntheticSections.h
The file was modifiedlld/test/wasm/local-symbols.ll
The file was modifiedlld/wasm/SymbolTable.cpp
The file was modifiedlld/test/wasm/section-symbol-relocs.yaml
The file was modifiedlld/wasm/SymbolTable.h
The file was modifiedlld/test/wasm/init-fini.ll
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/wasm/SyntheticSections.cpp
Commit d302398ff05f6d2bfbcb5c4fdafccf8a0e3b9875 by peter
hwasan: Update register-dump-read.c test to reserve x23 instead of x20.

D90422 changed this test to write a fixed value into register x23
instead of x20, but it did not update the list of reserved registers.
This meant that x23 may have been live across the register write,
although this happens to not be the case with the current compiler.
Fix the problem by updating the reserved register list.
The file was modifiedcompiler-rt/test/hwasan/TestCases/register-dump-read.c
Commit aa3d4d9939595295d19969c62077cc09e4823f58 by mtrofin
[NFC] Disallow unused prefixes under MC/RISCV

Differential Revision: https://reviews.llvm.org/D94836
The file was modifiedllvm/test/MC/RISCV/rv32zfh-valid.s
The file was modifiedllvm/test/MC/RISCV/rv32c-only-valid.s
The file was modifiedllvm/test/MC/RISCV/rv64zfh-valid.s
The file was modifiedllvm/test/MC/RISCV/lit.local.cfg
Commit 1bd083b5d6d0619f532a7310e72887ea6d2e87eb by pklausler
[flang] Create names to allow access to inaccessible specifics

When a reference to a generic interface occurs in a specification
expression that must be emitted to a module file, we have a problem
when the generic resolves to a function whose name is inaccessible
due to being PRIVATE or due to a conflict with another use of the
same name in the scope.  In these cases, construct a new name for
the specific procedure and emit a renaming USE to the module file.
Also, relax enforcement of PRIVATE when analyzing module files.

Differential Revision: https://reviews.llvm.org/D94815
The file was modifiedflang/include/flang/Semantics/expression.h
The file was modifiedflang/include/flang/Semantics/semantics.h
The file was addedflang/test/Semantics/modfile39.f90
The file was modifiedflang/lib/Semantics/semantics.cpp
The file was modifiedflang/lib/Semantics/tools.cpp
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/include/flang/Semantics/tools.h
The file was modifiedflang/lib/Evaluate/check-expression.cpp
The file was modifiedflang/lib/Semantics/resolve-names.cpp
Commit 3afbfb4145bea3796f1137c377774848093c3435 by thomasraoux
[mlir][NFC] Move helper substWithMin into Affine utils

This allow using this helper outside of the linalg canonicalization.

Differential Revision: https://reviews.llvm.org/D94826
The file was modifiedmlir/include/mlir/Dialect/Affine/Utils.h
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
Commit 2a27a9819a1e3371e3e08d7fbad6235cf50d336d by riddleriver
[mlir][AsmPrinter] Properly escape strings when printing locations

This fixes errors when location strings contains newlines, or other non-ascii characters.

Differential Revision: https://reviews.llvm.org/D94847
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/test/IR/locations.mlir
Commit fd2083d73c2d229e80c1091a0399f7e1076e8c52 by thomasraoux
[mlir] Fixing potential build break in my previous commit
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
Commit 999f5da6b3088fa4c0bb9d05b358d015ca74c71f by Jonas Devlieghere
[debugserver] Fix inverted if block that resulted in us using the private entitlements
The file was modifiedlldb/tools/debugserver/source/CMakeLists.txt
Commit e8049dc3c8a46ccd75ce2a4f438d695d20feb660 by mtrofin
[NewPM][Inliner] Move the 'always inliner' case in the same CGSCC pass as 'regular' inliner

Expanding from D94808 - we ensure the same InlineAdvisor is used by both
InlinerPass instances. The notion of mandatory inlining is moved into
the core InlineAdvisor: advisors anyway have to handle that case, so
this change also factors out that a bit better.

Differential Revision: https://reviews.llvm.org/D94825
The file was modifiedllvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
The file was removedllvm/test/Other/new-pm-module-inliner-wrapper.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
The file was modifiedllvm/test/Other/new-pm-defaults.ll
The file was modifiedllvm/test/Other/new-pm-pgo-preinline.ll
The file was modifiedllvm/lib/Analysis/MLInlineAdvisor.cpp
The file was modifiedclang/test/CodeGen/thinlto-distributed-newpm.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/include/llvm/Analysis/MLInlineAdvisor.h
The file was modifiedllvm/include/llvm/Analysis/ReplayInlineAdvisor.h
The file was modifiedllvm/test/Transforms/Inline/pr46945.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/Inliner.h
The file was modifiedllvm/test/Transforms/Inline/inline_stats.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
The file was modifiedllvm/include/llvm/Analysis/InlineAdvisor.h
The file was modifiedclang/test/Frontend/optimization-remark-line-directive.c
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/test/Transforms/Inline/optimization-remarks-with-hotness.ll
The file was modifiedllvm/lib/Analysis/InlineAdvisor.cpp
The file was modifiedclang/test/Frontend/optimization-remark-with-hotness-new-pm.c
The file was modifiedclang/test/Frontend/optimization-remark-new-pm.c
The file was modifiedllvm/lib/Analysis/ReplayInlineAdvisor.cpp
The file was modifiedclang/test/Frontend/optimization-remark.c
The file was modifiedllvm/include/llvm/Passes/PassBuilder.h
The file was modifiedllvm/test/Other/new-pm-thinlto-defaults.ll
The file was modifiedllvm/test/Transforms/Inline/optimization-remarks.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
Commit 029c2257c21e15e00806b2083e8881fb2468900e by mtrofin
[Inline] Fix a missing character in inline_stats.ll
The file was modifiedllvm/test/Transforms/Inline/inline_stats.ll
Commit a396e2e088eeab974a5d386df9466757a4bdced0 by kazu
[utils] Use llvm::sort (NFC)
The file was modifiedllvm/utils/TableGen/GlobalISel/GIMatchDag.cpp
The file was modifiedllvm/utils/TableGen/GlobalISel/GIMatchDagInstr.cpp
The file was modifiedllvm/utils/FileCheck/FileCheck.cpp
Commit 4707b21298a6daf28b08d9395568ccc94a549711 by kazu
[AMDGPU] Use llvm::is_contained (NFC)
The file was modifiedllvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
Commit 8fd8ff1f67e4919954162ccf5f0e9b5e9c2d53fb by kazu
[StringExtras] Rename SubsequentDelim to ListSeparator

This patch renames SubsequentDelim to ListSeparator to clarify the
purpose of the class.

Differential Revision: https://reviews.llvm.org/D94649
The file was modifiedllvm/unittests/ADT/StringExtrasTest.cpp
The file was modifiedllvm/include/llvm/ADT/StringExtras.h
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
Commit be68c9222b85815612e6bd8bc606a87e3111a0fb by douglas.yung
[NFC] Add -std=c11 to attr-availability.c

This test will fail with any toolchains that don't default to C11.

Adding this switch to the clang invocation in the test fixes the issue.

Patch by Justice Adams!

Reviewed By: dyung

Differential Revision: https://reviews.llvm.org/D94829
The file was modifiedclang/test/Parser/attr-availability.c
Commit a61e42efbb73e55c44cbb0eb2686c7b4a25ca812 by mtrofin
[NPM][Inliner] Temporarily remove inline_stats test case for always
inline

The stats are printed at InlinePass destruction. When we have 2 of them,
it appears the destruction order of the Passes std::vector of the pass
manager differs in msan builds - example:
http://lab.llvm.org:8011/#/builders/74/builds/2135.

This reproes locally, too.

Temporarily removing the sub-test case, to green the build, and will
follow up with a stat dumping alternative that does not depend on vector
element dtor order.
The file was modifiedllvm/test/Transforms/Inline/inline_stats.ll
Commit 8456c3a789285079ad35d146e487436b5a27b027 by Amara Emerson
AArch64: fix regression introduced by fcmp immediate selection.

Forgot to check if the predicate is safe to commutate operands.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fcmp.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit 668827b6485664dbcf6caa2756fe2f6579ab1885 by jeroen.dobbelaere
Introduce llvm.noalias.decl intrinsic

The ``llvm.experimental.noalias.scope.decl`` intrinsic identifies where a noalias
scope is declared. When the intrinsic is duplicated, a decision must
also be made about the scope: depending on the reason of the duplication,
the scope might need to be duplicated as well.

Reviewed By: nikic, jdoerfert

Differential Revision: https://reviews.llvm.org/D93039
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FastISel.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedllvm/include/llvm/IR/Intrinsics.h
The file was modifiedllvm/include/llvm/IR/IRBuilder.h
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/IR/IRBuilder.cpp
The file was modifiedllvm/lib/CodeGen/IntrinsicLowering.cpp
The file was addedllvm/test/Verifier/noalias_scope_decl.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
Commit b664bef2ad9a7d32192b9351f39a222332da8c6d by aqjune
[InstCombine] Add a test file that contains safe select transforms (NFC)
The file was addedllvm/test/Transforms/InstCombine/select-safe-transforms.ll
Commit e0a979ccadd81c71d78be816e893dd1bcd6508ee by aqjune
[InstCombine] Add more tests to select-safe-transforms.ll (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/select-safe-transforms.ll
Commit f0a0ec2d085b0bc53e20643b740b20b49cfd9bd5 by nikita.ppv
[InstCombine] Add more tests for select operand replacement (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
Commit a7101450a42e4f1ed5af1a38a6def08f1b5b58fe by steveire
[ASTMatchers] Add mapAnyOf matcher

Make it possible to compose a matcher for different base nodes.

This accepts one or more node matcher functors and zero or more
matchers, composing the latter into the former.

This allows composing of matchers where the same inner matcher name is
used for the same concept, but with a different node functor. Currently,
there is a limitation that the nodes must be in the same "clade", so
while

  mapAnyOf(ifStmt, forStmt).with(hasBody(stmt()))

can be used, functionDecl can not be added to the tuple.

It is possible to use this in clang-query, but it will require changes
to the QueryParser, so is deferred to a future review.

Differential Revision: https://reviews.llvm.org/D94127
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
The file was modifiedclang/docs/tools/dump_ast_matchers.py
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/docs/LibASTMatchersReference.html
Commit dbe056c2e37f00b9f33ab63bba73dbb004e13562 by steveire
[ASTMatchers] Make cxxOperatorCallExpr matchers API-compatible with n-ary operators

This makes them composable with mapAnyOf().

Differential Revision: https://reviews.llvm.org/D94128
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
Commit 4f155567317d3187bc18be866b3f3b5352f1bfa5 by bjorn.a.pettersson
[LegalizeDAG] Handle NeedInvert when expanding BR_CC

This is a follow-up fix to commit 03c8d6a0c4bd0016bdfd1e5.
Seems like we now end up with NeedInvert being set in the result
from LegalizeSetCCCondCode more often than in the past, so we
need to handle NeedInvert when expanding BR_CC.

Not sure how to deal with the "Tmp4.getNode()" case properly,
but current assumption is that that code path isn't impacted
by the changes in 03c8d6a0c4bd0016bdfd1e5 so we can simply move
the old assert into the if-branch and only handle NeedInvert in the
else-branch.

I think that the test case added here, for PowerPC, might have
failed also before commit 03c8d6a0c4bd0016bdfd1e5. But we started
to hit the assert more often downstream when having merged that
commit.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D94762
The file was addedllvm/test/CodeGen/PowerPC/legalize-invert-br_cc.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit e810e95e4bb908d1c8844e2c6f7da999732cabc9 by steveire
[ASTMatchers] Add binaryOperation matcher

This is a simple utility which allows matching on binaryOperator and
cxxOperatorCallExpr. It can also be extended to support
cxxRewrittenBinaryOperator.

Add generic support for MapAnyOfMatchers to auto-marshalling functions.

Differential Revision: https://reviews.llvm.org/D94129
The file was modifiedclang/lib/ASTMatchers/Dynamic/Registry.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
The file was modifiedclang/lib/ASTMatchers/Dynamic/Marshallers.h
The file was modifiedclang/docs/tools/dump_ast_matchers.py
Commit b765eaf9a617bd3da30f47ece731b33593929885 by steveire
[ASTMatchers] Add support for CXXRewrittenBinaryOperator

Differential Revision: https://reviews.llvm.org/D94130
The file was modifiedclang/include/clang/AST/ASTNodeTraverser.h
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp
The file was modifiedclang/include/clang/AST/ExprCXX.h
The file was modifiedclang/lib/ASTMatchers/Dynamic/Registry.cpp
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp
The file was modifiedclang/unittests/AST/ASTTraverserTest.cpp
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
Commit 25c1578a46ff93f920b7ad4e3057465902ced8f5 by alexandre.ganea
Fix llvm::Optional build breaks in MSVC using std::is_trivially_copyable

Current code breaks this version of MSVC due to a mismatch between `std::is_trivially_copyable` and `llvm::is_trivially_copyable` for `std::pair` instantiations.  Hence I was attempting to use `std::is_trivially_copyable` to set `llvm::is_trivially_copyable<T>::value`.

I spent some time root causing an `llvm::Optional` build error on MSVC 16.8.3 related to the change described above:

```
62>C:\src\ocg_llvm\llvm-project\llvm\include\llvm/ADT/BreadthFirstIterator.h(96,12): error C2280: 'llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>>::operator =(const llvm::Optional<std::pair<std::pair<unsigned int,llvm::Graph<4>::NodeSubset> *,llvm::Optional<llvm::Graph<4>::ChildIterator>>> &)': attempting to reference a deleted function (compiling source file C:\src\ocg_llvm\llvm-project\llvm\unittests\ADT\BreadthFirstIteratorTest.cpp)
...
```
The "trivial" specialization of `optional_detail::OptionalStorage` assumes that the value type is trivially copy constructible and trivially copy assignable. The specialization is invoked based on a check of `is_trivially_copyable` alone, which does not imply both `is_trivially_copy_assignable` and `is_trivially_copy_constructible` are true.

[[ https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable | According to the spec ]], a deleted assignment operator does not make `is_trivially_copyable` false. So I think all these properties need to be checked explicitly in order to specialize `OptionalStorage` to the "trivial" version:
```
/// Storage for any type.
template <typename T, bool = std::is_trivially_copy_constructible<T>::value
                          && std::is_trivially_copy_assignable<T>::value>
class OptionalStorage {
```
Above fixed my build break in MSVC, but I think we need to explicitly check `is_trivially_copy_constructible` too since it might be possible the copy constructor is deleted.  Also would be ideal to move over to `std::is_trivially_copyable` instead of the `llvm` namespace verson.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D93510
The file was modifiedllvm/include/llvm/ADT/Optional.h
The file was modifiedllvm/unittests/ADT/OptionalTest.cpp
Commit 9fc814ed59669d8f1d06cde5714c17fac652f2a1 by Dávid Bolvanský
[Tests] Added tests for new instcombine or simplification; NFC
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
Commit a4e2a5145a29af678139f33e94ab3df0fc973e59 by Dávid Bolvanský
[InstSimplify] Add (~A & B) | ~(A | B) --> ~A
The file was modifiedllvm/test/Transforms/InstSimplify/or.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 098dbf190a5586d02f48b84eb41b93b701cdeb97 by kai.wang
[RISCV] Correct alignment settings for vector registers.

According to "9. Vector Memory Alignment Constraints" in V
specification, the alignment of vector memory access is aligned to the
size of the element. In our current implementation, we support ELEN up
to 64. We could assume the alignment of vector registers is 64 under the
assumption.

Differential Revision: https://reviews.llvm.org/D94751
The file was modifiedllvm/lib/Target/RISCV/RISCVRegisterInfo.td
Commit bdd4dda58b0de08bd3474fb8d4589a9ba9349e88 by Dávid Bolvanský
[InstSimplify] Update comments, remove redundant tests
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit bca16e2fbb451f125c13f811f9f5a37bb38e54e2 by flo
[LTO] Remove options to disable inlining, vectorization & GVNLoadPRE.

This patch removes some ancient options as a clean-up before moving
code-gen to use LTOBackend in D94487.

I think it would preferable to remove those ancient options, because

  1. There are no corresponding options in LTOBackend based tools,
  2. There are no unit tests for them,
  3. They are not passed through by Clang,
  4. At least for GNVLoadPRE, users could just use GVN's `enable-load-pre`.

Alternatively we could add support for those options to lto::Config &
co, but I think it would be better to remove them, unless they are
actually used in practice.

Reviewed By: steven_wu, tejohnson

Differential Revision: https://reviews.llvm.org/D94783
The file was modifiedllvm/tools/llvm-lto/llvm-lto.cpp
The file was modifiedllvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
The file was modifiedllvm/lib/LTO/LTOCodeGenerator.cpp
The file was modifiedllvm/tools/lto/lto.cpp
Commit ba0fc7e1f8d57a7a7dce1a2d604b12e5210dc10f by kazu
[StringExtras] Fix comment typos (NFC)
The file was modifiedllvm/include/llvm/ADT/StringExtras.h
Commit 19aacdb715aea1de56a47b807a555335610a11c2 by kazu
[llvm] Construct SmallVector with iterator ranges (NFC)
The file was modifiedllvm/lib/Transforms/Utils/LCSSA.cpp
The file was modifiedllvm/lib/IR/LLVMContextImpl.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
The file was modifiedllvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
The file was modifiedllvm/lib/Transforms/IPO/ArgumentPromotion.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modifiedllvm/lib/Transforms/Utils/Debugify.cpp
The file was modifiedllvm/include/llvm/Support/GenericDomTree.h
The file was modifiedllvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
The file was modifiedllvm/lib/Transforms/Utils/CallPromotionUtils.cpp
Commit 2082b10d100e8dbaffc2ba8f497db5d2ab61beb2 by kazu
[llvm] Use *::empty (NFC)
The file was modifiedllvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
The file was modifiedllvm/lib/Object/SymbolSize.cpp
The file was modifiedllvm/lib/CodeGen/RegisterScavenging.cpp
The file was modifiedllvm/lib/Analysis/CGSCCPassManager.cpp
The file was modifiedllvm/lib/Target/ARM/ARMConstantIslandPass.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp
The file was modifiedllvm/lib/Target/X86/X86CmovConversion.cpp
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/tools/llvm-exegesis/lib/Target.cpp
The file was modifiedllvm/lib/CodeGen/PHIElimination.cpp
Commit 416854d0f7cda90def07e9b4aee14505f222b0b3 by Dávid Bolvanský
[InstSimplify] Precommit new testcases; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/or.ll
Commit c1ab698dce8dd4e751e63142ebb333d5b90bb8dc by david.green
[ARM] Remove LLC tests from transform/hardware loop tests.

We now have a lot of llc tests for hardware loops in CodeGen, which test
a larger variety of loops and are easier to maintain. This removes the
llc from mixed llc/opt tests.
The file was modifiedllvm/test/Transforms/HardwareLoops/ARM/structure.ll
Commit 372eb2bbb6fb903ce76266e659dfefbaee67722b by david.green
[ARM] Add low overhead loops terminators to AnalyzeBranch

This treats low overhead loop branches the same as jump tables and
indirect branches in analyzeBranch - they cannot be analyzed but the
direct branches on the end of the block may be removed. This helps
remove the unnecessary branches earlier, which can help produce better
codegen (and change block layout in a number of cases).

Differential Revision: https://reviews.llvm.org/D94392
The file was modifiedllvm/test/CodeGen/Thumb2/mve-scatter-increment.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/vcmp-vpst-combination.ll
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h
The file was modifiedllvm/test/CodeGen/Thumb2/mve-gather-increment.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float16regloops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/varying-outer-2d-reduction.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/sibling-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-gather-tailpred.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float32regloops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vldshuffle.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/while-loops.ll
Commit 63bedc80da36cf5eb71b06b453c186e057607bf4 by Dávid Bolvanský
[InstSimplify] Handle commutativity for 'and' and 'outer or' for (~A & B) | ~(A | B) --> ~A

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D94870
The file was modifiedllvm/test/Transforms/InstSimplify/or.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 48dbac5b6b0bc7a03e9af42cb99176abba8d0467 by spatel
[SLP] remove unnecessary use of 'OperationData'

This is another NFC-intended patch to allow matching
intrinsics (example: maxnum) as candidates for reductions.

It's possible that the loop/if logic can be reduced now,
but it's still difficult to understand how this all works.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit fcfcc3cc6b16e4fd7d7d2d07937634cca360b46e by spatel
[SLP] fix typos; NFC
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 49b96cd9ef2f81d193641796b8a85781292faf7a by spatel
[SLP] remove opcode field from reduction data class

This is NFC-intended and another step towards supporting
intrinsics as reduction candidates.

The remaining bits of the OperationData class do not make
much sense as-is, so I will try to improve that, but I'm
trying to take minimal steps because it's still not clear
how this was intended to work.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit ed939f853da1f2266f00ea087f778fda88848f73 by tianshilei1992
[OpenMP] Added the support for hidden helper task in RTL

The basic design is to create an outer-most parallel team. It is not a regular team because it is only created when the first hidden helper task is encountered, and is only responsible for the execution of hidden helper tasks.  We first use `pthread_create` to create a new thread, let's call it the initial and also the main thread of the hidden helper team. This initial thread then initializes a new root, just like what RTL does in initialization. After that, it directly calls `__kmpc_fork_call`. It is like the initial thread encounters a parallel region. The wrapped function for this team is, for main thread, which is the initial thread that we create via `pthread_create` on Linux, waits on a condition variable. The condition variable can only be signaled when RTL is being destroyed. For other work threads, they just do nothing. The reason that main thread needs to wait there is, in current implementation, once the main thread finishes the wrapped function of this team, it starts to free the team which is not what we want.

Two environment variables, `LIBOMP_NUM_HIDDEN_HELPER_THREADS` and `LIBOMP_USE_HIDDEN_HELPER_TASK`, are also set to configure the number of threads and enable/disable this feature. By default, the number of hidden helper threads is 8.

Here are some open issues to be discussed:
1. The main thread goes to sleeping when the initialization is finished. As Andrey mentioned, we might need it to be awaken from time to time to do some stuffs. What kind of update/check should be put here?

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D77609
The file was modifiedopenmp/runtime/src/kmp_wait_release.h
The file was modifiedopenmp/runtime/src/kmp_settings.cpp
The file was modifiedopenmp/runtime/src/z_Linux_util.cpp
The file was modifiedopenmp/runtime/src/kmp.h
The file was addedopenmp/runtime/test/tasking/hidden_helper_task/common.h
The file was addedopenmp/runtime/test/tasking/hidden_helper_task/taskgroup.cpp
The file was modifiedopenmp/runtime/test/worksharing/for/kmp_sch_simd_guided.c
The file was addedopenmp/runtime/test/tasking/hidden_helper_task/depend.cpp
The file was modifiedopenmp/runtime/src/kmp_global.cpp
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_taskdeps.h
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was addedopenmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
Commit d8fc27301d18f0935ba99ead7ac61aa6a53f16e4 by ajcbik
[mlir][sparse] improved sparse runtime support library

Added the ability to read (an extended version of) the FROSTT
file format, so that we can now read in sparse tensors of arbitrary
rank. Generalized the API to deal with more than two dimensions.

Also added the ability to sort the indices of sparse tensors
lexicographically. This is an important step towards supporting
auto gen of initialization code, since sparse storage formats
are easier to initialize if the indices are sorted. Since most
external formats don't enforce such properties, it is convenient
to have this ability in our runtime support library.

Lastly, the re-entrant problem of the original implementation
is fixed by passing an opaque object around (rather than having
a single static variable, ugh!).

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D94852
The file was addedmlir/integration_test/Sparse/CPU/frostt-example.mlir
The file was modifiedmlir/integration_test/Sparse/CPU/matrix-market-example.mlir
The file was modifiedmlir/integration_test/CMakeLists.txt
The file was addedmlir/integration_test/data/test.tns
The file was modifiedmlir/lib/ExecutionEngine/SparseUtils.cpp
The file was modifiedmlir/include/mlir/ExecutionEngine/CRunnerUtils.h
Commit bfd75bdf3fd62d4f5e7028d4122f9ffa517f2a09 by Dávid Bolvanský
[NFC] Removed extra text in comments
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 2a5b576e3ea41c30537435d989a3dce7a409f8e2 by david.green
[ARM] Test for aligned blocks. NFC
The file was addedllvm/test/CodeGen/Thumb2/aligned-nonfallthrough.ll
Commit 145472421535c71a9ea60af7e5d012ab69dc85ff by david.green
[ARM] Align blocks that are not fallthough targets

If the previous block in a function does not fallthough, adding nop's to
align it will never be executed. This means we can freely (except for
codesize) align more branches. This happens in constantislandspass (as
it cannot happen later) and only happens at aggressive optimization
levels as it does increase codesize.

Differential Revision: https://reviews.llvm.org/D94394
The file was modifiedllvm/test/CodeGen/ARM/ParallelDSP/multi-use-loads.ll
The file was modifiedllvm/test/CodeGen/Thumb2/aligned-nonfallthrough.ll
The file was modifiedllvm/lib/Target/ARM/ARMConstantIslandPass.cpp
Commit 32fc32317a31fc00e7e4086d6c93dd1eab75960c by lebedev.ri
[SimplifyCFG] markAliveBlocks(): catchswitch: preserve PostDomTree

When removing catchpad's from catchswitch, if that removes a successor,
we need to record that in DomTreeUpdater.

This fixes PostDomTree preservation failure in an existing test.
This appears to be the single issue that i see in my current test coverage.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 5238e7b302ffc40707677960da9d64e872745dac by nikita.ppv
[InstCombine] Replace one-use select operand based on condition

InstCombine already performs a fold where X == Y ? f(X) : Z is
transformed to X == Y ? f(Y) : Z if f(Y) simplifies. However,
if f(X) only has one use, then we can always directly replace the
use inside the instruction. To actually be profitable, limit it to
the case where Y is a non-expr constant.

This could be further extended to replace uses further up a one-use
instruction chain, but for now this only looks one level up.

Among other things, this also subsumes D94860.

Differential Revision: https://reviews.llvm.org/D94862
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/select-safe-transforms.ll
Commit a048ce13e32daa255d26533c00da8abd0b67e819 by i
[X86] Default to -x86-pad-for-align=false to drop assembler difference with or w/o -g

Fix PR48742: the D75203 assembler optimization locates MCRelaxableFragment's
within two MCSymbol's and relaxes some MCRelaxableFragment's to reduce the size
of a MCAlignFragment.  A -g build has more MCSymbol's and therefore may have
different assembler output (e.g. a MCRelaxableFragment (jmp) may have 5 bytes
with -O1 while 2 bytes with -O1 -g).

`.p2align 4, 0x90` is common due to loops. For a larger program, with a
lot of temporary labels, the assembly output difference is somewhat
destined. The cost seems to overweigh the benefits so we default to
-x86-pad-for-align=false until the heuristic is improved.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D94542
The file was modifiedllvm/test/MC/X86/align-via-padding-corner.s
The file was modifiedllvm/test/MC/X86/align-via-padding.s
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
The file was modifiedllvm/test/MC/X86/align-via-relaxation.s
The file was modifiedllvm/test/MC/X86/prefix-padding-64.s
The file was modifiedllvm/test/MC/X86/prefix-padding-32.s
Commit 633c5afccfbb0a985976aa3e6493f1a08061cb10 by craig.topper
[RISCV] Remove unneeded StringRef to std::string conversions in RISCVCompressInstEmitter. NFC

Stop concatenating std::string before streaming into a raw_ostream.
Just stream the pieces.

Remove some new lines from asserts. Remove std::string concatenation
from an assert. assert strings aren't really evaluated like this at
runtime. An assertion failure will just print exactly what's between
the parentheses in the source.
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 97f7e4e8c9309e0806f9b8f8afcf8ce2ef63656c by craig.topper
[RISC] Replace dyn_casts that are only checked by an assert with a cast. NFC
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 2b6a92625fdf11928bff1a31cdc06d7dbd193f85 by craig.topper
[RISCV] Simplify mergeCondAndCode in RISCVCompressInstEmitter.cpp. NFC

Instead forming a std::string and returning it to pass into another
raw_ostream, just pass the raw_ostream as a parameter.

Take StringRef as arguments instead raw_string_ostream references
making the caller responsible for converting to strings. Use
StringRef operations instead of std::string::substr.a
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 1327c730bb9a0bff963af3745869cf244ae37241 by craig.topper
[RISCV] Few more minor cleanups to RISCVCompressInstEmitter. NFC

-Use StringRef instead of std::string.
-Const correct a parameter.
-Don't call StringRef::data() before printing. Just pass the StringRef.
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 061f681c0dfa4d279dc656802bf81f3b9bfa3d34 by craig.topper
[RISCV] Remove an extra map lookup from RISCVCompressInstEmitter. NFC

When we looked up the map to see if the entry already existed,
this created the new entry for us. So save a reference to it so
we can use it to update the entry instead of looking it up again.

Also remove unnecessary StringRef constructors around string
literals on calls to this function.
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 3cbd476c54886e8ebac64b4145d4517732a71023 by marukawa
[VE] Support VE in libunwind

Modify libunwind to support SjLj exception handling routines for VE.
In order to do that, we need to implement not only SjLj exception
handling routines but also a Registers_ve class.  This implementation
of Registers_ve is incomplete.  We will work on it later when we need
backtrace in libunwind.

Reviewed By: #libunwind, compnerd

Differential Revision: https://reviews.llvm.org/D94591
The file was modifiedlibunwind/src/Registers.hpp
The file was modifiedlibunwind/include/__libunwind_config.h
The file was modifiedlibunwind/src/libunwind.cpp
The file was modifiedlibunwind/src/Unwind-sjlj.c
The file was modifiedlibunwind/include/libunwind.h
Commit 3809f4ebabde98bfdc1fdcdad2963a874151820b by i
[ELF] Support R_PPC_ADDR24 (ba foo; bla foo)
The file was modifiedlld/ELF/Arch/PPC.cpp
The file was modifiedlld/test/ELF/ppc32-reloc-addr.s
Commit b1c2f1282a237e9bc60f1b0020bc7535ca019739 by nikita.ppv
[BasicAA] Move assumption tracking into AAQI

D91936 placed the tracking for the assumptions into BasicAA.
However, when recursing over phis, we may use fresh AAQI instances.
In this case AssumptionBasedResults from an inner AAQI can reesult
in a removal of an element from the outer AAQI.

To avoid this, move the tracking into AAQI. This generally makes
more sense, as the NoAlias assumptions themselves are also stored
in AAQI.

The test case only produces an assertion failure with D90094
reapplied. I think the issue exists independently of that change
as well, but I wasn't able to come up with a reproducer.
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was addedllvm/test/Transforms/MemCpyOpt/aa-recursion-assertion-failure.ll
The file was modifiedllvm/include/llvm/Analysis/AliasAnalysis.h
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit 0b84afa5fcb41429004db72a0588656a8d76bf48 by nikita.ppv
Reapply [BasicAA] Handle recursive queries more efficiently

There are no changes relative to the original commit. However, an issue
this exposed in BasicAA assumption tracking has been fixed in the
previous commit.

-----

An alias query currently works out roughly like this:

* Look up location pair in cache.
* Perform BasicAA logic (including cache lookup and insertion...)
* Perform a recursive query using BestAAResults.
   * Look up location pair in cache (and thus do not recurse into BasicAA)
   * Query all the other AA providers.
* Query all the other AA providers.

This is a lot of unnecessary work, all ultimately caused by the
BestAAResults query at the end of aliasCheck(). The reason we perform
it, is that aliasCheck() is getting called recursively, and we of
course want those recursive queries to also make use of other AA
providers, not just BasicAA. We can solve this by making the recursive
queries directly use BestAAResults (which will check both BasicAA
and other providers), rather than recursing into aliasCheck().

There are some tradeoffs:

* We can no longer pass through the precomputed underlying object
   to aliasCheck(). This is not a major concern, because nowadays
   getUnderlyingObject() is quite cheap.
* Results from other AA providers are no longer cached inside
   BasicAA. The way this worked was already a bit iffy, in that a
   result could be cached, but if it was MayAlias, we'd still end
   up re-querying other providers anyway. If we want to cache
   non-BasicAA results, we should do that in a more principled manner.

In any case, despite those tradeoffs, this works out to be a decent
compile-time improvment. I think it also simplifies the mental model
of how BasicAA works. It took me quite a while to fully understand
how these things interact.

Differential Revision: https://reviews.llvm.org/D90094
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit 9af03864df746aa9a9cf3573da952ce6c5d902cd by mydeveloperday
[clang-format] Revert e9e6e3b34a8e

Reverting {D92753} due to issues with #pragma indentation in #ifdef/endif structure
The file was modifiedclang/lib/Format/ContinuationIndenter.cpp
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/include/clang/Format/Format.h
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.h
Commit e7bc6c594b75602c23cb901f53b3a30d48e2ee78 by Raphael Isemann
Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference

The build server should now have the missing dependencies.

Original summary:

Currently LLDB uses epydoc to generate the Python API reference for the website.
epydoc however is unmaintained since more than a decade and no longer works with
Python 3. Also whatever setup we had once for generating the documentation on
the website server no longer seems to work, so the current website documentation
has been stale since more than a year.

This patch replaces epydoc with sphinx and its automodapi plugin that can
generate Python API references. LLVM already uses sphinx for the rest of the
documentation, so this way we are more consistent with the rest of LLVM. The
only new dependency is the automodapi plugin for sphinx.

This patch effectively does the following things:
* Remove the epydoc code.
* Make a new dummy Python API page in our website that just calls the Sphinx
  command for generated the API documentation.
* Add a mock _lldb module that is only used when generating the Python API.
This way we don't have to build all of LLDB to generate the API reference.

Some notes:
* The long list of skips is necessary due to boilerplate functions that SWIG
  is generating. Sadly automodapi is not really scriptable from what I can see,
  so we have to blacklist this stuff manually.
* The .gitignore change because automodapi wants a subfolder of our
  documentation directory to place generated documentation files there. The path
  is also what is used on the website, so we can't really workaround this
  (without copying the whole `docs` dir somewhere else when we build).
* We have to use environment variables to pass our build path to our sphinx
  configuration. Sphinx doesn't support passing variables onto that script.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D94489
The file was modifiedlldb/docs/index.rst
The file was modifiedlldb/docs/CMakeLists.txt
The file was addedlldb/docs/_lldb/__init__.py
The file was modified.gitignore
The file was modifiedlldb/docs/conf.py
The file was addedlldb/docs/python_api.rst
The file was modifiedllvm/cmake/modules/AddSphinxTarget.cmake
Commit 00dc97f16708aad67834552285c0af01b37303d6 by mydeveloperday
[clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates

https://bugs.llvm.org/show_bug.cgi?id=48594

Empty or small templates were not being treated the same way as small classes especially when SplitEmptyRecord was set to true

This revision aims to help this by identifying a case when we should try not to merge the lines together

Reviewed By: curdeius, JohelEGP

Differential Revision: https://reviews.llvm.org/D93839
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
The file was modifiedclang/unittests/Format/FormatTestCSharp.cpp
Commit 0f9908a7c9c547f2675e00f88cc11ec02ca28e8d by usx
[clangd] Use empty() instead of size()>0
The file was modifiedclang-tools-extra/clangd/Quality.cpp
Commit 9abbc050974ff117b79e8e049c52c56db3f49aec by usx
[clangd] Use !empty() instead of size()>0
The file was modifiedclang-tools-extra/clangd/Quality.cpp
Commit 4bfbfb9bcb790931b97da972ff02865810f43ce8 by nikita.ppv
[InstSimplify] Add tests for x*C1/C2<=x (NFC)

Tests for PR48744.
The file was modifiedllvm/test/Transforms/InstSimplify/icmp.ll
Commit a13c0f62c38131ef2656b06de02d82110abaf272 by nikita.ppv
[InstSimplify] Fold x*C1/C2 <= x (PR48744)

We can fold x*C1/C2 <= x to true if C1 <= C2. This is valid even
if the multiplication is not nuw: https://alive2.llvm.org/ce/z/vULors

The multiplication or division can be replaced by shifts. We don't
handle the case where both are shifts, as that should get folded
away by InstCombine.
The file was modifiedllvm/test/Transforms/InstSimplify/icmp.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit acdc74568927d47f94816e73b6e105c9460cc3e4 by Raphael Isemann
[lldb][docs] Cleanup the Python doc strings for SB API classes

The first line of the doc string ends up on the SB API class summary at
the root page of the Python API  web page of LLDB. Currently many of the
descriptions are missing or are several lines which makes the table really
hard to read.

This just adds the missing docstrings where possible and fixes the formatting
where necessary.
The file was modifiedlldb/bindings/interface/SBFileSpecList.i
The file was modifiedlldb/bindings/interface/SBTrace.i
The file was modifiedlldb/bindings/interface/SBAttachInfo.i
The file was modifiedlldb/bindings/interface/SBStringList.i
The file was modifiedlldb/bindings/interface/SBMemoryRegionInfoList.i
The file was modifiedlldb/bindings/interface/SBQueue.i
The file was modifiedlldb/bindings/interface/SBLanguageRuntime.i
The file was modifiedlldb/bindings/interface/SBTraceOptions.i
The file was modifiedlldb/bindings/interface/SBInstruction.i
The file was modifiedlldb/bindings/interface/SBQueueItem.i
The file was modifiedlldb/bindings/interface/SBType.i
The file was modifiedlldb/bindings/interface/SBPlatform.i
The file was modifiedlldb/bindings/interface/SBCommunication.i
The file was modifiedlldb/bindings/interface/SBReproducer.i
The file was modifiedlldb/bindings/interface/SBData.i
The file was modifiedlldb/bindings/interface/SBLineEntry.i
The file was modifiedlldb/bindings/interface/SBVariablesOptions.i
The file was modifiedlldb/bindings/interface/SBHostOS.i
The file was modifiedlldb/bindings/interface/SBLaunchInfo.i
The file was modifiedlldb/bindings/python/python-extensions.swig
The file was modifiedlldb/bindings/interface/SBTypeEnumMember.i
The file was modifiedlldb/bindings/interface/SBThreadPlan.i
The file was modifiedlldb/bindings/interface/SBExecutionContext.i
The file was modifiedlldb/bindings/interface/SBModuleSpec.i
The file was modifiedlldb/bindings/interface/SBFrame.i
The file was modifiedlldb/bindings/interface/SBBreakpoint.i
Commit 469ceaf53892d26f7b68f86f1feb38fe7057815e by Dávid Bolvanský
[Tests] Add test for PR45691
The file was addedllvm/test/Transforms/InstCombine/ashr-or-mul-abs.ll
Commit ed396212da41feed9bffb8cc1ca6518ab031a3c7 by Dávid Bolvanský
[InstCombine] Transform abs pattern using multiplication to abs intrinsic (PR45691)

```
unsigned r(int v)
{
    return (1 | -(v < 0)) * v;
}

`r` is equivalent to `abs(v)`.

```

```
define <4 x i8> @src(<4 x i8> %0) {
%1:
  %2 = ashr <4 x i8> %0, { 31, undef, 31, 31 }
  %3 = or <4 x i8> %2, { 1, 1, 1, undef }
  %4 = mul nsw <4 x i8> %3, %0
  ret <4 x i8> %4
}
=>
define <4 x i8> @tgt(<4 x i8> %0) {
%1:
  %2 = icmp slt <4 x i8> %0, { 0, 0, 0, 0 }
  %3 = sub nsw <4 x i8> { 0, 0, 0, 0 }, %0
  %4 = select <4 x i1> %2, <4 x i8> %3, <4 x i8> %0
  ret <4 x i8> %4
}
Transformation seems to be correct!
```

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D94874
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
The file was modifiedllvm/test/Transforms/InstCombine/ashr-or-mul-abs.ll
Commit 7e9e6ac526ebd90fe8ec0b8d2bb6edd3516ab908 by Raphael Isemann
[lldb][docs] Fix some RST formatting errors related to code examples.

Mostly just making sure the indentation is right (SBDebugger had 0 spaces
as it was still plain text, the others had too much indentation or other
minor issues).
The file was modifiedlldb/bindings/interface/SBStructuredData.i
The file was modifiedlldb/bindings/interface/SBBroadcaster.i
The file was modifiedlldb/bindings/interface/SBCommandInterpreterRunOptions.i
The file was modifiedlldb/bindings/interface/SBDebugger.i
The file was modifiedlldb/bindings/interface/SBType.i
The file was modifiedlldb/bindings/interface/SBProcess.i
Commit 352fcfc69788093b50971a9f5540a61fa0887ce1 by kazu
[llvm] Use llvm::sort (NFC)
The file was modifiedllvm/lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp
The file was modifiedllvm/lib/Object/COFFObjectFile.cpp
The file was modifiedllvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp
The file was modifiedllvm/lib/Support/DebugCounter.cpp
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
The file was modifiedllvm/tools/llvm-cov/CoverageExporterLcov.cpp
The file was modifiedllvm/tools/llvm-cov/CoverageExporterJson.cpp
The file was modifiedllvm/lib/DebugInfo/GSYM/GsymCreator.cpp
The file was modifiedllvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonBlockRanges.cpp
The file was modifiedllvm/lib/TextAPI/MachO/TextStub.cpp
The file was modifiedllvm/lib/FileCheck/FileCheck.cpp
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp
Commit a59126115e9586dd7fda4bb365ee43682814fc53 by kazu
[IRBuilder] "Zero"-initialize SmallVector (NFC)
The file was modifiedllvm/lib/IR/IRBuilder.cpp
Commit 50be8e447152b8512521e568e4918dec486c25a5 by kazu
[TableGen] Drop redundant const from return types (NFC)

Identified with readability-const-return-type.
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/utils/TableGen/CodeGenRegisters.h
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/utils/TableGen/OptParserEmitter.cpp
The file was modifiedllvm/utils/TableGen/CodeGenTarget.h
The file was modifiedllvm/utils/TableGen/CodeGenRegisters.cpp
The file was modifiedllvm/utils/TableGen/DAGISelMatcher.h
Commit 9a7fb0848771e3d38baf10e4d1078b50dd884265 by steveire
NFC: Minor cleanup of function calls
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp
Commit 1cc477f030bdeb6de98c6bde89fa7850630def24 by nikita.ppv
[SimplifyCFG] Add test for PR48778 (NFC)

The sdiv is incorrectly speculated.
The file was addedllvm/test/Transforms/SimplifyCFG/pr48778-sdiv-speculation.ll
Commit 4229b87ed36cf20b95b363393452aa4815e344e2 by nikita.ppv
[ValueTracking] Fix isSafeToSpeculativelyExecute for sdiv (PR48778)

The != -1 check does not work correctly for all bitwidths. Use
isAllOnesValue() instead.
The file was modifiedllvm/test/Transforms/SimplifyCFG/pr48778-sdiv-speculation.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit a89242d874df72cddeafbebc75ac377371e72796 by pavel
[lldb] Skip TestPlatformProcessConnect on windows and darwin

The test fails (for different reasons) on these platforms. Skip for now.
The file was modifiedlldb/test/API/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
Commit 95d146182fdf2315e74943b93fb3bb0cbafc5d89 by i
Makefile.rules: Delete GCC 4.6 workaround

5.1 is the minimum supported version.
The file was modifiedlldb/packages/Python/lldbsuite/test/make/Makefile.rules
Commit f855751c1284c82c1c46b98f6d1b3ca2021d6cb9 by chandlerc
Fix openmp CMake build on non-Linux AArch64 systems.

This just checks for `/proc/cpuinfo` existing before reading it.

Tested on an ARM macOS machine.
The file was modifiedopenmp/runtime/cmake/LibompGetArchitecture.cmake
Commit 3bdf4507b66348ad78df4655a8e4f36c3fc10f3c by czhengsz
[NFC] [TargetRegisterInfo] add one use check to lookThruCopyLike.

add one use check to lookThruCopyLike.

The root node is safe to be deleted if we are sure that every
definition in the copy chain only has one use.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D92069
The file was modifiedllvm/include/llvm/CodeGen/TargetRegisterInfo.h
The file was modifiedllvm/lib/CodeGen/TargetRegisterInfo.cpp
Commit b74ae43c44b1c954508149409d3cfe6477be4079 by i
Makefile.rules: Make HOST_OS/OS simply expanded variable to avoid excess uname -s invocations

This decreases the number of runs from 18 to 1.
The file was modifiedlldb/packages/Python/lldbsuite/test/make/Makefile.rules
Commit a817f46d50c34ea6b798d28bd5fa6a3ee7435497 by Lang Hames
[JITLink][ELF] Skip DWARF sections in ELF objects.

This matches current JITLink/MachO behavior and avoids processing currently
unsupported relocations.
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
The file was addedllvm/test/ExecutionEngine/JITLink/X86/ELF_skip_debug_sections.s
Commit 2639c162b71f4b9e5c0ffefaa861fe915b73cb87 by aqjune
[InstCombine] more tests for D94861 (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/select-safe-transforms.ll
Commit 2d9890775f523a7a7ed2d7d064273bf7e28ebf20 by qiucofan
[PowerPC] [NFC] Add AIX triple to some regression tests

As part of the effort to improve AIX support, regression test coverage
misses quite a lot for AIX subtarget. This patch adds AIX triple to
those don't need extra change, and we can cover more cases in following
commits.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D94159
The file was modifiedllvm/test/CodeGen/PowerPC/mi-peephole-splat.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vec_clz.ll
The file was modifiedllvm/test/CodeGen/PowerPC/setcc-to-sub.ll
The file was modifiedllvm/test/CodeGen/PowerPC/fdiv.ll
The file was modifiedllvm/test/CodeGen/PowerPC/inc-of-add.ll
The file was modifiedllvm/test/CodeGen/PowerPC/shift-cmp.ll
The file was modifiedllvm/test/CodeGen/PowerPC/constant-combines.ll
The file was modifiedllvm/test/CodeGen/PowerPC/maddld.ll
The file was modifiedllvm/test/CodeGen/PowerPC/builtins-ppc-p9-darn.ll
The file was modifiedllvm/test/CodeGen/PowerPC/cmpb.ll
The file was modifiedllvm/test/CodeGen/PowerPC/popcnt-zext.ll
The file was modifiedllvm/test/CodeGen/PowerPC/rotl-2.ll
The file was modifiedllvm/test/CodeGen/PowerPC/bool-math.ll
The file was modifiedllvm/test/CodeGen/PowerPC/ori_imm32.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vec_constants.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vmladduhm.ll
The file was modifiedllvm/test/CodeGen/PowerPC/pr39478.ll
The file was modifiedllvm/test/CodeGen/PowerPC/pr33093.ll
The file was modifiedllvm/test/CodeGen/PowerPC/ftrunc-vec.ll
The file was modifiedllvm/test/CodeGen/PowerPC/hoist-logic.ll
The file was modifiedllvm/test/CodeGen/PowerPC/bswap64.ll
The file was modifiedllvm/test/CodeGen/PowerPC/unal-vec-ldst.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vec_revb.ll
The file was modifiedllvm/test/CodeGen/PowerPC/mulli.ll
The file was modifiedllvm/test/CodeGen/PowerPC/cmpb-ppc32.ll
The file was modifiedllvm/test/CodeGen/PowerPC/constants-i64.ll
The file was modifiedllvm/test/CodeGen/PowerPC/vec_shuffle_p8vector.ll
The file was modifiedllvm/test/CodeGen/PowerPC/and-mask.ll
The file was modifiedllvm/test/CodeGen/PowerPC/ori_imm64.ll
The file was modifiedllvm/test/CodeGen/PowerPC/fma-assoc.ll
Commit f776d8b12f0ec19cfff60c967565788ce4f926e6 by qiucofan
[Legalizer] Promote result type in expanding FP_TO_XINT

This patch promotes result integer type of FP_TO_XINT in expanding.
So crash in conversion from ppc_fp128 to i1 will be fixed.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D92473
The file was modifiedllvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
Commit 7011086dc1cd5575f971db0138a62387939e6a73 by listmail
[test] Autogen a loop vectorizer test to make future changes visible
The file was modifiedllvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
Commit 8356610f8d48ca7ecbb930dd9b987e4269784710 by listmail
[test] pre commit a couple more tests for vectorizing multiple exit loops
The file was modifiedllvm/test/Transforms/LoopVectorize/loop-form.ll
Commit e5619065b8b8c441c0cbccbb81f5fa7857cf670a by Lang Hames
[JITLink][ELF] New ELF skip-debug-sections test requires asserts.

This should fix the failures on Release mode testers.
The file was modifiedllvm/test/ExecutionEngine/JITLink/X86/ELF_skip_debug_sections.s
Commit 26a396c4ef481cb159bba631982841736a125a9c by czhengsz
[PowerPC] support register pressure reduction in machine combiner.

Reassociating some patterns to generate more fma instructions to
reduce register pressure.

Reviewed By: jsji

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