- Mar 10, 2021
-
-
Sven van Haastregt authored
IR produced using TableGen builtin function declarations (`fdeclare-opencl-builtins.cl`) did not have the target's calling convention applied to builtin calls. Fix this, and update the codegen test to check that IR produced using opencl-c.h and `-fdeclare-opencl-builtins` is identical with respect to the builtin calls. Differential Revision: https://reviews.llvm.org/D98039
-
Vladislav Vinogradov authored
Based on the following discussion: https://llvm.discourse.group/t/rfc-memref-memory-shape-as-attribute/2229 The goal of the change is to make memory space property to have more expressive representation, rather then "magic" integer values. It will allow to have more clean ASM form: ``` gpu.func @test(%arg0: memref<100xf32, "workgroup">) // instead of gpu.func @test(%arg0: memref<100xf32, 3>) ``` Explanation for `Attribute` choice instead of plain `string`: * `Attribute` classes allow to use more type safe API based on RTTI. * `Attribute` classes provides faster comparison operator based on pointer comparison in contrast to generic string comparison. * `Attribute` allows to store more complex things, like structs or dictionaries. It will allows to have more complex memory space hierarchy. This commit preserve old integer-based API and implements it on top of the new one. Depends on D97476 Reviewed By: rriddle, mehdi_amini Differential Revision: https://reviews.llvm.org/D96145
-
Hanhan Wang authored
Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D97876
-
Florian Hahn authored
-
Qiu Chaofan authored
As we're going to replace this ambiguous option with more precise instruction-level fast-math description, some tests need to be updated and the option doesn't play any role in some of them.
-
Juneyoung Lee authored
-
Vladislav Vinogradov authored
It makes it consistent with `size()` method return type and with STL-like containers API. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D97921
-
serge-sans-paille authored
It's available both in CodeGenOptions and in LangOptions, and LangOptions implementation is slightly better as it uses a StringRef instead of a char pointer, so use it. Differential Revision: https://reviews.llvm.org/D98175
-
Kirill Bobyrev authored
This allows sending requests through CLI and more debugging opportunities. Example: ```bash $ grpc_cli ls localhost:50051 clang.clangd.remote.v1.SymbolIndex grpc.reflection.v1alpha.ServerReflection grpc.health.v1.Health ```
-
Valeriy Savchenko authored
`initFunctionSummaries` lazily initializes a data structure with function summaries for standard library functions. It is called for every pre-, post-, and eval-call events, i.e. 3 times for each call on the path. If the initialization doesn't find any standard library functions in the translation unit, it will get re-tried (with the same effect) many times even for small translation units. For projects not using standard libraries, the speed-up can reach 50% after this patch. Differential Revision: https://reviews.llvm.org/D98244
-
Valeriy Savchenko authored
Update convention detection to accomodate changes from: https://github.com/DougGregor/swift-evolution/blob/concurrency-objc/proposals/NNNN-concurrency-objc.md#asynchronous-completion-handler-methods Differential Revision: https://reviews.llvm.org/D98251
-
Qiu Chaofan authored
This patch simplifies pattern (xxswap (vec-op (xxswap a) (xxswap b))) into (vec-op a b) if vec-op is lane-insensitive. The motivating case is ScalarToVector-VecOp-ExtractElement sequence on LE, but the peephole itself is not related to endianness, so BE may also benefit from this. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D97658
-
Fangrui Song authored
-
Martin Storsjö authored
This corresponds to getArchNameForCompilerRTLib in clang; any 32 bit x86 architecture triple (except on android, but those exceptions are already handled in compiler-rt on a different level) get the compiler rt library names with i386; arm targets get either "arm" or "armhf". (Mapping to "armhf" is handled in the toplevel CMakeLists.txt.) Differential Revision: https://reviews.llvm.org/D98173
-
Fangrui Song authored
A `local:` version node in a version script can change the effective symbol binding to STB_LOCAL. The linker needs to communicate the fact to enable WPD (otherwise LTO does not know that the `!vcall_visibility` metadata has effectively changed from VCallVisibilityPublic to VCallVisibilityLinkageUnit). Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D98220
-
Fangrui Song authored
-
Fangrui Song authored
In -fno-exceptions -fno-asynchronous-unwind-tables -g0 mode, GCC does not emit `.cfi_*` directives. ``` % diff <(gcc -fno-asynchronous-unwind-tables -dM -E a.c) <(gcc -dM -E a.c) 130a131 > #define __GCC_HAVE_DWARF2_CFI_ASM 1 ``` This macro is useful because code can decide whether inline asm should include `.cfi_*` directives. `.cfi_*` directives without `.cfi_startproc` can cause assembler errors (integrated assembler: `this directive must appear between .cfi_startproc and .cfi_endproc directives`). Differential Revision: https://reviews.llvm.org/D97743
-
Lang Hames authored
__register_ehframes on Linux requires a null terminator to identify the end of this section.
-
Greg McGary authored
Top-level `using llvm::opt` has been present in `lld/MachO/Driver*.cpp` for some time, so remove lingering `opt::` prefixes. Differential Revision: https://reviews.llvm.org/D98314
-
Greg McGary authored
lld policy discourages `auto`. Replace it with a type name whenever reasonable. Retain `auto` to avoid ... * redundancy, as for decls such as `auto *t = mumble_cast<TYPE *>` or similar that specifies the result type on the RHS * verbosity, as for iterators * gratuitous suffering, as for lambdas Along the way, add `const` when appropriate. Note: a future diff will ... * add more `const` qualifiers * remove `opt::` when we are already `using llvm::opt` Differential Revision: https://reviews.llvm.org/D98313
-
Wei Mi authored
now -funique-internal-linkage-name flag is available, and we want to flip it on by default since it is beneficial to have separate sample profiles for different internal symbols with the same name. As a preparation, we want to avoid regression caused by the flip. When we flip -funique-internal-linkage-name on, the profile is collected from binary built without -funique-internal-linkage-name so it has no uniq suffix, but the IR in the optimized build contains the suffix. This kind of mismatch may introduce transient regression. To avoid such mismatch, we introduce a NameTable section flag indicating whether there is any name in the profile containing uniq suffix. Compiler will decide whether to keep uniq suffix during name canonicalization depending on the NameTable section flag. The flag is only available for extbinary format. For other formats, by default compiler will keep uniq suffix so they will only experience transient regression when -funique-internal-linkage-name is just flipped. Another type of regression is caused by places where we miss to call getCanonicalFnName. Those places are fixed. Differential Revision: https://reviews.llvm.org/D96932
-
Yao Zhao authored
fix a couple of words spelling Reviewed By: dberris Differential Revision: https://reviews.llvm.org/D96658
-
Lang Hames authored
-
Lang Hames authored
-
Philip Reames authored
-
Yang Fan authored
GCC warning: ``` /llvm-project/clang/lib/APINotes/APINotesYAMLCompiler.cpp:574:6: warning: ‘void {anonymous}::Module::dump()’ defined but not used [-Wunused-function] 574 | void Module::dump() { | ^~~~~~ ``` -
Yang Fan authored
GCC warning: ``` /llvm-project/llvm/lib/MC/ELFObjectWriter.cpp: In member function ‘void {anonymous}::ELFWriter::writeHeader(const llvm::MCAssembler&)’: /llvm-project/llvm/lib/MC/ELFObjectWriter.cpp:421:20: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 420 | W.OS << char(OSABI == ELF::ELFOSABI_NONE && OWriter.seenGnuAbi() | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 421 | ? ELF::ELFOSABI_GNU | ^~~~~~~~~~~~~~~~~~~ 422 | : OSABI); | ~~~~~~~ ``` -
Philip Reames authored
-
Greg McGary authored
Implement command-line options to alter a dylib's exported-symbols list: * `-exported_symbol*` options override the default export list. The export list is compiled according to the command-line option(s) only. * `-unexported_symbol*` options hide otherwise public symbols. * `-*exported_symbol PATTERN` options specify a single literal or glob pattern. * `-*exported_symbols_list FILE` options specify a file containing a series of lines containing symbol literals or glob patterns. Whitespace and `#`-prefix comments are stripped. Note: This is a simple implementation of the primary use case. ld64 has much more complexity surrounding interactions with other options, many of which are obscure and undocumented. We will start simple and complexity as necessary. Differential Revision: https://reviews.llvm.org/D98223
-
Ryan Prichard authored
By default, the driver uses the compiler-rt builtins and links with -l:libunwind.a. Restore the previous behavior by passing --rtlib=libgcc. Reviewed By: danalbert Differential Revision: https://reviews.llvm.org/D96404
-
Arnold Schwaighofer authored
rdar://75052917 Differential Revision: https://reviews.llvm.org/D98051
-
Jason Molenda authored
It is easier to read the unwind logging when you can see when the inferior resumes / stops and we're doing new unwinds.
-
David Blaikie authored
-
William S. Moses authored
Fix bug in MemoryDependence [and thus GVN] for invariant group. Previously MemDep didn't verify that the store was storing into a pointer rather than a store simply using a pointer. Differential Revision: https://reviews.llvm.org/D98267
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Leonard Chan authored
We encountered an issue where LTO running on IR that used the DSOLocalEquivalent constant would result in bad codegen. The underlying issue was ValueMapper wasn't properly handling DSOLocalEquivalent, so this just adds the machinery for handling it. This code path is triggered by a fix to DSOLocalEquivalent::handleOperandChangeImpl where DSOLocalEquivalent could potentially not have the same type as its underlying GV. This updates DSOLocalEquivalent::handleOperandChangeImpl to change the type if the GV type changes and handles this constant in ValueMapper. Differential Revision: https://reviews.llvm.org/D97978
-
River Riddle authored
This method allows for removing multiple disjoint operands at once, reducing the need to erase operands individually (which results in shifting the operand list). Differential Revision: https://reviews.llvm.org/D98290
-
River Riddle authored
This class provides efficient implementations of symbol queries related to uses, such as collecting the users of a symbol, replacing all uses, etc. This provides similar benefits to use related queries, as SymbolTableCollection did for lookup queries. Differential Revision: https://reviews.llvm.org/D98071
-
Richard Smith authored
The only time we would consider allowing this is inside a call to std::allocator<T>::deallocate, whose contract does not permit deletion of null pointers.
-