SuccessChanges

Summary

  1. Add REQUIRES to embed-bitcode-noopt.ll (details)
  2. [EarlyCSE] Fix crash with expensive checks after D87691 (details)
  3. Revert D87970 "[ThinLTO] Avoid temporaries when loading global decl attachment metadata" (details)
  4. Break long line accidentally left in the previous commit (details)
  5. [Driver] Check whether Gentoo-specific configuration directory exists (details)
  6. Re-apply https://reviews.llvm.org/D87921, was reverted to triage a PPC bot failure. (details)
  7. Enhance TableGen so that backends can produce better error messages. (details)
  8. [ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers (details)
  9. [TTI] add wrapper for matching vector reduction to reduce code duplication; NFC (details)
  10. Fix include location (accidentally committed a local variation) (details)
  11. [X86] Improve demanded bits for X86ISD::BEXTR. (details)
  12. [SLP] Make HorizontalReduction::getOperationData take an Instruction* instead of a Value*. NFCI (details)
  13. Revert "[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers" (details)
  14. Update Phabricator doc to remove the warning on "arc land": tags a properly handled server side now (details)
  15. Document the `--verbatim` flag from arc to update the description for a phabricator revision (details)
  16. [lsan] On Fuchsia, don't use atexit hook for leak checks (details)
  17. [gn build] Allow option to build with asan/tsan/ubsan (details)
  18. [mlir][OpFormatGen] Update "custom" directives for attributes. (details)
  19. [AArch64][SVE] Fix frame offset calculation when d8 is saved. (details)
  20. Add `breakpoint delete --disabled`: deletes all disabled breakpoints. (details)
  21. [AMDGPU] Make ds fp atomics overloadable (details)
  22. [IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData. (details)
  23. [PowerPC][PCRelative] Thread Local Storage Support for Local Dynamic (details)
  24. asan: Use `#if` to test CAN_SANITIZE_LEAKS (details)
  25. [scudo][standalone] Fix tests under ASan/UBSan (details)
  26. Revert "[lsan] On Fuchsia, don't use atexit hook for leak checks" (details)
  27. [AArch64][SVE] Add lowering for llvm frecpx (details)
  28. Allow init_priority values <= 100 and > 65535 within system headers. (details)
  29. [lldb] Normalize paths in new test (details)
  30. [LoopTerminology][NFC] Fix formatting typo (details)
  31. Clean up test file, NFC (details)
Commit 271928792e8016109fdd909889dc6bb582aa6f46 by mtrofin
Add REQUIRES to embed-bitcode-noopt.ll
The file was modifiedclang/test/Frontend/embed-bitcode-noopt.ll
Commit e976fb1e54f30403ca31764da69cba3769487e6a by kparzysz
[EarlyCSE] Fix crash with expensive checks after D87691

D87691 reordered some checks, which turned out to be unsafe. More
specifically, when examining a store instruction, the check against
getOrCreateResult should be done before attempting to call
isSameMemGeneration. Otherwise a crash in MSSA walker can occur.

This patch restores the order of these calls to what it was originally.
The file was modifiedllvm/lib/Transforms/Scalar/EarlyCSE.cpp
The file was addedllvm/test/Transforms/EarlyCSE/getmatchingvalue-crash.ll
Commit 01b9deba76a950f04574b656c7c31ae389104f2d by i
Revert D87970 "[ThinLTO] Avoid temporaries when loading global decl attachment metadata"

This reverts commit ab1b4810b55279bcf6fdd87be74a403440be3991.

It caused an issue in llvm::lto::thinBackend for a -fsanitize=cfi build.

```
AbbrevNo is 0 => "Invalid abbrev number"
0  llvm::BitstreamCursor::getAbbrev (this=0x9db4c8, AbbrevID=4) at llvm/include/llvm/Bitstream/BitstreamReader.h:528
1  0x00007f5f777a6eb4 in llvm::BitstreamCursor::readRecord (this=0x9db4c8, AbbrevID=4, Vals=llvm::SmallVector of Size 0, Capacity 64, Blob=0x7ffcd0e26558) at
usr/local/google/home/maskray/llvm/llvm/lib/Bitstream/Reader/BitstreamReader.cpp:228
2  0x00007f5f796bf633 in llvm::MetadataLoader::MetadataLoaderImpl::lazyLoadOneMetadata (this=0x9db3a0, ID=188, Placeholders=...) at /usr/local/google/home/mas
ray/llvm/llvm/lib/Bitcode/Reader/MetadataLoader.cpp:1091
3  0x00007f5f796c2527 in llvm::MetadataLoader::MetadataLoaderImpl::getMetadataFwdRefOrLoad (this=0x9db3a0, ID=188) at llvm
lib/Bitcode/Reader/MetadataLoader.cpp:668
4  0x00007f5f796bfff3 in llvm::MetadataLoader::getMetadataFwdRefOrLoad (this=0xd31580, Idx=188) at llvm/lib/Bitcode/Reader
MetadataLoader.cpp:2290
5  0x00007f5f79638265 in (anonymous namespace)::BitcodeReader::parseFunctionBody (this=0xd312e0, F=0x9de758) at llvm/lib/B
tcode/Reader/BitcodeReader.cpp:3938
6  0x00007f5f79635d32 in (anonymous namespace)::BitcodeReader::materialize (this=0xd312e0, GV=0x9de758) at llvm/lib/Bitcod
/Reader/BitcodeReader.cpp:5408
7  0x00007f5f7f8dbe3e in llvm::Module::materialize (this=0x9b92c0, GV=0x9de758) at llvm/lib/IR/Module.cpp:442
8  0x00007f5f7f7f8fbe in llvm::GlobalValue::materialize (this=0x9de758) at llvm/lib/IR/Globals.cpp:50
9  0x00007f5f83b9b5f5 in llvm::FunctionImporter::importFunctions (this=0x7ffcd0e2a730, DestModule=..., ImportList=...) at
llvm/lib/Transforms/IPO/FunctionImport.cpp:1182
```
The file was modifiedllvm/lib/Bitcode/Reader/MetadataLoader.cpp
The file was modifiedllvm/test/ThinLTO/X86/devirt2.ll
Commit 76e8c1899e7c9f9462ba08387472899d7de965af by kparzysz
Break long line accidentally left in the previous commit
The file was modifiedllvm/lib/Transforms/Scalar/EarlyCSE.cpp
Commit d882ca7f1f1dee7d812d6b1ae060b5f671ab9ebc by dmantipov
[Driver] Check whether Gentoo-specific configuration directory exists

Check whether /etc/env.d/gcc exists before trying to read from any
file from there. This saves a few OS calls on a non-Gentoo system.

Differential Revision: https://reviews.llvm.org/D87143
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Driver/ToolChains/Gnu.h
Commit 7d0bbe40901cf60558c619c3174d71d7c53ca144 by tmsriram
Re-apply https://reviews.llvm.org/D87921, was reverted to triage a PPC bot failure.

D87921 was reverted in commit b89059a31347dd09b55a96b99b3dbe38d7749908
as it was causing an unknown llvm PPC bot failure.  Reapplying the patch
after confirming that this is not responsible. Build bot failure:
https://reviews.llvm.org/D87921#2286644  which caused the revert.

The wrong placement of add pass with optimizations led to
-funique-internal-linkage-names being disabled.

Fixed the placement of the MPM.addpass for UniqueInternalLinkageNames to make it
work correctly with -O2 and new pass manager. Updated the tests to explicitly
check O0 and O1.

Differential Revision: https://reviews.llvm.org/D87921
The file was modifiedclang/test/CodeGen/unique-internal-linkage-names.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
Commit b3931188fdc84ce2bd93a0770ddc8182d18c5010 by paul
Enhance TableGen so that backends can produce better error messages.

Modify SearchableTableEmitter.cpp to take advantage.
Clean up formatting and capitalization issues.
The file was modifiedllvm/utils/TableGen/SearchableTableEmitter.cpp
The file was modifiedllvm/include/llvm/TableGen/Record.h
The file was modifiedllvm/test/TableGen/cond-type.td
The file was modifiedllvm/lib/TableGen/Record.cpp
The file was modifiedllvm/include/llvm/TableGen/Error.h
The file was modifiedllvm/test/TableGen/getsetop.td
The file was modifiedllvm/test/TableGen/self-reference-typeerror.td
The file was modifiedllvm/lib/TableGen/TGParser.cpp
The file was modifiedllvm/test/TableGen/if-type.td
The file was modifiedllvm/lib/TableGen/Error.cpp
The file was modifiedllvm/test/TableGen/generic-tables.td
Commit 5dd1b6d612655c9006ba97a8b6487ded80719b48 by epastor
[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers

Add support for .radix directive, and radix specifiers [yY] (binary), [oOqQ] (octal), and [tT] (decimal).

Also, when lexing MASM integers, require radix specifier; MASM requires that all literals without a radix specifier be treated as in the default radix. (e.g., 0100 = 100)

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D87400
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmLexer.h
The file was modifiedllvm/lib/MC/MCParser/AsmLexer.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
The file was addedllvm/test/tools/llvm-ml/radix.test
The file was addedllvm/test/tools/llvm-ml/radix_errors.test
Commit 6189a8d9f56ac9434eac94d6c515d3e460fdecd0 by spatel
[TTI] add wrapper for matching vector reduction to reduce code duplication; NFC

I'm not sure what this means, but the order in which we try
the matches makes a difference on at least 1 regression test...
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
Commit aca7105db9ae1a42d7cbf48934abb51169945425 by epastor
Fix include location (accidentally committed a local variation)
The file was modifiedllvm/lib/MC/MCParser/AsmLexer.cpp
Commit f21f835ee8e52f128281697d66f8b11a50a6d5dd by craig.topper
[X86] Improve demanded bits for X86ISD::BEXTR.

If the control is constant we can figure out exactly which bits
of the input are demanded.

Differential Revision: https://reviews.llvm.org/D88072
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/tbm-intrinsics.ll
Commit 7a3c643c35590df67716dfe3e3c60195ae385e43 by craig.topper
[SLP] Make HorizontalReduction::getOperationData take an Instruction* instead of a Value*. NFCI

All of the callers already have an Instruction *. Many of them
from a dyn_cast.

Also update the OperationData constructor to use a Instruction&
to remove a dyn_cast and make it clear that the pointer is non-null.

Differential Revision: https://reviews.llvm.org/D88132
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit b901b6ab173ac77edfe97e0dbd138410b940b4bc by epastor
Revert "[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers"

This reverts commit 5dd1b6d612655c9006ba97a8b6487ded80719b48.
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/AsmLexer.cpp
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmLexer.h
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was removedllvm/test/tools/llvm-ml/radix_errors.test
The file was removedllvm/test/tools/llvm-ml/radix.test
Commit 55f5a0137f5bbfc8411bd11a5d2695ba84534345 by joker.eph
Update Phabricator doc to remove the warning on "arc land": tags a properly handled server side now
The file was modifiedllvm/docs/Phabricator.rst
Commit 5281ba1994bdd21309d694c44e43ed825294221c by joker.eph
Document the `--verbatim` flag from arc to update the description for a phabricator revision
The file was modifiedllvm/docs/Phabricator.rst
Commit 0caad9fe441d5ee562e96d8b30b5574b492a933a by mcgrathr
[lsan] On Fuchsia, don't use atexit hook for leak checks

Fuchsia's system libraries are instrumented and use the lsan
allocator for internal purposes.  So leak checking needs to run
after all atexit hooks and after the system libraries' internal
exit-time hooks.  The <zircon/sanitizer.h> hook API calls the
__sanitizer_process_exit_hook function at exactly the right time.

Reviewed By: vitalybuka, phosek

Differential Revision: https://reviews.llvm.org/D86171
The file was modifiedcompiler-rt/lib/asan/asan_posix.cpp
The file was modifiedcompiler-rt/lib/asan/asan_rtl.cpp
The file was modifiedcompiler-rt/lib/asan/asan_internal.h
The file was modifiedcompiler-rt/lib/asan/asan_win.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan.h
The file was modifiedcompiler-rt/lib/lsan/lsan_fuchsia.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_posix.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan.cpp
The file was modifiedcompiler-rt/lib/asan/asan_fuchsia.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_common_fuchsia.cpp
Commit 11a75e6c92c9bde26f3c925b25135c2461afac1c by aeubanks
[gn build] Allow option to build with asan/tsan/ubsan

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D88056
The file was modifiedllvm/utils/gn/build/BUILD.gn
The file was modifiedllvm/utils/gn/build/buildflags.gni
Commit d14cfe10341681d18edf05ac98da2c5241b0864e by joker.eph
[mlir][OpFormatGen] Update "custom" directives for attributes.

This tweaks the generated code for parsing attributes with a custom
directive to call `addAttribute` on the `OperationState` directly,
and adds a newline after this call. Previously, the generated code
would call `addAttribute` on the `OperationState` field `attributes`,
which has no such method and fails to compile. Furthermore, the lack
of newline would generate code with incorrectly formatted single line
`if` statements. Added tests for parsing and printing attributes with
a custom directive.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D87860
The file was modifiedmlir/test/mlir-tblgen/op-format.mlir
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
Commit b92d084910b9febdafb9e701af6b73ddb7cac5af by efriedma
[AArch64][SVE] Fix frame offset calculation when d8 is saved.

If d8 is saved, the fp is not actually adjacent to the SVE
spills/allocations.  Fix the offset calculation to account for this.

Differential Revision: https://reviews.llvm.org/D88117
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/framelayout-sve.mir
Commit 3726ac41e9e00d2f6f87779b68f91ea264223c8a by jingham
Add `breakpoint delete --disabled`: deletes all disabled breakpoints.

Differential Revision: https://reviews.llvm.org/D88129
The file was modifiedlldb/source/Commands/CommandObjectBreakpoint.cpp
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
The file was modifiedlldb/source/Commands/Options.td
Commit 59691dc8740c7eada7fcf5552e0d2377780c6fb7 by Stanislav.Mekhanoshin
[AMDGPU] Make ds fp atomics overloadable

Differential Revision: https://reviews.llvm.org/D87947
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicsAMDGPU.td
The file was modifiedllvm/test/CodeGen/AMDGPU/lds_atomic_f32.ll
The file was modifiedclang/test/CodeGenCUDA/builtins-amdgcn.cu
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-vi.cl
Commit 6ada9e516f495eb6aa63e0c3e3edf3e3ae3c1a63 by andrew.litteken
[IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData.

The IRSimilarityCandidate is a container to hold a region of
IRInstructions and offer interfaces for the starting instruction, ending
instruction, parent function, length.  It also assigns a global value
number for each unique instance of a value in the region.

It also contains an interface to compare two IRSimilarity as to whether
they have the same sequence of similar instructions.

Tests for whether the instructions are similar are found in
unittests/Analysis/IRSimilarityIdentifierTest.cpp.

Recommit of: 4944bb190fed8861d4d043eaf45e3c1e12aa2dc5

Differential Revision: https://reviews.llvm.org/D86970
The file was modifiedllvm/include/llvm/Analysis/IRSimilarityIdentifier.h
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
The file was modifiedllvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Commit 652a8f150d4903abb53697ef1762026c6f5e716c by wei.huang
[PowerPC][PCRelative] Thread Local Storage Support for Local Dynamic

This patch is the initial support for the Local Dynamic Thread Local Storage
model to produce code sequence and relocation correct to the ABI for the model
when using PC relative memory operations.

Differential Revision: https://reviews.llvm.org/D87721
The file was addedllvm/test/CodeGen/PowerPC/pcrel-tls-local-dynamic.ll
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
The file was addedllvm/test/MC/PowerPC/pcrel-tls-local-dynamic-reloc.s
The file was modifiedllvm/include/llvm/MC/MCExpr.h
The file was modifiedllvm/lib/Target/PowerPC/PPCInstr64Bit.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/lib/MC/MCExpr.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCMCInstLower.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPC.h
Commit c96d0cceb684fa176b51d7df5f4f8370e2c983f4 by mcgrathr
asan: Use `#if` to test CAN_SANITIZE_LEAKS

The `if (0)` isn't necessarily optimized out so as not to create
a link-time reference to LSan runtime functions that might not
exist.  So use explicit conditional compilation instead.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D88173
The file was modifiedcompiler-rt/lib/lsan/lsan_common_fuchsia.cpp
The file was modifiedcompiler-rt/lib/asan/asan_rtl.cpp
Commit 2efc09c90914a6c887cb772130d6b375a1713472 by kostyak
[scudo][standalone] Fix tests under ASan/UBSan

Fix a potential UB in `appendSignedDecimal` (with -INT64_MIN) by making
it a special case.

Fix the terrible test cases for `isOwned`: I was pretty sloppy on those
and used some stack & static variables, but since `isOwned` accesses
memory prior to the pointer to check for the validity of the Scudo
header, it ended up being detected as some global and stack buffer out
of bounds accesses. So not I am using buffers with enough room so that
the test will not access memory prior to the variables.

With those fixes, the tests pass on the ASan+UBSan Fuchsia build.

Thanks to Roland for pointing those out!

Differential Revision: https://reviews.llvm.org/D88170
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/string_utils.cpp
Commit f161e84c10b6eb2255345ebfaaa2bbadb4b0fe2a by nikita.ppv
Revert "[lsan] On Fuchsia, don't use atexit hook for leak checks"

This reverts commit 0caad9fe441d5ee562e96d8b30b5574b492a933a.
This reverts commit c96d0cceb684fa176b51d7df5f4f8370e2c983f4.

Causes linker errors which were not fixed by the subsequent commit
either:

/home/nikic/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:503: error: undefined reference to '__asan::InstallAtExitCheckLeaks()'
The file was modifiedcompiler-rt/lib/lsan/lsan_common_fuchsia.cpp
The file was modifiedcompiler-rt/lib/asan/asan_win.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_posix.cpp
The file was modifiedcompiler-rt/lib/asan/asan_fuchsia.cpp
The file was modifiedcompiler-rt/lib/asan/asan_internal.h
The file was modifiedcompiler-rt/lib/lsan/lsan.cpp
The file was modifiedcompiler-rt/lib/asan/asan_posix.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_fuchsia.cpp
The file was modifiedcompiler-rt/lib/asan/asan_rtl.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan.h
Commit 3a76de42753e351311193ec1f729117b96a7bd9a by muhammad.asif.manzoor
[AArch64][SVE] Add lowering for llvm frecpx

Add the functionality to lower frecpx for passthru variant

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D88032
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
Commit af1d3e655991e5f0c86df372b8583a60d20268e0 by aaron
Allow init_priority values <= 100 and > 65535 within system headers.

This also adds some bare-bones documentation for the attribute rather
than leaving it undocumented.
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/test/SemaCXX/init-priority-attr.cpp
The file was modifiedclang/include/clang/Basic/AttrDocs.td
Commit 4a55c98fa7bee1e5ab1504db20ca4d7c8a083111 by jotrem
[lldb] Normalize paths in new test

The minidump-sysroot test I added in commit 20f84257 compares two paths
using a string comparison.  This causes the Windows buildbot to fail
because of mismatched forward slashes and backslashes.  Use
os.path.normcase to normalize before comparing.
The file was modifiedlldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
Commit 7aa982a57ce0dbf8fdbd276004615ddcf729c906 by sdi1600105
[LoopTerminology][NFC] Fix formatting typo
The file was modifiedllvm/docs/LoopTerminology.rst
Commit 57f097420d43adf3f38d66b31ed4ef49da62ae75 by kparzysz
Clean up test file, NFC
The file was modifiedllvm/test/Transforms/EarlyCSE/getmatchingvalue-crash.ll