Changes

Summary

  1. [AArch64][SVE] Integer reduction instructions pattern/intrinsics. (details)
  2. [OPENMP50]Add support for if clause for simd part in master taskloop (details)
  3. [Syntax] Show input code on tests failures. NFC (details)
  4. [OPENMP][DOCS]Update list of the supported features, NFC. (details)
  5. [InstCombine] add tests for fpext+select+fptrunc; NFC (details)
  6. [DebugInfo] Re-apply two patches to MachineSink (details)
  7. [DebugInfo] Don't reorder DBG_VALUEs when sunk (details)
  8. [DebugInfo] Don't create multiple DBG_VALUEs when sinking (details)
  9. [InstCombine] add FMF guard to builder in fptrunc transform; NFC (details)
  10. [InstCombine] narrow select with FP casts (details)
  11. [AMDGPU][HIP] Improve opt-level handling (details)
  12. [OPENMP50]Add support for if clause for simd part in parallel master (details)
  13. [ASTImporter] Various source location and range import fixes. (details)
  14. [scan-build-py] Set of small fixes (details)
  15. [ELF][PPC64] Don't copy ppc64BranchltIndex in replaceWithDefined (details)
  16. [DSE] Fix for a dangling point bug in DeadStoreElimination. (details)
  17. [llvm] llvm-ifs: Support for handling empty IFS and merging weak+strong (details)
  18. [LLDB] Replacing use of ul suffix in GetMaxU64Bitfield since it not (details)
  19. [AArch64] Fix MUL/SUB fusing (details)
  20. [ELF][PPC64] Support long branch thunks with addends (details)
  21. [InstCombine] Invert `add A, sext(B) --> sub A, zext(B)` (details)
  22. [OPENMP50]Add support for if clause for simd part in distribute parallel (details)
  23. Revert "[InstCombine] keep assumption before sinking calls" (details)
  24. [X86] Remove ProcIntelGLM/ProcIntelGLP/ProcIntelTRM and replace them (details)
  25. [GlobalISel] Localizer: Allow targets not to run the pass conditionally (details)
  26. scudo: Fix the build of wrappers_c_test.cpp on Android. (details)
  27. scudo: Fix one of the C wrapper tests on Android. (details)
  28. LowerDbgDeclare: look through bitcasts. (details)
  29. Revert "[DSE] Fix for a dangling point bug in DeadStoreElimination." (details)
  30. [clangd] Find reference to template parameter in 'sizeof...' expression (details)
  31. [clangd] Highlighting dependent types in more contexts (details)
  32. Use diff -b on zlib tests so they pass on Windows (details)
  33. [OpenMP50] Add parallel master construct (details)
  34. Add documentation headings for the OpenCL attributes. (details)
  35. [AIX] Make sure to use QualNames for external global objects (details)
  36. [libomptarget][nfc] Move omptarget-nvptx under common (details)
  37. Set a source location for Objective-C accessor stubs even when there is (details)
  38. Debug Info: Assert that location is available for cleanups (details)
  39. DebugInfo: Fix LTO+DWARFv5 loclists (details)
  40. Debug Info: Apply a default location for cleanups if none is available. (details)
  41. [libomptarget][nfc] Introduce SHARED, ALIGN macros (details)
  42. Add a default copy constructor for -Wdeprecated-copy warnings. (details)
  43. Properly convert all declaration non-type template arguments when (details)
  44. [IR] Add a default copy constructor for -Wdeprecated-copy (details)
  45. [IR] Move ctor in the NDEBUG branch (details)
  46. [Concepts] Constraint Enforcement & Diagnostics (details)
  47. [lldb] Update hardcoded Makefile.rules inclusions. (details)
  48. [Concepts] Fix build failures in D41569 (details)
  49. gn build: Merge fdf80e86a52 (details)
  50. [AutoFDO] Properly merge context-sensitive profile of inlinee back to (details)
  51. [AutoFDO] Top-down Inlining for specialization with context-sensitive (details)
  52. Handle two corner cases in creduce-clang-crash.py (details)
  53. [RegisterCoalescer] Fix the creation of subranges when rematerialization (details)
  54. [ThinLTO] Add option to disable readonly/writeonly attribute propagation (details)
Commit b29916cec3f45e5fb5efff5104acf142f348c724 by amehsan
[AArch64][SVE] Integer reduction instructions pattern/intrinsics.
Added pattern matching/intrinsics for the following SVE instructions:
-- saddv, uaddv
-- smaxv, sminv, umaxv, uminv
-- orv, eorv, andv
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-int-reduce-pred.ll
The file was modifiedllvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/include/llvm/IR/IntrinsicsAArch64.td
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
Commit 853961f21a6d07352204eb4820a93eab87ba0057 by a.bataev
[OPENMP50]Add support for if clause for simd part in master taskloop
simd directive.
According to OpenMP 5.0, the if clause can be applied to simd
subdirective in the combined directives.
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/master_taskloop_simd_ast_print.cpp
The file was modifiedclang/test/OpenMP/master_taskloop_simd_codegen.cpp
Commit 242649c17c5b11bcc788b6f69bd3eed44cfd3d79 by ibiryukov
[Syntax] Show input code on tests failures. NFC
The file was modifiedclang/unittests/Tooling/Syntax/TreeTest.cpp
Commit c3279beded97bbc00307b59f91a9a98e2ae417a7 by a.bataev
[OPENMP][DOCS]Update list of the supported features, NFC.
The file was modifiedclang/docs/OpenMPSupport.rst
Commit 403bb33a2e6a966b9dae203cf7845d6d0538e76b by spatel
[InstCombine] add tests for fpext+select+fptrunc; NFC
The file was modifiedllvm/test/Transforms/InstCombine/fptrunc.ll
Commit fca41001963cb473182c7b3b665ea1f03f94203a by jmorse+git
[DebugInfo] Re-apply two patches to MachineSink
These were:
* D58386 / f5e1b718a67 / reverted in d382a8a768b
* D58238 / ee50590e168 / reverted in a8db456b53a
Of which the latter has a performance regression tracked in PR43855,
fixed by D70672 / D70676, which will be committed atomically with this
reapplication.
Contains a minor difference to account for a change in the IsCopyInstr
signature.
The file was addedllvm/test/DebugInfo/MIR/X86/sink-leaves-undef.mir
The file was addedllvm/test/DebugInfo/MIR/X86/machinesink.mir
The file was modifiedllvm/lib/CodeGen/MachineSink.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/postra-subreg-sink.mir
Commit e4cdd6263175f7289cfb61608944892d8c76b6ff by jmorse+git
[DebugInfo] Don't reorder DBG_VALUEs when sunk
Fix part of PR43855, resolving a problem that comes from the
reapplication in 001574938e5. If we have two DBG_VALUE insts in a block
that specify the location of the same variable, for example:
   %0 = someinst
  DBG_VALUE %0, !123, !DIExpression()
  %1 = anotherinst
  DBG_VALUE %1, !123, !DIExpression()
if %0 were to sink, the corresponding DBG_VALUE would sink too, past the
next DBG_VALUE, effectively re-ordering assignments. To fix this, I've
added a SeenDbgVars set recording what variable locations have been seen
in a block already (working bottom up), and now flag DBG_VALUEs that
would pass a later DBG_VALUE for the same variable.
NB, this only works for repeated DBG_VALUEs in the same basic block, the
general case involving control flow is much harder, which I've written
up in PR44117.
Differential revision: https://reviews.llvm.org/D70672
The file was modifiedllvm/lib/CodeGen/MachineSink.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/machinesink.mir
Commit 30e8f80fd5a43a213f8feb124846223b61218f30 by jmorse+git
[DebugInfo] Don't create multiple DBG_VALUEs when sinking
This patch addresses a performance problem reported in PR43855, and
present in the reapplication in in 001574938e5. It turns out that
MachineSink will (often) move instructions to the first block that
post-dominates the current block, and then try to sink further. This
means if we have a lot of conditionals, we can needlessly create large
numbers of DBG_VALUEs, one in each block the sunk instruction passes
through.
To fix this, rather than immediately sinking DBG_VALUEs, record them in
a pass structure. When sinking is complete and instructions won't be
sunk any further, new DBG_VALUEs are added, avoiding lots of
intermediate DBG_VALUE $noregs being created.
Differential revision: https://reviews.llvm.org/D70676
The file was modifiedllvm/lib/CodeGen/MachineSink.cpp
The file was modifiedllvm/test/DebugInfo/MIR/X86/machinesink.mir
Commit 51e420c27e2dc493bd71a6305ffb4d8acb401755 by spatel
[InstCombine] add FMF guard to builder in fptrunc transform; NFC
This makes no difference currently because we don't apply FMF to FP
casts, but that may change.
This could also be a place to add a fold for select with fptrunc, so it
will make that patch easier/smaller.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 3c6b5d3674e85f2be81e74d104055269c017a430 by spatel
[InstCombine] narrow select with FP casts
Select doesn't change values, so truncate of extended operand cancels
out.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/fptrunc.ll
Commit d96ea47c75fdf4a62358eae49a0026bcf031bde6 by scott.linder
[AMDGPU][HIP] Improve opt-level handling
Summary: The HIP toolchain invokes `llc` without an explicit opt-level,
meaning it always uses the default (-O2). This makes it impossible to
use -O1, for example. The HIP toolchain also coerces -Os/-Oz to -O2 even
when invoking opt, and it coerces -Og to -O2 rather than -O1.
Forward the opt-level to `llc` as well as `opt`, and only coerce levels
where it is required.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70987
The file was modifiedclang/test/Driver/hip-toolchain-mllvm.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc.hip
The file was modifiedclang/test/Driver/hip-toolchain-no-rdc.hip
The file was addedclang/test/Driver/hip-toolchain-opt.hip
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
Commit 5c517a6b13bfee99e054128231ddf64e70e5a6ab by a.bataev
[OPENMP50]Add support for if clause for simd part in parallel master
taskloop simd directive.
According to OpenMP 5.0, the if clause can be applied to simd
subdirective in the combined directives.
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_simd_ast_print.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_simd_codegen.cpp
Commit a9f10ebffaa29e009081faa2720f8ea9bb356658 by 1.int32
[ASTImporter] Various source location and range import fixes.
Summary: ASTImporter contained wrong or missing imports of
SourceLocation and SourceRange for some objects. At least a part of such
errors is fixed now. Source location import fixes in namespace, enum,
record, class template specialization declarations and DeclRefExpr,
UnresolvedLookupExpr, UnresolvedMemberExpr, NestedNameSpecifierLoc.
Reviewers: martong, a.sidorin, shafik
Reviewed By: shafik
Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60499
The file was modifiedclang/test/Import/cxx-anon-namespace/test.cpp
The file was modifiedclang/test/Import/struct-and-var/test.cpp
The file was addedclang/test/Import/namespace/Inputs/NS.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was addedclang/test/Import/namespace/test.cpp
The file was modifiedclang/test/Import/template-specialization/test.cpp
The file was modifiedclang/test/Import/enum/test.cpp
Commit 8994d632c8d31d527490e8693b0881d9278464e6 by xazax
[scan-build-py] Set of small fixes
* Unhandled exceptions
* Typos
Differential Revision: https://reviews.llvm.org/D70693
The file was modifiedclang/tools/scan-build-py/libscanbuild/clang.py
The file was modifiedclang/tools/scan-build-py/libscanbuild/analyze.py
Commit 944f109ad778d53827b2473c8465985733c931b4 by maskray
[ELF][PPC64] Don't copy ppc64BranchltIndex in replaceWithDefined
replaceWithDefined is used by canonical PLT and copy relocations, which
imply that the symbol is preemptable. ppc64BranchltIndex is only used by
non-preemptable cases, and it can only be the default value in
replaceWithDefined.
The file was modifiedlld/ELF/Relocations.cpp
Commit 1847fd9d85506ecee692230cb2500e3774ec628e by flo
[DSE] Fix for a dangling point bug in DeadStoreElimination.
The patch makes sure that the LastThrowing pointer does not point to any
instruction deleted by call to DeleteDeadInstruction.
While iterating through the instructions the pass maintains a pointer to
the lastThrowing Instruction. A call to deleteDeadInstruction deletes a
dead store and other instructions feeding the original dead instruction
which also become dead. The instruction pointed by the lastThrowing
pointer could also be deleted by the call to DeleteDeadInstruction and
thus it becomes a dangling pointer. Because of this, we see an error in
the next iteration.
In the patch, we maintain a list of throwing instructions encountered
previously and use the last non deleted throwing instruction from the
container.
Patch by Ankit <quic_aankit@quicinc.com>
Reviewers: fhahn, bcahoon, efriedma
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D65326
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was addedllvm/test/Transforms/DeadStoreElimination/DeleteThrowableInst.ll
Commit ef7267def69f9416b53388a5b5ea612bed9573d9 by puyan
[llvm] llvm-ifs: Support for handling empty IFS and merging weak+strong
symbols.
The following changes enable llvm-ifs to handle the following merge
conflicts:
* Weak + Strong symbol merging for the same symbol
* empty vs non-empty triple field
* empty vs non-empty object file format
Differential Revision: https://reviews.llvm.org/D70834
The file was addedllvm/test/tools/llvm-ifs/default-empty.ifs
The file was modifiedllvm/test/tools/llvm-ifs/conflict-weak.ifs
The file was addedllvm/test/tools/llvm-ifs/weak-mismatch.ifs
The file was addedllvm/test/tools/llvm-ifs/Inputs/strong-mismatch-size.ifs
The file was addedllvm/test/tools/llvm-ifs/Inputs/strong-mismatch-type.ifs
The file was addedllvm/test/tools/llvm-ifs/strong.ifs
The file was modifiedllvm/tools/llvm-ifs/llvm-ifs.cpp
Commit fffd70291e124efc4a5bd475dccfc41cbc4bca8a by shafik
[LLDB] Replacing use of ul suffix in GetMaxU64Bitfield since it not
guarenteed to be 64 bit
GetMaxU64Bitfield(...) uses the ul suffix but we require a 64 bit
unsigned integer and ul could be 32 bit. So this replacing it with a
explicit cast and refactors the code around it to use an early exit.
Differential Revision: https://reviews.llvm.org/D70992
The file was modifiedlldb/source/Utility/DataExtractor.cpp
The file was modifiedlldb/unittests/Utility/DataExtractorTest.cpp
Commit e503fee904d8c17c089d27ab928bc72eeeece649 by Sanne.Wouda
[AArch64] Fix MUL/SUB fusing
Summary: When MUL is the first operand to SUB, we can't use MLS because
the accumulator should be negated.  Emit a NEG of the accumulator and an
MLA instead, similar to what we do for FMUL / FSUB fusing.
Reviewers: dmgreen, SjoerdMeijer, fhahn, Gerolf, mstorsjo, asbirlea
Reviewed By: asbirlea
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71067
The file was modifiedllvm/test/CodeGen/AArch64/neon-mla-mls.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Commit c8f0d3e130d336f49c204b9ee317bf99be192a82 by maskray
[ELF][PPC64] Support long branch thunks with addends
Fixes PPC64 part of PR40438
  // clang -target ppc64le -c a.cc
// .text.unlikely may be placed in a separate output section (via -z
keep-text-section-prefix)
// The distance between bar in .text.unlikely and foo in .text may be
larger than 32MiB.
static void foo() {}
__attribute__((section(".text.unlikely"))) static int bar() { foo();
return 0; }
__attribute__((used)) static int dummy = bar();
This patch makes such thunks with addends work for PPC64.
AArch64: .text -> `__AArch64ADRPThunk_ (adrp x16, ...; add x16, x16,
...; br x16)` -> target PPC64: .text -> `__long_branch_ (addis 12, 2,
...; ld 12, ...(12); mtctr 12; bctr)` -> target
AArch64 can leverage ADRP to jump to the target directly, but PPC64
needs to load an address from .branch_lt . Before Power ISA v3.0, the
PC-relative ADDPCIS was not available. .branch_lt was invented to work
around the limitation.
Symbol::ppc64BranchltIndex is replaced by
PPC64LongBranchTargetSection::entry_index which take addends into
consideration.
The tests are rewritten: ppc64-long-branch.s tests -no-pie and
ppc64-long-branch-pi.s tests -pie and -shared.
Reviewed By: sfertile
Differential Revision: https://reviews.llvm.org/D70937
The file was addedlld/test/ELF/ppc64-long-branch-pi.s
The file was modifiedlld/ELF/Arch/PPC64.cpp
The file was modifiedlld/ELF/Relocations.cpp
The file was modifiedlld/ELF/SyntheticSections.h
The file was modifiedlld/ELF/Thunks.cpp
The file was removedlld/test/ELF/ppc64-shared-long_branch.s
The file was modifiedlld/test/ELF/ppc64-long-branch.s
The file was modifiedlld/ELF/Symbols.cpp
The file was modifiedlld/ELF/Symbols.h
The file was modifiedlld/ELF/SyntheticSections.cpp
Commit 796fa662f12851494303558e0d36b239c55343e7 by lebedev.ri
[InstCombine] Invert `add A, sext(B) --> sub A, zext(B)`
canonicalization (to `sub A, zext B -> add A, sext B`)
Summary: D68408 proposes to greatly improve our negation sinking
abilities. But in current canonicalization, we produce `sub A, zext(B)`,
which we will consider non-canonical and try to sink that negation,
undoing the existing canonicalization. So unless we explicitly stop
producing previous canonicalization, we will have two conflicting folds,
and will end up endlessly looping.
This inverts canonicalization, and adds back the obvious fold that we'd
miss:
* `sub [nsw] Op0, sext/zext (bool Y) -> add [nsw] Op0, zext/sext (bool
Y)`
https://rise4fun.com/Alive/xx4
* `sext(bool) + C -> bool ? C - 1 : C`
https://rise4fun.com/Alive/fBl
It is obvious that `@ossfuzz_9880()` /
`@lshr_out_of_range()`/`@ashr_out_of_range()`
(oss-fuzz 4871) are no longer folded as much, though those aren't really
worrying.
Reviewers: spatel, efriedma, t.p.northover, hfinkel
Reviewed By: spatel
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71064
The file was modifiedllvm/test/Transforms/InstCombine/apint-shift.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
The file was modifiedllvm/test/Transforms/InstCombine/logical-select.ll
The file was modifiedllvm/test/Transforms/InstCombine/zext-bool-add-sub.ll
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstCombine/shift.ll
Commit 52812f2ade71476ea309a3482c93d0c9db1fa45b by a.bataev
[OPENMP50]Add support for if clause for simd part in distribute parallel
for simd directive.
According to OpenMP 5.0, the if clause can be applied to simd
subdirective in the combined directives.
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp
Commit 055779a9ac11e56442cbcdc73da59f8bce7ce57d by llvm
Revert "[InstCombine] keep assumption before sinking calls"
Summary: This reverts commit c3b06d0c393e533eab712922911d14e5a079fa5d.
Reason for revert: Caused miscompiles when inserting assume for undef.
Also adds a test to prevent similar breakage in future.
Fixes PR44154.
Reviewers: rnk, jdoerfert, efriedma, xbolva00
Reviewed By: rnk
Subscribers: thakis, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70933
The file was removedllvm/test/Transforms/InstCombine/assume-replacing-call.ll
The file was addedllvm/test/Transforms/InstCombine/unused-nonnull.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit f688570d5c5493e969d5fca599d6eb8a796e27ca by craig.topper
[X86] Remove ProcIntelGLM/ProcIntelGLP/ProcIntelTRM and replace them
with a single feature flag covers the two places they were used.
Differential Revision: https://reviews.llvm.org/D71048
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86.td
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.h
The file was modifiedllvm/lib/Target/X86/X86Subtarget.h
Commit bfa3d260b8238562b39f6a405e7ac366060401bc by vkeles
[GlobalISel] Localizer: Allow targets not to run the pass conditionally
Summary: Previously, it was not possible to skip running the localizer
pass conditionally. This patch adds an input function to the pass which
decides if the pass should run on the given MachineFunction or not.
No test case as there is no upstream target needs this functionality.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: rovka, hiraditya, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71038
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/Localizer.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/Localizer.cpp
Commit 0cfe0a7bb0e10a96c3c98891961d37160a931d20 by peter
scudo: Fix the build of wrappers_c_test.cpp on Android.
The Android headers don't provide a declaration of valloc or pvalloc, so
we need to declare them ourselves.
Differential Revision: https://reviews.llvm.org/D71077
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
Commit c8a2882a97e2efb02934dcc279f1e3e302982762 by peter
scudo: Fix one of the C wrapper tests on Android.
The test ScudoWrappersCTest.Realloc expects realloc of memalign to work
on Android, but this relies on dealloc_type_mismatch being set to false.
Commit 0d3d4d3b0 caused us to start setting it to true in the C wrapper
tests, which broke the test. Set it to the correct value on Android.
Differential Revision: https://reviews.llvm.org/D71078
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/scudo_unit_test_main.cpp
Commit 6f89cbc429f8459321733f2ae357f508a62b0df6 by eugenis
LowerDbgDeclare: look through bitcasts.
Summary: Emit a value debug intrinsic (with OP_deref) when an alloca
address is passed to a function call after going through a bitcast.
This generates an FP or SP-relative location for the local variable in
the following case:
int x;
use((void *)&x;
Reviewers: aprantl, vsk, pcc
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70752
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was addedllvm/test/Transforms/Util/dbg-call-bitcast.ll
Commit 19071173fc2e0c30c898a8cf8e42a0eaf3a3a35c by flo
Revert "[DSE] Fix for a dangling point bug in DeadStoreElimination."
The commit causes a failure:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/20911
This reverts commit 1847fd9d85506ecee692230cb2500e3774ec628e.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was removedllvm/test/Transforms/DeadStoreElimination/DeleteThrowableInst.ll
Commit 1a4ee4c88f21c0e6860983a80bfa51a25b4af700 by zeratul976
[clangd] Find reference to template parameter in 'sizeof...' expression
Fixes https://github.com/clangd/clangd/issues/213.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95,
cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70740
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp
The file was modifiedclang-tools-extra/clangd/FindTarget.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
Commit de3dbc4f41665e60f53eb3d41fcadb2b322cf6f0 by zeratul976
[clangd] Highlighting dependent types in more contexts
Fixes https://github.com/clangd/clangd/issues/214.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95,
cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70746
The file was modifiedclang-tools-extra/clangd/SemanticHighlighting.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
Commit 23e63a906d0387d5ac7e4d3a57401f016b14c677 by akhuang
Use diff -b on zlib tests so they pass on Windows
Reviewers: hubert.reinterpretcast
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71036
The file was modifiedllvm/test/tools/llvm-profdata/profile-symbol-list-compress.test
The file was modifiedllvm/test/tools/llvm-profdata/roundtrip-compress.test
Commit 47d6094d7fd463707598a0e65dd44a0d1cc279eb by a.bataev
[OpenMP50] Add parallel master construct
Reviewers: ABataev, jdoerfert
Reviewed By: ABataev
Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits,
sandoval, dreachem
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70726
The file was modifiedclang/lib/AST/StmtOpenMP.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/lib/AST/StmtPrinter.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngine.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was addedclang/test/OpenMP/parallel_master_reduction_messages.cpp
The file was modifiedclang/lib/AST/StmtProfile.cpp
The file was modifiedclang/test/OpenMP/nesting_of_regions.cpp
The file was modifiedclang/tools/libclang/CIndex.cpp
The file was addedclang/test/OpenMP/parallel_master_ast_print.cpp
The file was addedclang/test/OpenMP/parallel_master_copyin_messages.cpp
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h
The file was addedclang/test/OpenMP/parallel_master_if_messages.cpp
The file was modifiedclang/include/clang/AST/StmtOpenMP.h
The file was addedclang/test/OpenMP/parallel_master_num_threads_messages.cpp
The file was addedclang/test/OpenMP/parallel_master_message.cpp
The file was addedclang/test/OpenMP/parallel_master_proc_bind_messages.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/include/clang/Basic/StmtNodes.td
The file was addedclang/test/OpenMP/parallel_master_codegen.cpp
The file was modifiedclang/include/clang/Basic/OpenMPKinds.def
The file was modifiedclang/tools/libclang/CXCursor.cpp
The file was addedclang/test/OpenMP/parallel_master_default_messages.cpp
The file was addedclang/test/OpenMP/parallel_master_firstprivate_messages.cpp
The file was modifiedclang/include/clang/Serialization/ASTBitCodes.h
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedclang/lib/Sema/TreeTransform.h
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp
The file was modifiedclang/include/clang-c/Index.h
The file was modifiedclang/lib/CodeGen/CGStmt.cpp
The file was addedclang/test/OpenMP/parallel_master_shared_messages.cpp
The file was modifiedclang/lib/Serialization/ASTWriterStmt.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
The file was addedclang/test/OpenMP/parallel_master_private_messages.cpp
Commit f5193d87feaedb411255e92979abd6b62522bc38 by aaron
Add documentation headings for the OpenCL attributes.
This fixes the documentation build.
The file was modifiedclang/include/clang/Basic/AttrDocs.td
Commit 1ea1e053f6a10955a5aa8f5a8007544a846766e5 by daltenty
[AIX] Make sure to use QualNames for external global objects
Summary: Previously we only handled the case where the csect hadn't been
set up yet, so we'd hit an assert later on.
Reviewers: jasonliu, DiggerLin, stevewan
Reviewed By: jasonliu
Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya,
kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71032
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll
Commit d0b9ed5c490ef10e4af750720a65a6cc6ba41af2 by jonathanchesterfield
[libomptarget][nfc] Move omptarget-nvptx under common
Summary:
[libomptarget][nfc] Move omptarget-nvptx under common
Almost all files depend on require omptarget-nvptx, which no longer
contains any obviously architecture dependent code. Moving it under
common unblocks task/loop for amdgcn, and allows moving other code.
At some point there should probably be a widespread symbol renaming to
replace the nvptx string. I'd prefer to get things working first.
Building this (and task.cu, loop.cu) without a cuda library requires
some more refactoring, e.g. wrap threadfence(), use DEVICE macro more
consistently. Patches for that are orthogonal and will be posted
shortly.
Reviewers: jdoerfert, ABataev, grokos
Reviewed By: ABataev
Subscribers: mgorny, fedor.sergeev, jfb, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D71073
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
The file was addedopenmp/libomptarget/deviceRTLs/common/src/omptarget.cu
The file was addedopenmp/libomptarget/deviceRTLs/common/omptarget.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
The file was addedopenmp/libomptarget/deviceRTLs/common/omptargeti.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
The file was removedopenmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/support.cu
The file was removedopenmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/task.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/loop.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
The file was removedopenmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptxi.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu
Commit a1a9aa17b4db08937e458cdda85327b9eff307df by Adrian Prantl
Set a source location for Objective-C accessor stubs even when there is
no explicit synthesize statement.
This fixes a regression introduced in https://reviews.llvm.org/D68108
that could lead to missing debug locations in cleanup code in
synthesized Objective-C++ properties.
rdar://57630879
Differential Revision: https://reviews.llvm.org/D71084
The file was addedclang/test/SemaObjC/default-synthesize-sourceloc.m
The file was modifiedclang/lib/Sema/SemaObjCProperty.cpp
Commit ce7d35988d1ca5e17758283804ea1f76389dc1f0 by Adrian Prantl
Debug Info: Assert that location is available for cleanups
rdar://57630879
Differential Revision: https://reviews.llvm.org/D71042
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/lib/CodeGen/CGObjC.cpp
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was addedclang/test/CodeGenObjCXX/synthesized-property-cleanup.mm
Commit decee04e630dedff8fe988b340ac015e510bf687 by dblaikie
DebugInfo: Fix LTO+DWARFv5 loclists
The loclists_table_base was being overwritten for each CU even though
only one loclists contribution is made so everything but the last CU
would have a label that was never defined and fail to assemble.
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/CodeGen/X86/debug-loclists-lto.ll
Commit 338588d7cf1865f2095f5961b73cfb533bc535c4 by Adrian Prantl
Debug Info: Apply a default location for cleanups if none is available.
This unbreaks the debuginfo-tests testsuite by replacing the assertion
with a default location. There are cleanups in helper functions that
don't have a valid source location such as block copy helpers and it's
not worth tracking each of them down.
rdar://57630879
The file was modifiedclang/lib/CodeGen/CGDebugInfo.h
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
Commit 4af84d2686a30e30729ef48102009ccdecddc943 by jonchesterfield
[libomptarget][nfc] Introduce SHARED, ALIGN macros
Summary:
[libomptarget][nfc] Introduce SHARED, ALIGN macros Move remaining cuda
attributes behind such macros
Reviewers: ABataev, jdoerfert, grokos
Reviewed By: ABataev
Subscribers: openmp-commits, jvesely
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D71076
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/reduction.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/omptarget.h
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/omp_data.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/omptarget.cu
Commit eaf6c22bf411b07c17d204a7345fc62833120b0b by echristo
Add a default copy constructor for -Wdeprecated-copy warnings.
The file was modifiedllvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
Commit b220662a45c8067a2ae485ae34c1138d93506df9 by richard
Properly convert all declaration non-type template arguments when
forming non-type template parameter values.
This reverts commit 93cc9dddd82f9e971f382ade6acf6634c5914966, which
reverted commit 11d10527852b4d3ed738aa90d8bec0f398160593.
We now always form `&x` when forming a pointer to a function rather than
trying to use function-to-pointer decay. This matches the behavior of
the old code in this case, but not the intent as described by the
comments.
The file was modifiedclang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/test/SemaCXX/warn-bool-conversion.cpp
The file was modifiedclang/test/SemaCXX/exceptions-seh.cpp
Commit b98f3ce33cf22428353c60baec0e01dcb844480c by maskray
[IR] Add a default copy constructor for -Wdeprecated-copy
The file was modifiedllvm/include/llvm/IR/ValueHandle.h
Commit 7faa8440440f280912c33a27c14c0dc4031532de by maskray
[IR] Move ctor in the NDEBUG branch
The file was modifiedllvm/include/llvm/IR/ValueHandle.h
Commit fdf80e86a52849813d05da4b6c25884c06ba9e98 by saar
[Concepts] Constraint Enforcement & Diagnostics
Part of the C++20 concepts implementation effort.
- Associated constraints (requires clauses, currently) are now enforced
when instantiating/specializing templates and when considering partial
specializations and function overloads.
- Elaborated diagnostics give helpful insight as to why the constraints
were not satisfied. Phabricator: D41569
Re-commit, after fixing some memory bugs.
The file was modifiedclang/lib/Sema/SemaConcept.cpp
The file was modifiedclang/lib/AST/ExprCXX.cpp
The file was modifiedclang/lib/Sema/SemaTemplateDeduction.cpp
The file was addedclang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Serialization/ASTWriterStmt.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/include/clang/Sema/TemplateDeduction.h
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiate.cpp
The file was addedclang/include/clang/AST/ASTConcept.h
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/AST/Decl.cpp
The file was addedclang/test/CXX/temp/temp.constr/temp.constr.constr/non-function-templates.cpp
The file was addedclang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
The file was modifiedclang/include/clang/AST/ExprCXX.h
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/AST/CMakeLists.txt
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was addedclang/lib/AST/ASTConcept.cpp
Commit 0d236d8b4f8aecc258e26ad53755a39d9b76032e by rupprecht
[lldb] Update hardcoded Makefile.rules inclusions.
This replaces `include $(LEVEL)/Makefile.rules` with `include
Makefile.rules`. The lldb test driver already passes the include path
when running make, and specifically looking for "../../Makefile.rules"
forces the test to be in a specific location. Removing this hardcoded
relative path will make it possible to move this test as-is.
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile
The file was modifiedlldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile
The file was modifiedlldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile
Commit e7c24667816edc1a3754b46a49f9eac011dc1fee by saar
[Concepts] Fix build failures in D41569
Fix build failures in previous commit.
The file was modifiedclang/lib/AST/ASTConcept.cpp
Commit 6e8322deb3f984467c302165149a597dbbc5e279 by llvmgnsyncbot
gn build: Merge fdf80e86a52
The file was modifiedllvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
Commit e503fd85d3ac9d3e1493a7a63bc43c6939e132cc by aktoon
[AutoFDO] Properly merge context-sensitive profile of inlinee back to
outlined function
Summary: When sample profile loader decides not to inline a previously
inlined call-site, we adjust the profile of outlined function simply by
scaling up its profile counts by call-site count. This means the
context-sensitive profile of that inlined instance will be thrown away.
This commit try to keep context-sensitive profile for such cases:
- Instead of scaling outlined function's profile, we now properly merge
the FunctionSamples of inlined instance into outlined function,
including all recursively inlined profile.
- Instead of adjusting the profile for negative inline decision at the
end of the sample profile loader pass, we do the profile merge right
after processing each function. This change paired with top-down
ordering of annotation/inline-replay (a separate diff) will make sure we
recursively merge profile back before the profile is used for annotation
and inline replay.
A new switch -sample-profile-merge-inlinee is added to enable the new
profile merge for tuning. It should be the default behavior eventually.
Reviewers: wmi, davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70653
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/test/CodeGen/X86/insert-prefetch-inline.afdo
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline-mergeprof.prof
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
The file was modifiedllvm/test/Transforms/SampleProfile/Inputs/inline-callee-update.prof
The file was addedllvm/test/Transforms/SampleProfile/inline-mergeprof.ll
The file was modifiedllvm/test/Transforms/SampleProfile/Inputs/einline.prof
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h
Commit 532196d811ad4db1e522012c9d20e4a95aae2eb3 by aktoon
[AutoFDO] Top-down Inlining for specialization with context-sensitive
profile
Summary: AutoFDO's sample profile loader processes function in arbitrary
source code order, so if I change the order of two functions in source
code, the inline decision can change. This also prevented the use of
context-sensitive profile to do specialization while inlining. This
commit enforces SCC top-down order for sample profile loader. With this
change, we can now do specialization, as illustrated by the added test
case:
Say if we have A->B->C and D->B->C call path, we want to inline C into B
when root inliner is B, but not when root inliner is A or D, this is not
possible without enforcing top-down order. E.g. Once C is inlined into
B, A and D can only choose to inline (B->C) as a whole or nothing, but
what we want is only inline B into A and D, not its recursive callee C.
If we process functions in top-down order, this is no longer a problem,
which is what this commit is doing.
This change is guarded with a new switch "-sample-profile-top-down-load"
for tuning, and it depends on D70653. Eventually, top-down can be the
default order for sample profile loader.
Reviewers: wmi, davidxl
Subscribers: hiraditya, llvm-commits, tejohnson
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70655
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline-topdown.prof
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was addedllvm/test/Transforms/SampleProfile/inline-topdown.ll
Commit 1f822f212cde1ad9099cf45af0652a83380de772 by rnk
Handle two corner cases in creduce-clang-crash.py
Summary: First, call os.path.normpath on the filename argument. I passed
in
./foo-asdf.cpp, and this meant that the script failed to find the
filename, and bad things happened.
Second, call os.path.abspath on binaries. CReduce runs the
interestingness test in a temp dir, so relative paths will not work.
Reviewers: akhuang
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71098
The file was modifiedclang/utils/creduce-clang-crash.py
Commit 2ec71ea7c74df20983031c6e1be07b14da0e9109 by qcolombet
[RegisterCoalescer] Fix the creation of subranges when rematerialization
is used
* Context *
During register coalescing, we use rematerialization when coalescing is
not possible. That means we may rematerialize a super register when only
a smaller register is actually used. E.g., 0B v1 = ldimm 0xFF 1B v2 =
COPY v1.low8bits 2B   = v2
=> 0B v1 = ldimm 0xFF 1B v2 = ldimm 0xFF 2B   = v2.low8bits
Where xB are the slot indexes. Here v2 grew from a 8-bit register to a
16-bit register.
When that happens and subregister liveness is enabled, we create
subranges for the newly created value. E.g., before remat, the live
range of v2 looked like: main range: [1r, 2r)
(Reads v2 is defined at index 1 slot register and used before the slot
register of index 2)
After remat, it should look like: main range: [1r, 2r) low 8 bits: [1r,
2r) high 8 bits: [1r, 1d) <-- dead def
I.e., the unsused lanes of v2 should be marked as dead definition.
* The Problem *
Prior to this patch, the live-ranges from the previous exampel, would
have the full live-range for all subranges: main range: [1r, 2r) low 8
bits: [1r, 2r) high 8 bits: [1r, 2r) <-- too long
* The Fix *
Technically, the code that this patch changes is not wrong: When we
create the subranges for the newly rematerialized value, we create only
one subrange for the whole bit mask. In other words, at this point v2
live-range looks like this: main range: [1r, 2r) low & high: [1r, 2r)
Then, it gets wrong when we call LiveInterval::refineSubRanges on low 8
bits: main range: [1r, 2r) low 8 bits: [1r, 2r) high 8 bits: [1r, 2r)
<-- too long
Ideally, we would like LiveInterval::refineSubRanges to be able to do
the right thing and mark the dead lanes as such. However, this is not
possible, because by the time we update / refine the live ranges, the IR
hasn't been updated yet, therefore we actually don't have enough
information to do the right thing.
Another option to fix the problem would have been to call
LiveIntervals::shrinkToUses after the IR is updated. This is not
desirable as this may have a noticeable impact on compile time.
Instead, what this patch does is when we create the subranges for the
rematerialized value, we explicitly create one subrange for the lanes
that were used before rematerialization and one for the lanes that were
not used. The used one inherits the live range of the main range and the
unused one is just created empty. The existing rematerialization code
then detects that the unused one are not live and it correctly sets dead
def intervals for them.
https://llvm.org/PR41372
The file was addedllvm/test/CodeGen/SystemZ/regcoal-subranges-update-remat.mir
The file was modifiedllvm/lib/CodeGen/RegisterCoalescer.cpp
Commit 54a3c2a81e1a0ff970705008e9285ea3ada4ef3e by tejohnson
[ThinLTO] Add option to disable readonly/writeonly attribute propagation
Summary: Add an option to allow the attribute propagation on the index
to be disabled, to allow a workaround for issues (such as that fixed by
D70977).
Also move the setting of the WithAttributePropagation flag on the index
into propagateAttributes(), and remove some old stale code that predated
this flag and cleared the maybe read/write only bits when we need to
disable the propagation (previously only when importing disabled, now
also when the new option disables it).
Reviewers: evgeny777, steven_wu
Subscribers: mehdi_amini, inglorion, hiraditya, dexonsmith, arphaman,
llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70984
The file was modifiedllvm/lib/Transforms/IPO/FunctionImport.cpp
The file was modifiedllvm/lib/IR/ModuleSummaryIndex.cpp
The file was modifiedllvm/test/ThinLTO/X86/writeonly.ll