SuccessChanges

Summary

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

Implements IS_ABSOLUTE_PATH from GNU tools.

C++17 is_absolute behavior is different the from the behavior defined by GNU
tools.

According to cppreference.com, C++17 states: "An absolute path is a path
that unambiguously identifies the location of a file without reference
to an additional starting location."

In other words, the rules are:
1. POSIX style paths with nonempty root directory are absolute.
2. Windows style paths with nonempty root name and root directory are
    absolute.
3. No other paths are absolute.

GNU rules are:
1. Paths starting with a path separator are absolute.
2. Windows style paths are also absolute if they start with a character
    followed by ':'.
3. No other paths are absolute.

On Windows style the path "C:\Users\Default" has "C:" as root name and "\"
as root directory.

Hence "C:" on Windows is absolute under GNU rules and not absolute under
C++17 because it has no root directory. Likewise "/" and "\" on Windows are
absolute under GNU and are not absolute under C++17 due to empty root name.

Related to PR46368.

Differential Revision: https://reviews.llvm.org/D87667
The file was modifiedllvm/unittests/Support/Path.cpp
The file was modifiedllvm/lib/Support/Path.cpp
The file was modifiedllvm/include/llvm/Support/Path.h
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.h
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
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/test/TableGen/self-reference-typeerror.td
The file was modifiedllvm/include/llvm/TableGen/Error.h
The file was modifiedllvm/lib/TableGen/Error.cpp
The file was modifiedllvm/test/TableGen/if-type.td
The file was modifiedllvm/include/llvm/TableGen/Record.h
The file was modifiedllvm/lib/TableGen/TGParser.cpp
The file was modifiedllvm/test/TableGen/generic-tables.td
The file was modifiedllvm/test/TableGen/cond-type.td
The file was modifiedllvm/utils/TableGen/SearchableTableEmitter.cpp
The file was modifiedllvm/lib/TableGen/Record.cpp
The file was modifiedllvm/test/TableGen/getsetop.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/lib/MC/MCParser/AsmLexer.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
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmLexer.h
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
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/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.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 removedllvm/test/tools/llvm-ml/radix_errors.test
The file was removedllvm/test/tools/llvm-ml/radix.test
The file was modifiedllvm/lib/MC/MCParser/AsmLexer.cpp
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmLexer.h
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/lsan/lsan.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_fuchsia.cpp
The file was modifiedcompiler-rt/lib/asan/asan_posix.cpp
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/asan/asan_fuchsia.cpp
The file was modifiedcompiler-rt/lib/asan/asan_internal.h
The file was modifiedcompiler-rt/lib/lsan/lsan_common_fuchsia.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_posix.cpp
The file was modifiedcompiler-rt/lib/asan/asan_rtl.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/lib/Dialect/Test/TestDialect.cpp
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
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/test/CodeGen/AArch64/framelayout-sve.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
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/Options.td
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
The file was modifiedlldb/source/Commands/CommandObjectBreakpoint.cpp
Commit 59691dc8740c7eada7fcf5552e0d2377780c6fb7 by Stanislav.Mekhanoshin
[AMDGPU] Make ds fp atomics overloadable

Differential Revision: https://reviews.llvm.org/D87947
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-vi.cl
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
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/unittests/Analysis/IRSimilarityIdentifierTest.cpp
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.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 modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCInstr64Bit.td
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was modifiedllvm/lib/MC/MCExpr.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPC.h
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def
The file was modifiedllvm/include/llvm/MC/MCExpr.h
The file was modifiedllvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
The file was addedllvm/test/CodeGen/PowerPC/pcrel-tls-local-dynamic.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCMCInstLower.cpp
The file was addedllvm/test/MC/PowerPC/pcrel-tls-local-dynamic-reloc.s
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/asan/asan_rtl.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_common_fuchsia.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan.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_posix.cpp
The file was modifiedcompiler-rt/lib/lsan/lsan_fuchsia.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