SuccessChanges

Summary

  1. [InstCombine] Insert instructions before adding them to worklist (details)
  2. [LoopFusion] Use the LoopInfo::isRotatedForm method (NFC). (details)
  3. [libomptarget][nfc] Introduce atomic wrapper function (details)
  4. [analyzer] NonnullGlobalConstants: Add support for kCFNull. (details)
  5. Correct version check 9.9.26 -> 9.99.26 (details)
  6. [libunwind] Fix evaluating DWARF operation DW_OP_pick (details)
  7. [FPEnv] Strict versions of llvm.minimum/llvm.maximum (details)
  8. [lldb/MachO] "Fix" intentional out-of-bounds error (NFC) (details)
  9. Tweak commit message for auto update of gn build script (details)
  10. Revert "[InstCombine][AMDGPU] Trim more components of *buffer_load" (details)
  11. [gn build] Update console print to match the commit message (NFC) (details)
  12. Change triple in test case to not include triples the test shouldn't (details)
  13. [clang-tools-extra] Fix linking dylib for LLVMFrontendOpenMP (details)
  14. Support powerpc when builing without init_array. (details)
  15. Move TypeSourceInfo to Type.h (details)
  16. Use hasOffsetApplied to initialize member HasOffsetApplied (details)
  17. Refactor CompareReferenceRelationship and its callers in preparation for (details)
  18. [Orc][LLJIT] Use JITLink even if a custom JITTargetMachineBuilder is (details)
  19. Add prototype for a function we call. (details)
  20. [analyzer] Teach MismatchedDealloc about initWithBytesNoCopy with (details)
  21. [Remarks][Driver][NFC] Make shouldEmitRemarks more available in the (details)
  22. [Remarks][Driver] Run dsymutil when remarks are enabled (details)
  23. Output names in the AST in tests (details)
  24. Trim trailing whitespace (details)
  25. Add method to ignore invisible AST nodes (details)
  26. [X86] Add test case to show incorrect formation of masked add from (details)
  27. [X86] Add a simple hack to IsProfitableToFold to prevent vselect+strict (details)
  28. Revert concepts changes from D41910 (details)
  29. Revert "[Orc][LLJIT] Use JITLink even if a custom (details)
  30. [Docs] Fix a typo (details)
  31. [WebAssembly] Add avgr_u intrinsics and require nuw in patterns (details)
Commit 3d29c41ad59e2e783da43a8b30a3f4f2d0c78a72 by kubak
[InstCombine] Insert instructions before adding them to worklist
Summary: This patch adds instructions to the InstCombine worklist after
they are properly inserted. This way we don't get `<badref>`s printed
when logging added instructions. It also adds a check in `Worklist::Add`
that ensures that all added instructions have parents.
Simple test case that illustrates the difference when run with
`--debug-only=instcombine`:
``` define i32 @test35(i32 %a, i32 %b) {
%1 = or i32 %a, 1135
%2 = or i32 %1, %b
ret i32 %2
}
```
Before this patch:
``` INSTCOMBINE ITERATION #1 on test35 IC: ADDING: 3 instrs to worklist
IC: Visiting:   %1 = or i32 %a, 1135 IC: Visiting:   %2 = or i32 %1, %b
IC: ADD:   %2 = or i32 %a, %b IC: Old =   %3 = or i32 %1, %b
   New =   <badref> = or i32 %2, 1135 IC: ADD:   <badref> = or i32 %2,
1135
...
```
With this patch:
``` INSTCOMBINE ITERATION #1 on test35 IC: ADDING: 3 instrs to worklist
IC: Visiting:   %1 = or i32 %a, 1135 IC: Visiting:   %2 = or i32 %1, %b
IC: ADD:   %2 = or i32 %a, %b IC: Old =   %3 = or i32 %1, %b
   New =   <badref> = or i32 %2, 1135 IC: ADD:   %3 = or i32 %2, 1135
...
```
Reviewers: fhahn, davide, spatel, foad, grosser, nikic
Reviewed By: nikic
Subscribers: nikic, lebedev.ri, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71093
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/zext-or-icmp.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/include/llvm/Transforms/InstCombine/InstCombineWorklist.h
Commit 3db1cf7a1e6731a02b475bdda05ea2d38f3e5ea8 by kbarton
[LoopFusion] Use the LoopInfo::isRotatedForm method (NFC).
Loop fusion previously had a method to check whether a loop was in
rotated form. This method has been moved into the LoopInfo class. This
patch removes the old isRotated method from loop fusion, in favour of
the new one in LoopInfo.
The file was modifiedllvm/lib/Transforms/Scalar/LoopFuse.cpp
Commit 2caeaf2f455db468cc5a5505d90b4919ae37c915 by jonathanchesterfield
[libomptarget][nfc] Introduce atomic wrapper function
Summary:
[libomptarget][nfc] Introduce atomic wrapper function
Wraps atomic functions in a template prefixed __kmpc_atomic that
dispatches to cuda or hip atomic functions. Intended to be easily
extended to dispatch to OpenCL or C++ atomics for a third target.
Reviewers: ABataev, jdoerfert, grokos
Reviewed By: jdoerfert
Subscribers: Anastasia, jvesely, mgrang, dexonsmith, llvm-commits,
mgorny, jfb, openmp-commits
Tags: #openmp, #llvm
Differential Revision: https://reviews.llvm.org/D71404
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/reduction.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/loop.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/common/state-queuei.h
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
The file was addedopenmp/libomptarget/deviceRTLs/common/target_atomic.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/omptargeti.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/libcall.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
Commit badba5118ff5cc6d61aeca6ee2dc2ead5bb5286f by Artem Dergachev
[analyzer] NonnullGlobalConstants: Add support for kCFNull.
It's a singleton in CoreFoundation that always contains a non-null
CFNullRef.
The file was modifiedclang/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp
The file was modifiedclang/test/Analysis/nonnull-global-constants.mm
Commit 3f966867001213a56fccdb01c03a63bb5441e91d by n54
Correct version check 9.9.26 -> 9.99.26
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
Commit 9366397f057d18401e680b2cb28a0ee17c59d4a6 by Steven Wu
[libunwind] Fix evaluating DWARF operation DW_OP_pick
reg is unsigned type and used here for getting array element from the
end by negating it. negation of unsigned can result in large number and
array access with that index will result in segmentation fault.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=43872
Patched by: kamlesh kumar
Differential Revision: https://reviews.llvm.org/D69893
The file was modifiedlibunwind/src/DwarfInstructions.hpp
Commit 19464613440894f5906a83ea1b52999d9fa08882 by ulrich.weigand
[FPEnv] Strict versions of llvm.minimum/llvm.maximum
Add new intrinsics
  llvm.experimental.constrained.minimum
  llvm.experimental.constrained.maximum as strict versions of
llvm.minimum and llvm.maximum.
Includes SystemZ back-end support.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D71624
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
The file was modifiedllvm/test/CodeGen/SystemZ/vec-strict-min-01.ll
The file was modifiedllvm/lib/Target/SystemZ/SystemZInstrVector.td
The file was modifiedllvm/include/llvm/IR/ConstrainedOps.def
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedllvm/test/CodeGen/SystemZ/vec-strict-max-01.ll
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/include/llvm/Target/TargetSelectionDAG.td
The file was modifiedllvm/lib/Target/SystemZ/SystemZISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
Commit e194d890126007bc8e5acb655f007ef76002edb7 by Jonas Devlieghere
[lldb/MachO] "Fix" intentional out-of-bounds error (NFC)
Remove the hack that populates the cpsr register in the gpr struct by
writing past the end of the array. This was tripping up ASan.
Patch by: Reva Cuthbertson
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
The file was modifiedlldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Commit 6fd972624cca2c2de9ff20380bfd35554b1fde6b by aminim
Tweak commit message for auto update of gn build script
Use `[tag]` as a prefix and "port" instead of "merge" to avoid confusing
with "git merge".
The file was modifiedllvm/utils/gn/build/sync_source_lists_from_cmake.py
Commit 40b5a0f7c89cf03f63c8f2a90130fd403f994d69 by Piotr Sobczak
Revert "[InstCombine][AMDGPU] Trim more components of *buffer_load"
Revert D70315, as it breaks gfx8 for some reason.
This reverts commit 65f94b33808d7d69539961a6f5a2168f0a1eef41.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
The file was modifiedllvm/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll
Commit 400083f21e48fa03e3816fc3095e4339d6eef135 by aminim
[gn build] Update console print to match the commit message (NFC)
The file was modifiedllvm/utils/gn/build/sync_source_lists_from_cmake.py
Commit e3fa4604076d01d2fe48d44d86fc2d6a48d4970c by akhuang
Change triple in test case to not include triples the test shouldn't
pass. This is fixes changes from
a85f5efd9597d0036f5c347b362cb873bdf51f16.
The file was modifiedclang/test/CodeGenCXX/mangle-ptr-size-address-space.cpp
Commit 4121399c12292ef445cc3be6ea15c5316ac17d16 by mgorny
[clang-tools-extra] Fix linking dylib for LLVMFrontendOpenMP
Use LLVM_LINK_COMPONENTS to link the FrontendOpenMP library instead of
passing it explicitly to LINK_LIBS.  This fixes duplicating the library
when clang-tidy is linked to LLVM dylib.
Differential Revision: https://reviews.llvm.org/D71674
The file was modifiedclang-tools-extra/clang-tidy/openmp/CMakeLists.txt
Commit 5789e83dedb97588ad75cca36d01ba6c5142d6d3 by saugustine
Support powerpc when builing without init_array.
Summary: Also add an error case when targetting an unimplement
architecture.
Subscribers: nemanjai, jsji, shchenz, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D71670
The file was modifiedcompiler-rt/lib/crt/crtbegin.c
Commit 71f9c30b5348bbb2b41d4ffa6c7688dec8e0074a by rnk
Move TypeSourceInfo to Type.h
TypeSourceInfo is a thin wrapper around TypeLocs. Notionally, the best
place for it to live would be TypeLoc.h, but Decl.h requires it to be
complete, so it needs to be lower in the dependency graph. Type.h seems
like the next best place.
By itself, this change has no impact on build time, because it doesn't
remove a single dependency edge from a .cpp file to a .h file, but it is
an incremental step towards making the AST headers less interdependent.
Reviewers: rsmith
Differential Revision: https://reviews.llvm.org/D71427
The file was modifiedclang/include/clang/AST/TypeLoc.h
The file was modifiedclang/lib/AST/TypeLoc.cpp
The file was modifiedclang/include/clang/AST/Decl.h
The file was modifiedclang/include/clang/AST/Type.h
Commit a6d57a8cd4cfa2a8395eaa6599fc12f7509f98f0 by Akira
Use hasOffsetApplied to initialize member HasOffsetApplied
This is NFC since none of the constructor calls in trunk pass
hasOffsetApplied=true.
The file was modifiedclang/lib/CodeGen/CGExprConstant.cpp
Commit 3ced23976aa8a86a17017c87821c873b4ca80bc2 by richard
Refactor CompareReferenceRelationship and its callers in preparation for
implementing the resolution of CWG2352.
No functionality change, except that we now convert the referent of a
reference binding to the underlying type of the reference in more cases;
we used to happen to preserve the type sugar from the referent if the
only type change was in the cv-qualifiers.
This exposed a bug in how we generate code for trivial assignment
operators: if the type sugar (particularly the may_alias attribute) got
lost during reference binding, we'd use the "wrong" TBAA information for
the load during the assignment.
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/test/AST/ast-dump-expr-json.cpp
The file was modifiedclang/test/Index/print-type.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/lib/CodeGen/CGExprCXX.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
Commit 298e183e813c884dd22816383405bae3ef9ef278 by Lang Hames
[Orc][LLJIT] Use JITLink even if a custom JITTargetMachineBuilder is
supplied.
LLJITBuilder will now use JITLink on supported platforms even if a
custom JITTargetMachineBuilder is supplied, provided that neither the
code model, nor the relocation model, nor the ObjectLinkingLayerCreator
is set.
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
Commit 997bc8b2e6b973dd8c9b17414310cac822543f79 by Jason Molenda
Add prototype for a function we call.
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c
Commit bce1cce6bf1286541c57690ab1129fbc02c60f93 by Artem Dergachev
[analyzer] Teach MismatchedDealloc about initWithBytesNoCopy with
deallocator.
MallocChecker warns when memory is passed into -[NSData
initWithBytesNoCopy] but isn't allocated by malloc(), because it will be
deallocated by free(). However, initWithBytesNoCopy has an overload that
takes an arbitrary block for deallocating the object. If such overload
is used, it is no longer necessary to make sure that the memory is
allocated by malloc().
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
The file was modifiedclang/test/Analysis/malloc.mm
The file was modifiedclang/test/Analysis/Inputs/system-header-simulator-objc.h
Commit a8c678cb9a90c4f82505f573e9b9fa23fec93a64 by francisvm
[Remarks][Driver][NFC] Make shouldEmitRemarks more available in the
Driver
Move the function to Driver.h so that it can be re-used in other places.
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/include/clang/Driver/Driver.h
Commit d79b11fefb8e92660893b8ccf9e21d23668a6c73 by francisvm
[Remarks][Driver] Run dsymutil when remarks are enabled
When clang is invoked with a source file without -c or -S, it creates a
cc1 job, a linker job and if debug info is requested, a dsymutil job. In
case of remarks, we should also create a dsymutil job to avoid losing
the remarks that will be generated in a tempdir that gets removed.
Differential Revision: https://reviews.llvm.org/D71675
The file was modifiedclang/test/Driver/darwin-opt-record.c
The file was modifiedclang/lib/Driver/Driver.cpp
Commit a9f597b62ebdb670392fec2d5a5154e43b6398aa by steveire
Output names in the AST in tests
The file was modifiedclang/unittests/AST/ASTTraverserTest.cpp
Commit 84fd2bedf4096e78b892165138051b8563169fe3 by steveire
Trim trailing whitespace
The file was modifiedclang/unittests/AST/ASTTraverserTest.cpp
Commit 98e8f774eb6ca8946b3104b4e82beefd41ca2c35 by steveire
Add method to ignore invisible AST nodes
Reviewers: aaron.ballman
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70613
The file was modifiedclang/unittests/AST/CMakeLists.txt
The file was modifiedclang/include/clang/AST/ASTTypeTraits.h
The file was modifiedclang/include/clang/AST/ASTNodeTraverser.h
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/AST/Expr.cpp
The file was modifiedclang/unittests/AST/ASTTraverserTest.cpp
Commit 6bf7c345f82a06107a541db80f1ae128844c307c by craig.topper
[X86] Add test case to show incorrect formation of masked add from
vselect+strict_fadd.
The masked operation will suppress exceptions on masked out lanes. But
that's not what vselect+strict_fadd means.
The file was modifiedllvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
Commit f0df4218b67d0abe96867804b8932b9b88998f51 by craig.topper
[X86] Add a simple hack to IsProfitableToFold to prevent vselect+strict
fp operations from being folded into masked instructions.
We really need to update the isel patterns to prevent this, but that
requires some tablegen de-tangling. So this hack will work for
correctness in the short term.
The file was modifiedllvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Commit 5094e6dad64c755be1bb797b0307c54dbae8871d by Vedant Kumar
Revert concepts changes from D41910
These changes caused LibcxxVariantDataFormatterTestCase in lldb to fail
with an assert:
Assertion failed: (Idx < size() && "Out-of-bounds Bit access."),
function operator[], file
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/ADT/SmallBitVector.h,
line 452.
In:
7  clang-10                 0x00000001094b79d9
isAtLeastAsSpecializedAs(clang::Sema&, clang::SourceLocation,
clang::FunctionTemplateDecl*, clang::FunctionTemplateDecl*,
clang::TemplatePartialOrderingContext, unsigned int) + 1865 8  clang-10
               0x00000001094b7111
clang::Sema::getMoreSpecializedTemplate(clang::FunctionTemplateDecl*,
clang::FunctionTemplateDecl*, clang::SourceLocation,
clang::TemplatePartialOrderingContext, unsigned int, unsigned int) + 97
9  clang-10                 0x000000010939bf88
clang::isBetterOverloadCandidate(clang::Sema&, clang::OverloadCandidate
const&, clang::OverloadCandidate const&, clang::SourceLocation,
clang::OverloadCandidateSet::CandidateSetKind) + 1128
Revert "[Concepts] Fix incorrect move out of temporary in D41910"
This reverts commit 11d5fa6e87e3584f72056ecc2b17f88c58323dde.
Revert "[Concepts] Fix crash in D41910"
This reverts commit 12038be20ee6a903cdbd3fddce65535ef683e31d.
Revert "[Concepts] Constrained partial specializations and function
overloads."
This reverts commit fc0731b98a67c793862288f8ae334322666214dc.
The file was modifiedclang/lib/Sema/SemaConcept.cpp
The file was removedclang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
The file was removedclang/test/CXX/temp/temp.constr/temp.constr.order/function-templates.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/AST/DeclTemplate.cpp
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/include/clang/AST/DeclTemplate.h
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
The file was modifiedclang/lib/Frontend/FrontendActions.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiate.cpp
The file was removedclang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp
The file was removedclang/test/CXX/temp/temp.constr/temp.constr.order/class-template-partial-specializations.cpp
The file was modifiedclang/lib/Sema/SemaTemplateDeduction.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
Commit 5ea91bea15dd0cda55b83d108686c3087b479284 by Lang Hames
Revert "[Orc][LLJIT] Use JITLink even if a custom
JITTargetMachineBuilder is supplied."
This reverts commit 298e183e813c884dd22816383405bae3ef9ef278.
This commit caused some build failures -- reverting while I investigate.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
Commit 6218696bc938ce108da9ddb7b13cb187d0413e86 by noreply
[Docs] Fix a typo
The file was modifiedllvm/docs/TestSuiteGuide.md
Commit 71eb8023d85e5201d32ea24194ec5bc07db23527 by tlively
[WebAssembly] Add avgr_u intrinsics and require nuw in patterns
Summary: The vector pattern `(a + b + 1) / 2` was previously selected to
an avgr_u instruction regardless of nuw flags, but this is incorrect in
the case where either addition may have an unsigned wrap. This CL
changes the existing pattern to require both adds to have nuw flags and
adds builtin functions and intrinsics for the avgr_u instructions
because the corrected pattern is not representable in C.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish,
cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D71648
The file was modifiedllvm/include/llvm/IR/IntrinsicsWebAssembly.td
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedclang/test/CodeGen/builtins-wasm.c
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-intrinsics.ll
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-arith.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td