Commit
29e2d9461a91b76665139002a5b323fbb1b19d82
by Stanislav.MekhanoshinOption to ignore assume like intrinsic uses in hasAddressTaken()
Differential Revision: https://reviews.llvm.org/D96081
|
 | llvm/include/llvm/IR/Function.h |
 | llvm/lib/Analysis/CallGraph.cpp |
 | llvm/test/Analysis/CallGraph/ignore-assumelike-calls.ll |
 | llvm/lib/IR/Function.cpp |
Commit
9490b9f14b899ff07f3cfab7ad64e5fed8f48746
by llvm-dev[DAG] Move simplification of SADDSAT/SSUBSAT/UADDSAT/USUBSAT of vXi1 to getNode()
As discussed on D97276 we should be able to always do this in node creation, we don't need a combine.
|
 | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp |
 | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp |
Commit
d9c99043bdde5637bf32edaad10d1b8f8cd10b38
by Stanislav.MekhanoshinOption to ignore llvm[.compiler].used uses in hasAddressTaken()
Differential Revision: https://reviews.llvm.org/D96087
|
 | llvm/lib/Analysis/CallGraph.cpp |
 | llvm/test/Analysis/CallGraph/ignore-llvm-used.ll |
 | llvm/include/llvm/IR/Function.h |
 | llvm/lib/IR/Function.cpp |
Commit
84579fc24f03c8ca778e70325dad2166f1deaee3
by jezng[lld-macho] Basic support for linkage and visibility attributes in LTO
When parsing bitcode, convert LTO Symbols to LLD Symbols in order to perform resolution. The "winning" symbol will then be marked as Prevailing at LTO compilation time. This is similar to what the other LLD ports do.
This change allows us to handle `linkonce` symbols correctly, and to deal with duplicate bitcode symbols gracefully. Previously, both scenarios would result in an assertion failure inside the LTO code, complaining that multiple Prevailing definitions are not allowed.
While at it, I also added basic logic around visibility. We don't do anything useful with it yet, but we do check that its value is valid. LLD-ELF appears to use it only to set FinalDefinitionInLinkageUnit for LTO, which I think is just a performance optimization.
From my local experimentation, the linker itself doesn't seem to do anything differently when encountering linkonce / linkonce_odr / weak / weak_odr. So I've only written a test for one of them. LLD-ELF has more, but they seem to mostly be testing the intermediate bitcode output of their LTO backend...? I'm far from an expert here though, so I might very well be missing things.
Reviewed By: #lld-macho, MaskRay, smeenai
Differential Revision: https://reviews.llvm.org/D94342
|
 | lld/test/MachO/invalid/duplicate-symbol.ll |
 | lld/MachO/InputFiles.cpp |
 | lld/test/MachO/invalid/protected.ll |
 | lld/test/MachO/linkonce.ll |
 | lld/MachO/LTO.cpp |
Commit
d12ae7db9973d1aeb21849fadba1c612c0fd0590
by jonathan.l.peyton[OpenMP] Fix accidental addition of use omp_lib_kinds
Fortran header accidentally had use omp_lib_kinds added inside a subroutine and function. This patch removes the lines.
|
 | openmp/runtime/src/include/omp_lib.h.var |
Commit
5bcb199a4317d30f6ada805c824e0e4be6db07bf
by i[test] Improve SanitizerCoverage tests
|
 | llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-nocomdat.ll |
 | llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll |
 | llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll |
 | llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-comdat.ll |
Commit
4f395db86b5cc11bb56853323d3cb1d4b6db5a0b
by cjdbadds more checks to -Wfree-nonheap-object
This commit adds checks for the following:
* labels * block expressions * random integers cast to `void*` * function pointers cast to `void*`
Differential Revision: https://reviews.llvm.org/D94640
|
 | clang/include/clang/Basic/DiagnosticSemaKinds.td |
 | clang/test/Analysis/free.c |
 | clang/test/Analysis/malloc-fnptr-plist.c |
 | clang/lib/Sema/SemaChecking.cpp |
 | clang/test/Analysis/weak-functions.c |
 | clang/test/Analysis/free.cpp |
 | clang/test/Analysis/malloc.c |
Commit
8c074cb0b74e14ab1135d09cb53daf1a09602f73
by csigg[mlir] Mark OpState::getAttrs() deprecated.
Fix call sites.
The method will be removed 2 weeks later.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D97464
|
 | mlir/examples/toy/Ch7/mlir/Dialect.cpp |
 | mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp |
 | mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp |
 | mlir/lib/Dialect/Async/IR/Async.cpp |
 | mlir/lib/IR/BuiltinDialect.cpp |
 | flang/include/flang/Optimizer/Dialect/FIROps.td |
 | mlir/lib/Dialect/Affine/IR/AffineOps.cpp |
 | mlir/include/mlir/IR/OpDefinition.h |
 | mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp |
 | mlir/lib/Dialect/PDL/IR/PDL.cpp |
 | mlir/lib/Dialect/StandardOps/IR/Ops.cpp |
 | mlir/lib/Dialect/GPU/IR/GPUDialect.cpp |
 | mlir/lib/Dialect/Shape/IR/Shape.cpp |
 | mlir/lib/Dialect/Vector/VectorOps.cpp |
 | mlir/examples/toy/Ch2/mlir/Dialect.cpp |
 | mlir/lib/Dialect/SCF/SCF.cpp |
 | mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp |
 | mlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp |
 | mlir/lib/Dialect/SPIRV/Transforms/DecorateCompositeTypeLayoutPass.cpp |
Commit
618862e89a022b2e8f73a62bed7c91654060dbab
by Louis Dionne[libc++] Fix incorrect forwarding in tuple's assignment operator
Also, add a bunch of tests for tuple and pair's assignment operators involving reference types.
Differential Revision: https://reviews.llvm.org/D97419
|
 | libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp |
 | libcxx/include/tuple |
 | libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp |
 | libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp |
 | libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp |
 | libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp |
 | libcxx/test/std/utilities/utility/pairs/pairs.pair/move_ctor.pass.cpp |
 | libcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp |
Commit
4d63892acb17ba8ee5b146e83d38f244d8d92222
by i[SanitizerCoverage] Drop !associated on metadata sections
In SanitizerCoverage, the metadata sections (`__sancov_guards`, `__sancov_cntrs`, `__sancov_bools`) are referenced by functions. After inlining, such a `__sancov_*` section can be referenced by more than one functions, but its sh_link still refers to the original function's section. (Note: a SHF_LINK_ORDER section referenced by a section other than its linked-to section violates the invariant.)
If the original function's section is discarded (e.g. LTO internalization + `ld.lld --gc-sections`), ld.lld may report a `sh_link points to discarded section` error.
This above reasoning means that `!associated` is not appropriate to be called by an inlinable function. Non-interposable functions are inline candidates, so we have to drop `!associated`. A `__sancov_pcs` is not referenced by other sections but is expected to parallel a metadata section, so we have to make sure the two sections are retained or discarded at the same time. A section group does the trick. (Note: we have a module ctor, so `getUniqueModuleId` guarantees to return a non-empty string, and `GetOrCreateFunctionComdat` guarantees to return non-null.)
For interposable functions, we could keep using `!associated`, but LTO can change the linkage to `internal` and allow such functions to be inlinable, so we have to drop `!associated`, too. To not interfere with section group resolution, we need to use the `noduplicates` variant (section group flag 0). (This allows us to get rid of the ModuleID parameter.) In -fno-pie and -fpie code (mostly dso_local), instrumented interposable functions have WeakAny/LinkOnceAny linkages, which are rare. So the section group header overload should be low.
This patch does not change the object file output for COFF (where `!associated` is ignored).
Reviewed By: morehouse, rnk, vitalybuka
Differential Revision: https://reviews.llvm.org/D97430
|
 | llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll |
 | llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll |
 | llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll |
 | llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp |
 | llvm/lib/Transforms/IPO/SampleProfileProbe.cpp |
 | llvm/include/llvm/Transforms/Instrumentation.h |
 | llvm/lib/Transforms/Instrumentation/Instrumentation.cpp |
 | llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol-nocomdat.ll |
Commit
169318088406510ce6816e6b022502a532b86d4b
by Adrian PrantlAdd a nullptr check.
This doesn't actually reproduce with a dbg.declare(i8* null, ...) which produces a non-null null Value, but I have seen this show up in crash logs. I'm suspecting that there may be another pass forcibly setting the operand to a nullptr.
|
 | llvm/lib/Transforms/Coroutines/CoroFrame.cpp |
 | llvm/test/Transforms/Coroutines/coro-debug.ll |
Commit
5d64dd8e3c22e12e4f7b3d08ffe88fc41e727117
by Dan Liew[Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option.
The new `-fsanitize-address-destructor-kind=` option allows control over how module destructors are emitted by ASan.
The new option is consumed by both the driver and the frontend and is propagated into codegen options by the frontend.
Both the legacy and new pass manager code have been updated to consume the new option from the codegen options.
It would be nice if the new utility functions (`AsanDtorKindToString` and `AsanDtorKindFromString`) could live in LLVM instead of Clang so they could be consumed by other language frontends. Unfortunately that doesn't work because the clang driver doesn't link against the LLVM instrumentation library.
rdar://71609176
Differential Revision: https://reviews.llvm.org/D96572
|
 | clang/include/clang/Basic/CodeGenOptions.h |
 | clang/include/clang/Driver/Options.td |
 | clang/lib/Driver/SanitizerArgs.cpp |
 | clang/lib/CodeGen/BackendUtil.cpp |
 | clang/test/CodeGen/asan-destructor-kind.cpp |
 | clang/include/clang/Driver/SanitizerArgs.h |
 | clang/include/clang/Basic/Sanitizers.h |
 | clang/docs/ClangCommandLineReference.rst |
 | clang/lib/Basic/Sanitizers.cpp |
 | clang/include/clang/Basic/CodeGenOptions.def |
 | clang/test/Driver/fsanitize-address-destructor-kind.c |
 | clang/lib/Frontend/CompilerInvocation.cpp |
Commit
fdce098b49cb038996441741a7b2ab3652502aec
by Dan Liew[Clang][ASan] Teach Clang to not emit ASan module destructors when compiling with `-mkernel` or `-fapple-kext`.
rdar://71609176
Differential Revision: https://reviews.llvm.org/D96573
|
 | clang/lib/Driver/SanitizerArgs.cpp |
 | clang/test/Driver/darwin-asan-mkernel-kext.c |