- Oct 01, 2023
-
-
Jakub Kuderski authored
These are not available in all build configurations. Originally introuduced in: https://github.com/llvm/llvm-project/pull/66430
-
Craig Topper authored
-
Timm Bäder authored
This reverts commit 16b9e6fb. This breaks buildbots.
-
Timm Baeder authored
This adds `IntegralAP` backing the two new primtypes `IntAP` (unsigned arbitrary-precision int) and `IntAPS` (same but signed). We use this for `int128` support (which isn't available on all host systems we support AFAIK) and I think we can also use this for `_BitInt` later.
-
Paul Scoropan authored
See discourse thread https://discourse.llvm.org/t/rfc-support-cmake-option-to-control-link-type-built-for-flang-runtime-libraries/71602/18 for full details. Flang-rt is the new library target for the flang runtime libraries. It builds the Flang-rt library (which contains the sources of FortranRuntime and FortranDecimal) and the Fortran_main library. See documentation in this patch for detailed description (flang-rt/docs/GettingStarted.md). This patch aims to: - integrate Flang's runtime into existing llvm infrasturcture so that Flang's runtime can be built similarly to other runtimes via the runtimes target or via the llvm target as an enabled runtime - decouple the FortranDecimal library sources that were used by both compiler and runtime so that different build configurations can be applied for compiler vs runtime - add support for running flang-rt testsuites, which were created by migrating relevant tests from `flang/test` and `flang/unittest` to `flang-rt/test` and `flang-rt/unittest`, using a new `check-flang-rt` target. - provide documentation on how to build and use the new FlangRT runtime Reviewed By: DanielCChen Differential Revision: https://reviews.llvm.org/D154869
-
- Sep 30, 2023
-
-
Benji Smith authored
Fixes https://github.com/llvm/llvm-project/issues/65227 LLVMGetOrdering previously did not support Fence instructions, and calling it on a fence would lead to a bad cast as it assumed a load/store, or an AtomicRMWInst. This would either read a garbage memory order, or assertion LLVMIsAtomicSingleThread did not support either Fence instructions, loads, or stores, and would similarly lead to a bad cast. It happened to work out since the relevant types all have their synch scope ID at the same offset, but it still should be fixed These cases are now fixed for the C API, and tests for these instructions are added. The echo test utility now also supports cloning Fence instructions, which it did not previously ----- From what I can tell, there's no unified API to pull `getOrdering`/`getSyncScopeID` from, and instead requires casting to individual types: if there is a better way of handling this I can switch to that
-
Alex Bradbury authored
The newly added tests check which rounding mode is used by default, and that it is printed when aliases are disabled but not otherwise. These tests will be used in #67555.
-
JOE1994 authored
* Remove if its sole use is to support an unnecessary ptr-to-ptr bitcast (remove the bitcast as well) * Replace with use of other APIs. NFC opaque pointer cleanup effort.
-
Youngsuk Kim authored
* Remove if its sole use is to support an unnecessary ptr-to-ptr bitcast (remove the bitcast as well) * Replace with use of other APIs. NFC opaque pointer cleanup effort.
-
David Green authored
The AArch64StorePairSuppress pass prevents the creation of STP under some heuristics. Unfortunately it often prevents the creation of STP in cases where it is obviously beneficial, and it doesn't match my understanding of scheduling/cpu pipelining to prevent the creation of STP. From some benchmarking, even on an in-order cpu where the scheduling is most important I don't see it giving better results. In general the lower instruction count for STP would be expected to give a slightly better cycle count. As the pass specifically mentions the cyclone cpu, this patch adds a target feature for FeatureStorePairSuppress, enabled for all the non-Arm cpus. This has the effect of disabling it for all Arm cpus. Differential Revision: https://reviews.llvm.org/D134646
-
Vladislav Khmelevsky authored
To do this: 1. Protect BC.Ctx with mutex 2. Don't call exit from thread, please check the reason comment near PassFailed variable definition. The other option would be call _Exit instead of exit, but I think we shall call destructors properly.
-
Vladislav Khmelevsky authored
Most of the print options are hidden, make hidden them all.
-
Owen Pan authored
It always returns false in the unwrapped line parser!
-
Owen Pan authored
-
XinWang10 authored
After patch https://github.com/llvm/llvm-project/pull/67288 landed, unfoldMemoryOperand would not return NewMIs whose size ==3. So the removed line is useless.
-
Kazu Hirata authored
This patch replaces any_cast with llvm::any_cast. This in turn allows us to gracefully switch to std::any in future by forwarding llvm::Any and llvm::any_cast to: using Any = std::any; template <class T> T *any_cast(Any *Value) { return std::any_cast<T>(Value); } respectively. Without this patch, it's ambiguous whether any_cast refers to std::any_cast or llvm::any_cast. As an added bonus, this patch makes it easier to mechanically replace llvm::any_cast with std::any_cast without affecting other occurrences of any_cast (e.g. in libcxx). -
Timm Baeder authored
-
LLVM GN Syncbot authored
-
Giulio Eulisse authored
The goal of the class is to be an (almost) drop in replacement for SmallVector and std::vector when those are presized and filled later, as it happens in SourceManager and ASTReader. By doing so, sparsely accessed PagedVector can profit from reduced memory footprint.
-
Craig Topper authored
-
Jakub Kuderski authored
Variables that point to physical storage buffer require aliasing decorations. This is specified by the `SPV_KHR_physical_storage_buffer` extension. Also add an example of a variable with a decoration attribute.
-
Mogball authored
At line 191, `addSymbol` takes the name by reference but does not make an internal copy to the string, meaning the local `optional<std::string>` would get freed and leave Orc with a dangling pointer. Fix this by just using an `optional<StringRef>` instead.
-
Med Ismail Bennani authored
This patch tentatively fixes the various test failures introduced following 0ea3d88b: https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/6316/ From my understanding, the main issue here is that we can't find some headers when evaluating C++ expressions since those headers have been promoted to be system modules, and to be shipped as part of the toolchain. Prior to 0ea3d88b, the `BuiltinHeadersInSystemModules` flag for in the clang `LangOpts` struct was always set, however, after it landed, the flag becomes opt-in, depending on toolchain that is used with the compiler instance. This gets set in `clang::createInvocation` down to `Darwin::addClangTargetOptions`, as this is used mostly on Apple platforms. However, since `ClangExpressionParser` makes a dummy `CompilerInstance`, and sets the various language options arbitrarily, instead of using the `clang::createInvocation`, the flag remains unset, which causes the var...
-
Stella Laurenzo authored
This reverts commit 35ec6ea6. Breaks downstream narrow type execution tests.
-
Mogball authored
This partially reverts #66380. The assertion that the underlying buffer of an EncodingReader is aligned to any required alignments for resource sections. Resources know their own alignment and pad their buffers accordingly, but the bytecode reader doesn't know that ahead of time. Consequently, it cannot give the resource EncodingReader a base buffer aligned to the maximum required alignment. A simple example from the test fails without this: ```mlir module @TestDialectResources attributes { bytecode.test = dense_resource<resource> : tensor<4xi32> } {} {-# dialect_resources: { builtin: { resource: "0x2000000001000000020000000300000004000000", resource_2: "0x2000000001000000020000000300000004000000" } } ``` -
JOE1994 authored
Replace some uses of `Type::getPointerTo` via 2 ways * Remove entirely if it's only used to support an unnecessary bitcast (remove the bitcast as well). * Replace with `PointerType::get`/`PointerType::getUnqual` NFC opaque pointer clean-up effort.
-
Mircea Trofin authored
-
Mircea Trofin authored
The goal in #66818 was to capture function entry counts, but those are not the same as the frequency of the entry (machine) basic block. This fixes that, and adds explicit profiles to the test. We also increase the precision of `MachineBlockFrequencyInfo::getBlockFreqRelativeToEntryBlock` to double. Existing code uses it as float so should be unaffected.
-
cxy authored
[MLIR] Add stage and effectOnFullRegion to side effect This patch add stage and effectOnFullRegion to side effect for optimization pass to obtain more accurate information. Stage uses numbering to track the side effects's stage of occurrence. EffectOnFullRegion indicates if effect act on every single value of resource. RFC disscussion: https://discourse.llvm.org/t/rfc-add-effect-index-in-memroy-effect/72235 Differential Revision: https://reviews.llvm.org/D156087 Reviewed By: mehdi_amini, Mogball Differential Revision: https://reviews.llvm.org/D156087 -
Mogball authored
-
Joseph Huber authored
Summary: This was disabled on the GPU because it conflicted with the definition in `glibc`. According to information online and in the `glibc` implementation, the first argument should be a `const void *`. Fixing this resolves the problem when exporting this to offloading languages.
-
Kirill Stoimenov authored
The plan is to fix memcmp interceptor in HWASAN and remove the unsupported statement at that time. --------- Co-authored-by:Vitaly Buka <vitalybuka@gmail.com>
-
tyb0807 authored
The new number of elements should be the original one divided by a scale factor computed from old and new bit width.
-
Joseph Huber authored
Summary: The POSIX standard expects the first argument to this function to be constant, e.g. https://man7.org/linux/man-pages/man2/nanosleep.2.html. This fixes that problem and also corrects an obvious problem with enabling this for offloading.
-
Oskar Wirga authored
Context BoundsSanitizer is a mitigation that is part of UBSAN. It can be enabled in "trap" mode to crash on OOB array accesses. Problem BoundsSan has zero false positives meaning every crash is a OOB array access, unfortunately optimizations cause these crashes in production builds to be a bit useless because we only know which function is crashing but not which line of code. Godbolt example of the optimization: https://godbolt.org/z/6qjax9z1b This Diff I wanted to provide a way to know exactly which LOC is responsible for the crash. What we do here is use the size of the basic block as an iterator to an immediate value for the ubsan trap. Previous discussion: https://reviews.llvm.org/D148654
-
Kazushi (Jam) Marukawa authored
Correct bad test in 1e004237. This affects clang-ppc64le-rhel.
-
Krzysztof Drewniak authored
SerializetToHsaco, as currently implemented, leaks the file descriptor of the .hsaco temporary file, which causes issues in long-running parallel compilation setups. See also https://github.com/ROCmSoftwarePlatform/rocMLIR/pull/1257
-
Alex Richardson authored
-
Alexey Bataev authored
This reverts commit 9f5960e0 to fix buildbots reported here https://lab.llvm.org/buildbot/#/builders/230/builds/19412.
-
Fangrui Song authored
On ELF platforms, when there is no global variable and the unique module ID is non-empty, COMDAT asan.module_ctor is created with no `__asan_register_elf_globals` calls. If this COMDAT is the prevailing copy selected by the linker, the linkage unit will have no `__asan_register_elf_globals` call: the redzone will not be poisoned and ODR violation checker will not work (#67677). This behavior is benign for -fno-sanitize-address-globals-dead-stripping because asan.module_ctor functions that call `__asan_register_globals` (`InstrumentGlobalsWithMetadataArray`) do not use COMDAT. To fix #67677: * Use COMDAT for -fsanitize-address-globals-dead-stripping on ELF platforms. * Call `__asan_register_elf_globals` even if there is no global variable. * If the unique module ID is empty, don't call SetComdatForGlobalMetadata: placing `@.str` in a COMDAT would incorrectly discard internal COMDAT `@.str` in other compile units. Alternatively, when there is no global variable, asan.module_ctor is not COMDAT and does not call `__asan_register_elf_globals`. However, the asan.module_ctor function cannot be eliminated by the linker. Tested the following script. Only ELF -fsanitize-address-globals-dead-stripping has changed behaviors. ``` echo > a.cc # no global variable, empty uniqueModuleId echo 'void f() {}' > b.cc # with global variable, with uniqueModuleId echo 'int g;' > c.cc # with global variable for t in x86_64-linux-gnu arm64-apple-macosx x86_64-windows-msvc; do for gc in -f{,no-}sanitize-address-globals-dead-stripping; do for f in a.cc b.cc c.cc; do echo /tmp/Rel/bin/clang -S --target=$t -fsanitize=address $gc $f -o - /tmp/Rel/bin/clang -S --target=$t -fsanitize=address $gc $f -o - | sed -n '/asan.module_ctor/,/ret/p' done done done ```
-