- Apr 22, 2021
-
-
Eugene Zhulenev authored
Example: ``` %0 = linalg.init_tensor : tensor<...> %1 = linalg.generic ... outs(%0: tensor<...>) %2 = linalg.generic ... outs(%0: tensor<...>) ``` Memref allocated as a result of `init_tensor` bufferization can be incorrectly overwritten by the second linalg.generic operation Reviewed By: silvas Differential Revision: https://reviews.llvm.org/D100921
-
Fangrui Song authored
-
Fangrui Song authored
[IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables On ELF targets, if a function has uwtable or personality, or does not have nounwind (`needsUnwindTableEntry`), it marks that `.eh_frame` is needed in the module. Then, a function gets `.eh_frame` if `needsUnwindTableEntry` or `-g[123]` is specified. (i.e. If -g[123], every function gets `.eh_frame`. This behavior is strange but that is the status quo on GCC and Clang.) Let's take asan as an example. Other sanitizers are similar. `asan.module_[cd]tor` has no attribute. `needsUnwindTableEntry` returns true, so every function gets `.eh_frame` if `-g[123]` is specified. This is the root cause that `-fno-exceptions -fno-asynchronous-unwind-tables -g` produces .debug_frame while `-fno-exceptions -fno-asynchronous-unwind-tables -g -fsanitize=address` produces .eh_frame. This patch * sets the nounwind attribute on sanitizer module ctor/dtor. * let Clang emit a module flag metadata "uwtable" for -fasynchronous-unwind-tables. If "uwtable" is set, sanitizer module ctor/dtor additionally get the uwtable attribute. The "uwtable" mechanism is generic: synthesized functions not cloned/specialized from existing ones should consider `Function::createWithDefaultAttr` instead of `Function::create` if they want to get some default attributes which have more of module semantics. Other candidates: "frame-pointer" (https://github.com/ClangBuiltLinux/linux/issues/955 https://github.com/ClangBuiltLinux/linux/issues/1238), dso_local, etc. Differential Revision: https://reviews.llvm.org/D100251
-
Walter Erquinigo authored
Found by https://lab.llvm.org/buildbot/#/builders/96/builds/6936
-
Petr Hosek authored
The new layout more closely matches the layout used by other compilers. This is only used when LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is enabled. Differential Revision: https://reviews.llvm.org/D100869
-
Michael Holman authored
This change adds debug information about whether PGO is being used or not. Microsoft performance tooling (e.g. xperf, WPA) uses this information to show whether functions are optimized with PGO or not, as well as whether PGO information is invalid. This information is useful for validating whether training scenarios are providing good coverage of real world scenarios, showing if profile data is out of date, etc. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D99994
-
Walter Erquinigo authored
It failed in https://lab.llvm.org/buildbot/#/builders/68/builds/10912 And it was caused due to https://reviews.llvm.org/rG64f47c1e58a1
-
Walter Erquinigo authored
VSCode doesn't render multiple variables with the same name in the variables view. It only renders one of them. This is a situation that happens often when there are shadowed variables. The nodejs debugger solves this by adding a number suffix to the variable, e.g. "x", "x2", "x3" are the different x variables in nested blocks. In this patch I'm doing something similar, but the suffix is " @ <file_name:line>), e.g. "x @ main.cpp:17", "x @ main.cpp:21". The fallback would be an address if the source and line information is not present, which should be rare. This fix is only needed for globals and locals. Children of variables don't suffer of this problem. When there are shadowed variables {F16182150} Without shadowed variables {F16182152} Modifying these variables through the UI works Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D99989
-
- Apr 21, 2021
-
-
Louis Dionne authored
-
Craig Topper authored
This previously made references to 2.3-draft which was a short lived version number in 2017. It was replaced by date based versions leading up to ratification. This patch uses the latest ratified version number and just says what the behavior is. Nothing here is in flux. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D100878
-
Craig Topper authored
This was checked in some asserts, but not enforced by the instruction matching. There's still a second bug that we don't check that vt and vd are different registers, but that will require custom checking. Differential Revision: https://reviews.llvm.org/D100928
-
Walter Erquinigo authored
In certain occasions times, like when LLDB is initializing and evaluating the .lldbinit files, it tries to print to stderr and stdout directly. This confuses the IDE with malformed data, as it talks to lldb-vscode using stdin and stdout following the JSON RPC protocol. This ends up terminating the debug session with the user unaware of what's going on. There might be other situations in which this can happen, and they will be harder to debug than the .lldbinit case. After several discussions with @clayborg, @yinghuitan and @aadsm, we realized that the best course of action is to simply redirect stdout and stderr to the console, without modifying LLDB itself. This will prove to be resilient to future bugs or features. I made the simplest possible redirection logic I could come up with. It only works for POSIX, and to make it work with Windows should be merely changing pipe and dup2 for the windows equivalents like _pipe and _dup2. Sadly I don't have a Windows machine, so I'll do it later once my office reopens, or maybe someone else can do it. I'm intentionally not adding a stop-redirecting logic, as I don't see it useful for the lldb-vscode case (why would we want to do that, really?). I added a test. Note: this is a simpler version of D80659. I first tried to implement a RIIA version of it, but it was problematic to manage the state of the thread and reverting the redirection came with some non trivial complexities, like what to do with unflushed data after the debug session has finished on the IDE's side.
-
River Riddle authored
This covers some of the basic documentation, but is still missing some documentation/examples of features provided by the server. Feature documentation will be added in a followup. Differential Revision: https://reviews.llvm.org/D100690
-
River Riddle authored
This utilizes the mlir-lsp server to provide language services for MLIR files opened in vscode. The extension currently supports syntax highlighting, as well as tracking definitions/uses/source locations for SSA values and blocks. Differential Revision: https://reviews.llvm.org/D100607
-
River Riddle authored
This commits adds a basic LSP server for MLIR that supports resolving references and definitions. Several components of the setup are simplified to keep the size of this commit down, and will be built out in later commits. A followup commit will add a vscode language client that communicates with this server, paving the way for better IDE experience when interfacing with MLIR files. The structure of this tool is similar to mlir-opt and mlir-translate, i.e. the implementation is structured as a library that users can call into to implement entry points that contain the dialects/passes that they are interested in. Note: This commit contains several files, namely those in `mlir-lsp-server/lsp`, that have been copied from the LSP code in clangd and adapted for use in MLIR. This copying was decided as the best initial path forward (discussed offline by several stake holders in MLIR and clangd) given the different needs of our MLIR server, and the one for clangd. If a strong desire/need for unification arises in the future, the existence of these files in mlir-lsp-server can be reconsidered. Differential Revision: https://reviews.llvm.org/D100439
-
River Riddle authored
This information isn't useful for general compilation, but is useful for building tools that process .mlir files. This class will be used in a followup to start building an LSP language server for MLIR. Differential Revision: https://reviews.llvm.org/D100438
-
Petr Hosek authored
This fixed issue introduced in 16af9739 and 796feb61. Differential Revision: https://reviews.llvm.org/D100909
-
Walter Erquinigo authored
Broken in https://lab.llvm.org/buildbot/#/builders/96/builds/6933 We don't really need to run this test on arm, but would be worth fixing it later.
-
Olle Fredriksson authored
This makes the memcpy-memcpy and memcpy-memset optimizations work for variable sizes as long as they are equal, relaxing the old restriction that they are constant integers. If they're not equal, the old requirement that they are constant integers with certain size restrictions is used. The implementation works by pushing the length tests further down in the code, which reveals some places where it's enough that the lengths are equal (but not necessarily constant). Differential Revision: https://reviews.llvm.org/D100870
-
Jonas Devlieghere authored
This reverts commit 05eeed96 and after fixing the impacted lldb tests in 5d1c43f3. [Driver] Support default libc++ library location on Darwin Darwin driver currently uses libc++ headers that are part of Clang toolchain when available (by default ../include/c++/v1 relative to executable), but it completely ignores the libc++ library itself because it doesn't pass the location of libc++ library that's part of Clang (by default ../lib relative to the exceutable) to the linker always using the system copy of libc++. This may lead to subtle issues when the compilation fails because the headers that are part of Clang toolchain are incompatible with the system library. Either the driver should ignore both headers as well as the library, or it should always try to use both when available. This patch changes the driver behavior to do the latter which seems more reasonable, it makes it easy to test and use custom libc++ build on Darwin while still allowing the use of system version. This also matches the Clang driver behavior on other systems. Differential Revision: https://reviews.llvm.org/D45639
-
Yaxun (Sam) Liu authored
Add option -fgpu-inline-threshold for inline threshold for device compilation only. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D99233
-
Louis Dionne authored
It's too slow, which delays the posting of CI results to Phabricator when another step in the same stage fails.
-
Peter Collingbourne authored
Now that we have a more efficient implementation of storeTags(), we should start using it from resizeTaggedChunk(). With that, plus a new storeTag() function, resizeTaggedChunk() can be made generic, and so can prepareTaggedChunk(). Make it so. Now that the functions are generic, move them to combined.h so that memtag.h no longer needs to know about chunks. Differential Revision: https://reviews.llvm.org/D100911
-
Peter Collingbourne authored
DC GZVA can operate on multiple granules at a time (corresponding to the CPU's cache line size) so we can generally expect it to be faster than STZG in a loop. Differential Revision: https://reviews.llvm.org/D100910
-
Walter Erquinigo authored
This diff ass postRunCommands, which are the counterpart of the preRunCommands. TThey will be executed right after the target is launched or attached correctly, which means that the targets can assume that the target is running. Differential Revision: https://reviews.llvm.org/D100340
-
Arthur Eubanks authored
Trying to evaluate a GEP would assert with "Ty == cast<PointerType>(C->getType()->getScalarType())->getElementType()" because the type of the pointer we would evaluate the GEP argument to would be a different type than the GEP was expecting. We should treat pointer stripping as a bitcast. The test adds a redundant GEP that would crash due to type mismatch. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D100970
-
Jonas Devlieghere authored
Use the clang compiler from the SDK to build the simulator test programs to ensure we pick up the correct libc++.
-
Mehdi Chinoune authored
MSVC doesn't accept division by zero. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D96069
-
Alexey Bataev authored
-
Arthur Eubanks authored
Helps with debugging invalid handcrafted IR. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D100990
-
Dávid Bolvanský authored
-
Jez Ng authored
As discussed here: https://reviews.llvm.org/D100523#inline-951543 Reviewed By: #lld-macho, thakis, alexshap Differential Revision: https://reviews.llvm.org/D100978
-
Nikita Popov authored
This reverts commit 9423f782. A performance regression with this patch has been reported at https://reviews.llvm.org/rG9423f78240a2#990953. Reverting for now.
-
Roland McGrath authored
An empty macro that expands to just `... else ;` can get warnings from some compilers (e.g. GCC's -Wempty-body). Reviewed By: cryptoad, vitalybuka Differential Revision: https://reviews.llvm.org/D100693
-
Jordan Rupprecht authored
`RichManglingContext::FromCxxMethodName` allocates a m_cxx_method_parser, but never deletes it. This fixes a `-DLLVM_USE_SANITIZER=Leaks` failure. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D100795
-
sstefan1 authored
Discovered during attributor testing comparing stats with and without the attributor. Willreturn should not be inferred for nonexact definitions. Differential Revision: https://reviews.llvm.org/D100988
-
Emily Shi authored
If these sizes do not match, asan will not work as expected. Previously, we added compile-time checks for non-iOS platforms. We check at run time for iOS because we get the max VM size from the kernel at run time. rdar://76477969 Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D100784
-
sstefan1 authored
Fix for PR49984 This was discovered during Attributor testing. Memset was always created with alignment of 1 and in case when strncpy alignment was changed it triggered an assertion in the AttrBuilder. Memset will now be created with appropriate alignment. Differential Revision: https://reviews.llvm.org/D100875
-
Ahmed Taei authored
This will prevent fusion that spains all dims and generates (d0, d1, ...) -> () reshape that isn't legal Differential Revision: https://reviews.llvm.org/D100805
-
-