Commit
e29063b16edfa3d98d34d0d15afa44519c47b781
by Vitaly Buka[NFC] Suppress "warning: ignoring return value"
|
 | compiler-rt/lib/profile/InstrProfilingFile.c |
Commit
3744ba24dcf3ff5ecfa76fade18549528fe49942
by Vitaly Buka[NFC][libc++] Suppress "warning: ignoring return value"
According to the comment on the next line it's expected behaviour.
|
 | libcxx/include/new |
Commit
812a9061338dad80a3e9725db95f67590bc54dcd
by Vitaly Buka[sanitizers][NFC] Change typesto avoid warnings
Warning was enabled by D94640
|
 | compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h |
 | compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp |
Commit
c9075a1c8e22663c5f4140294ee8b561feff7e14
by gbalats[dfsan] Record dfsan metadata in globals
This will allow identifying exactly how many shadow bytes were used during compilation, for when fast8 mode is introduced.
Also, it will provide a consistent matching point for instrumentation tests so that the exact llvm type used (i8 or i16) for the shadow can be replaced by a pattern substitution. This is handy for tests with multiple prefixes.
Reviewed by: stephan.yichao.zhao, morehouse
Differential Revision: https://reviews.llvm.org/D97409
|
 | llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp |
 | llvm/test/Instrumentation/DataFlowSanitizer/basic.ll |
Commit
07de0846a5055015b55dc2b8faa2143f9902e549
by psteinfeld[flang] Detect circularly defined interfaces of procedures
It's possible to define a procedure whose interface depends on a procedure which has an interface that depends on the original procedure. Such a circular definition was causing the compiler to fall into an infinite loop when resolving the name of the second procedure. It's also possible to create circular dependency chains of more than two procedures.
I fixed this by adding the function HasCycle() to the class DeclarationVisitor and calling it from DeclareProcEntity() to detect procedures with such circularly defined interfaces. I marked the associated symbols of such procedures by calling SetError() on them. When processing subsequent procedures, I called HasError() before attempting to analyze their interfaces. Unfortunately, this did not work.
With help from Tim, we determined that the SymbolSet used to track the erroneous symbols was instantiated using a "<" operator which was defined using the name of the procedure. But the procedure name was being changed by a call to ReplaceName() between the times that the calls to SetError() and HasError() were made. This caused HasError() to incorrectly report that a symbol was not in the set of erroneous symbols. I fixed this by making SymbolSet be an ordered set, which does not use the "<" operator.
I also added tests that will crash the compiler without this change. And I fixed the formatting on an error message from a previous update.
Differential Revision: https://reviews.llvm.org/D97201
|
 | flang/include/flang/Semantics/symbol.h |
 | flang/test/Semantics/resolve102.f90 |
 | flang/lib/Semantics/resolve-names.cpp |
 | flang/lib/Evaluate/characteristics.cpp |
Commit
eea53b142d91c6dc8aae2a9727b4f48508d7b147
by craig.topper[DAGCombiner] Optimize SMULO/UMULO if we can prove that overflow is impossible.
Using ComputeNumSignBits or computeKnownBits we might be able to determine that overflow is impossible.
This especially helps after type legalization if the type was promoted from a type with half the bits or more. Type legalization conservatively creates a promoted smulo/umulo and an overflow check for the promoted bits. The overflow from the promoted smulo/umulo is ORed with the result of the promoted bits overflow check. Proving that the promoted smulo/umulo can never overflow will leave us with just the promoted bits overflow check.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D97160
|
 | llvm/test/CodeGen/AArch64/vec_umulo.ll |
 | llvm/test/CodeGen/X86/vec_smulo.ll |
 | llvm/test/CodeGen/X86/vec_umulo.ll |
 | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp |
 | llvm/test/CodeGen/RISCV/xaluo.ll |
Commit
81b2c23b77716e1074f3e84259321cb9b8c9b2eb
by Matthew.ArsenaultAMDGPU: Use kill instruction to hint soft clause live ranges
Previously we would use a bundle to hint the register allocator to not overwrite the pointers in a sequence of loads to avoid breaking soft clauses. This bundling was based on a fuzzy register pressure heuristic, so we could not guarantee using more registers than are really available. This would result in register allocator failing on unsatisfiable bundles. Use a kill to artificially extend the live ranges, so we can always succeed at register allocation even if it means extra spills in the worst case.
This seems to capture most of the benefit of the bundle while avoiding most of the risk presented by the bundle. However the lit tests do show a handful of regressions. In some cases with sequences of volatile loads, unused load components end up getting reallocated to the next load which forces a wait between. There are also a few small scheduling regressions where a hazard used to be avoided, and one spill torture test which for some reason nearly doubles the stack usage. There is also a bit of noise from leftover kills (it may make sense for post-RA pseudos to strip all of these out).
|
 | llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.update.dpp.ll |
 | llvm/lib/Target/AMDGPU/SIPostRABundler.cpp |
 | llvm/test/CodeGen/AMDGPU/memory_clause.mir |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll |
 | llvm/test/CodeGen/AMDGPU/memory_clause.ll |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll |
 | llvm/test/CodeGen/AMDGPU/soft-clause-dbg-value.mir |
 | llvm/test/CodeGen/AMDGPU/vgpr-descriptor-waterfall-loop-idom-update.ll |
 | llvm/test/CodeGen/AMDGPU/disable_form_clauses.ll |
 | llvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll |
 | llvm/test/CodeGen/AMDGPU/memory-legalizer-global-agent.ll |
 | llvm/test/CodeGen/AMDGPU/limit-soft-clause-reg-pressure.mir |
 | llvm/test/CodeGen/AMDGPU/memory-legalizer-global-singlethread.ll |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll |
 | llvm/test/CodeGen/AMDGPU/spill-vgpr-to-agpr.ll |
 | llvm/test/CodeGen/AMDGPU/unallocatable-bundle-regression.mir |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/load-constant.96.ll |
 | llvm/test/CodeGen/AMDGPU/ds_write2.ll |
 | llvm/test/CodeGen/AMDGPU/memory-legalizer-global-system.ll |
 | llvm/test/CodeGen/AMDGPU/memory-legalizer-global-workgroup.ll |
 | llvm/test/CodeGen/AMDGPU/postra-bundle-memops.mir |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i128.ll |
 | llvm/test/CodeGen/AMDGPU/vector_shuffle.packed.ll |
 | llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp |
 | llvm/test/CodeGen/AMDGPU/memory-legalizer-global-wavefront.ll |
 | llvm/test/CodeGen/AMDGPU/reserved-reg-in-clause.mir |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/localizer.ll |
 | llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.div.fmas.ll |
Commit
016f0ee68621b5cba29b153fc221b95af3330736
by aeubanks[docs] Add documentation on using the new pass manager
And clarify in the "writing a pass" docs that both the legacy and new PMs are being used for the codegen/optimization pipelines.
Reviewed By: ychen, asbirlea
Differential Revision: https://reviews.llvm.org/D97515
|
 | llvm/docs/UserGuides.rst |
 | llvm/docs/NewPassManager.rst |
 | llvm/docs/WritingAnLLVMNewPMPass.rst |
 | llvm/docs/WritingAnLLVMPass.rst |
Commit
f685c9ac8647daeb425b05ffb9c555ccfc7ec78b
by rob.suderman[MLIR][TOSA] Lower tosa.identity and tosa.identitiyn to linalg
Both identity ops can be loweried by replacing their results with their inputs. We keep this as a linalg lowering as other backends may choose to create copies.
Differential Revision: https://reviews.llvm.org/D97517
|
 | mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp |
 | mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir |
Commit
4a8530fc3039f128eddc38737f0172bb3d489bcf
by richard[clang] implicitly delete space ship operator with function pointers
See bug #48856
Definitions of classes with member function pointers and default spaceship operator were getting accepted with no diagnostic on release build, and triggering assert on builds with runtime checks enabled. Diagnostics were only produced when actually comparing instances of such classes.
This patch makes it so Spaceship and Less operators are not considered as builtin operator candidates for function pointers, producing equivalent diagnostics for the cases where pointers to member function and pointers to data members are used instead.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D95409
|
 | clang/test/CXX/class/class.compare/class.compare.default/p2.cpp |
 | clang/test/CXX/class/class.compare/class.spaceship/p2.cpp |
 | clang/lib/Sema/SemaDeclCXX.cpp |
 | clang/test/CXX/class/class.compare/class.eq/p2.cpp |
Commit
5077d42cfa427598826eb7b69ad805bad8f4ec9d
by eschweitz[flang][fir][NFC] Removes deprecated messages in builds.
|
 | flang/include/flang/Optimizer/Dialect/FIROps.td |
 | flang/lib/Optimizer/Dialect/FIROps.cpp |
Commit
bf176c49e842693e16c97c05d3d5fad33fc3d617
by i[InstrProfiling] Use llvm.compiler.used instead of llvm.used for ELF
Many optimizers (e.g. GlobalOpt/ConstantMerge) do not respect linker semantics for comdat and may not discard the sections as a unit.
The interconnected `__llvm_prf_{cnts,data}` sections (in comdat for ELF) are similar to D97432: `__profd_` is not directly referenced, so `__profd_` may be discarded while `__profc_` is retained, breaking the interconnection. We currently conservatively add all such sections to `llvm.used` and let the linker do GC for ELF.
In D97448, we will change GlobalObject's in the llvm.used list to use SHF_GNU_RETAIN, causing the metadata sections to be unnecessarily retained (some `check-profile` tests check for GC). Use `llvm.compiler.used` to retain the current GC behavior.
Differential Revision: https://reviews.llvm.org/D97585
|
 | llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp |
 | llvm/test/Instrumentation/InstrProfiling/profiling.ll |
Commit
155c49e0878de667b8021b9ba685390151dee11e
by vvereschaka[Driver] Print process statistics report on CC_PRINT_PROC_STAT env variable.
Added supporting CC_PRINT_PROC_STAT and CC_PRINT_PROC_STAT_FILE environment variables to trigger clang driver reporting the process statistics into specified file (alternate for -fproc-stat-report option).
Differential Revision: https://reviews.llvm.org/D97094
|
 | clang/lib/Driver/Driver.cpp |
 | clang/test/Driver/lit.local.cfg |
 | clang/docs/UsersManual.rst |
 | clang/tools/driver/driver.cpp |
 | clang/include/clang/Driver/Driver.h |
 | clang/test/Driver/cc-print-proc-stat.c |
Commit
d202201410222766b5ffd2b032473fbb4a1b5bf8
by rprichardReland "[builtins] Define fmax and scalbn inline"
This reverts commit 680f836c2fa72166badd594a52b3f41b2ad074d2.
Disable the non-default-rounding-mode scalbn[f] tests when we're using the MSVC libraries.
Differential Revision: https://reviews.llvm.org/D91841
|
 | compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c |
 | compiler-rt/test/builtins/Unit/compiler_rt_scalbn_test.c |
 | compiler-rt/test/builtins/Unit/compiler_rt_scalbnf_test.c |
 | compiler-rt/lib/builtins/fp_lib.h |
 | compiler-rt/test/builtins/Unit/compiler_rt_fmax_test.c |
 | compiler-rt/lib/builtins/int_lib.h |
 | compiler-rt/lib/builtins/divdc3.c |
 | compiler-rt/test/builtins/Unit/compiler_rt_fmaxl_test.c |
 | compiler-rt/test/builtins/Unit/compiler_rt_fmaxf_test.c |
 | compiler-rt/lib/builtins/divsc3.c |
 | compiler-rt/lib/builtins/int_math.h |
 | compiler-rt/lib/builtins/divtc3.c |
 | compiler-rt/lib/builtins/ppc/divtc3.c |
Commit
91ab48ea6baf5e0a653a81afb6ab08e9df84c211
by jpienaar[mlir] Add regions to OpAdaptor
Allows querying regions too via OpAdaptor's generated. This does not yet move region verification to adaptor nor require regions for ops where needed.
Differential Revision: https://reviews.llvm.org/D97519
|
 | mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp |
 | mlir/test/mlir-tblgen/op-decl.td |
 | mlir/test/mlir-tblgen/op-decl-and-defs.td |
Commit
1d7f8c75179a60b4fd214f944cd5c705a6effa76
by i[test] Fix PGOProfile/comdat_internal.ll
|
 | llvm/test/Transforms/PGOProfile/comdat_internal.ll |
Commit
f5d5a7d7eac74e157c613c11945387b8846c18d1
by Jessica Paquette[AArch64][GlobalISel] Import FMOV patterns rather than manually selecting it
There are existing patterns for FMOVHi, FMOVSi, and FMOVDi in AArch64InstrFormats.td.
Importing these allows us to remove the manual selection code for FMOV.
It also allows us to select FMOVHi for non-zero constants when we have full fp-16 support.
Refactor some of the code in AArch64InstrFormats.td so that we can create equivalent custom renderers in GlobalISel.
Differential Revision: https://reviews.llvm.org/D97511
|
 | llvm/test/CodeGen/AArch64/GlobalISel/select-fp16-fconstant.mir |
 | llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp |
 | llvm/lib/Target/AArch64/AArch64InstrFormats.td |
Commit
c0dc885d29af8f2bd2434047937c2ba65c7c7adb
by jianzhouzh[msan] Use non-transparent-huge-page at SetShadow
This prevents from getting THP ranges more and more.
Did not see any issues in practice, just found this by code review.
Reviewed By: eugenis, vitalybuka
Differential Revision: https://reviews.llvm.org/D97593
|
 | compiler-rt/lib/msan/msan_poisoning.cpp |
Commit
233ba2709bde54ea820cdaba0405d46b2c197e01
by kazu[Driver] Fix a warning about the the initialization order
|
 | clang/lib/Driver/Driver.cpp |
Commit
8afdacba9dcd36fc838eb86fca86f7f903040030
by iAdd GNU attribute 'retain'
For ELF targets, GCC 11 will set SHF_GNU_RETAIN on the section of a `__attribute__((retain))` function/variable to prevent linker garbage collection. (See AttrDocs.td for the linker support).
This patch adds `retain` functions/variables to the `llvm.used` list, which has the desired linker GC semantics. Note: `retain` does not imply `used`, so an unused function/variable can be dropped by Sema.
Before 'retain' was introduced, previous ELF solutions require inline asm or linker tricks, e.g. `asm volatile(".reloc 0, R_X86_64_NONE, target");` (architecture dependent) or define a non-local symbol in the section and use `ld -u`. There was no elegant source-level solution.
With D97448, `__attribute__((retain))` will set `SHF_GNU_RETAIN` on ELF targets.
Differential Revision: https://reviews.llvm.org/D97447
|
 | clang/lib/Sema/SemaDecl.cpp |
 | clang/lib/CodeGen/CGDecl.cpp |
 | clang/lib/CodeGen/CodeGenModule.cpp |
 | clang/test/Sema/attr-retain.c |
 | clang/test/CodeGen/attr-retain.c |
 | clang/test/CodeGenCXX/attr-retain.cpp |
 | clang/include/clang/Basic/AttrDocs.td |
 | clang/include/clang/Basic/Attr.td |
Commit
47c5576d7d586624c38f76bd3168e05f6ef1f838
by iELF: Create unique SHF_GNU_RETAIN sections for llvm.used global objects
If a global object is listed in `@llvm.used`, place it in a unique section with the `SHF_GNU_RETAIN` flag. The section is a GC root under `ld --gc-sections` with LLD>=13 or GNU ld>=2.36.
For front ends which do not expect to see multiple sections of the same name, consider emitting `@llvm.compiler.used` instead of `@llvm.used`.
SHF_GNU_RETAIN is restricted to ELFOSABI_GNU and ELFOSABI_FREEBSD in binutils. We don't do the restriction - see the rationale in D95749.
The integrated assembler has supported SHF_GNU_RETAIN since D95730. GNU as>=2.36 supports section flag 'R'. We don't need to worry about GNU ld support because older GNU ld just ignores the unknown SHF_GNU_RETAIN.
With this change, `__attribute__((retain))` functions/variables emitted by clang will get the SHF_GNU_RETAIN flag.
Differential Revision: https://reviews.llvm.org/D97448
|
 | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp |
 | llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp |
 | llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h |
 | llvm/test/CodeGen/PowerPC/no-dead-strip.ll |
 | llvm/test/CodeGen/X86/elf-retain.ll |
 | llvm/test/CodeGen/PowerPC/func-addr-consts.ll |
Commit
1ab2753d4c2fcb4221a9171b11d513cb759842ac
by llvm-project[Polly] Refactoring IsInnermostParallel() in ISL to take the C++ wrapper object. NFC
Currently, the IslAst library is a C library that would be incompatible with the rest of the LLVM because LLVM is written in C++. I took one function, IsInnermostParallel(), and refactored it so that it would take the C++ wrapper object instead of using reference counters with the C ISL library. As well, all the references that use IsInnermostParallel() will use manage_copy() since they are still expecting the C object.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D97425
|
 | polly/include/polly/CodeGen/IslAst.h |
 | polly/lib/CodeGen/IslNodeBuilder.cpp |
 | polly/lib/CodeGen/IslAst.cpp |
Commit
14ffbb84aa45ddc22a564074fb2e32e8cef6c586
by sbc[lld][WebAssembly] Rename methods/members to match ELF backend. NFC.
Specifically:
- InputChunk::outputOffset -> outSecOffset - Symbol::get/setVirtualAddress -> get/setVA - add InputChunk::getOffset helper that takes an offset
These are mostly in preparation for adding support for SHF_MERGE/SHF_STRINGS but its also good to align with ELF where possible.
Differential Revision: https://reviews.llvm.org/D97595
|
 | lld/wasm/InputChunks.h |
 | lld/wasm/SymbolTable.cpp |
 | lld/wasm/InputFiles.cpp |
 | lld/wasm/SyntheticSections.cpp |
 | lld/wasm/InputChunks.cpp |
 | lld/wasm/Symbols.cpp |
 | lld/wasm/MapFile.cpp |
 | lld/wasm/Writer.cpp |
 | lld/wasm/OutputSections.cpp |
 | lld/wasm/Symbols.h |
Commit
aa097ef8d474c925e4fbe0efcaad253266c2fd6f
by aheejin[WebAssembly] Fix reverse mapping in WasmEHFuncInfo
D97247 added the reverse mapping from unwind destination to their source, but it had a critical bug; sources can be multiple, because multiple BBs can have a single BB as their unwind destination.
This changes `WasmEHFuncInfo::getUnwindSrc` to `getUnwindSrcs` and makes it return a vector rather than a single BB. It does not return the const reference to the existing vector but creates a new vector because `WasmEHFuncInfo` stores not `BasicBlock*` or `MachineBasicBlock*` but `PointerUnion` of them. Also I hoped to unify those methods for `BasicBlock` and `MachineBasicBlock` into one using templates to reduce duplication, but failed because various usages require `BasicBlock*` to be `const` but it's hard to make it `const` for `MachineBasicBlock` usages.
Fixes https://github.com/emscripten-core/emscripten/issues/13514. (More precisely, fixes https://github.com/emscripten-core/emscripten/issues/13514#issuecomment-784708744)
Reviewed By: dschuff, tlively
Differential Revision: https://reviews.llvm.org/D97583
|
 | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp |
 | llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp |
 | llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll |
 | llvm/include/llvm/CodeGen/WasmEHFuncInfo.h |
Commit
0b785a46b7eecbfd24394b42814844e02e5fefe6
by eschweitz[flang][fir] Add remaining Ops. Updates to pre-existing Ops.
- add ops: rebox, insert_on_range, absent, is_present - embox, coordinate_of: replace old hand-written parser/pretty-printer with assembly format - remove dead floating point ops, since buitlins work for all types - update call op - update documentation - misc. NFC to formatting - add op round trip tests
Authors: Eric Schweitz, Jean Perier, Zachary Selk, Kiran Chandramohan, et.al.
Differential Revision: https://reviews.llvm.org/D97500
|
 | flang/lib/Lower/IO.cpp |
 | flang/lib/Optimizer/Dialect/FIROps.cpp |
 | flang/lib/Optimizer/Dialect/FIRDialect.cpp |
 | flang/include/flang/Optimizer/Dialect/FIROps.td |
 | flang/test/Fir/fir-ops.fir |
 | flang/lib/Lower/CharacterExpr.cpp |