- May 03, 2024
-
-
Anlun Xu authored
-
Jason Molenda authored
-
Michael Buch authored
Prior to this change the debug-location for the `llvm.instrprof.increment` intrinsic was set to whatever the current DIBuilder's current debug location was set to. This meant that for switch-statements, a counter's location was set to the previous case's debug-location, causing confusing stepping behaviour in debuggers. This patch makes sure we attach a dummy debug-location for the increment instructions. rdar://123050737
-
Chris B authored
We had some odd places where we set target behaviors. We were setting the long size in target-specific code, but it should be language-based. We were not setting the Half float type semantics correctly, and instead were overriding the query in the AST context. This change it moves existing code to the right places in the Target so that as we continue working on target and language feature they are controlled in the right places. It also fixes a bug where the size of `half` was computed incorrectly when native half types are not supported.
-
Eric Fiselier authored
The builders are not producing warnings about the runner version being out of date. This is an attempt to fix that.
-
Valentin Clement (バレンタイン クレメン) authored
Lower locals allocation of cuda device, managed and unified variables to fir.cuda_alloc. Add fir.cuda_free in the function context finalization. @vzakhari For some reason the PR #90526 has been closed when I merged PR #90525. Just reopening one.
-
Vitaly Buka authored
This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) -
Youngsuk Kim authored
* Don't call substr which creates a new string instance * Only call string method if string length is larger than 140 Closes #90324
-
Sylvestre Ledru authored
-
Björn Pettersson authored
Make sure that the result from the popcnt/ctlz/cttz intrinsics is unsigned casted to int, rather than casted as a signed value, when expanding the __builtin_popcountg/__builtin_ctzg/__builtin_clzg builtins. An example would be unsigned _BitInt(1) x = ...; int y = __builtin_popcountg(x); which previously was incorrectly expanded to %1 = call i1 @llvm.ctpop.i1(i1 %0) %cast = sext i1 %1 to i32 Since the input type is generic for those "g" versions of the builtins the intrinsic call may return a value for which the sign bit is set (that could typically for BitInt of size 1 and 2). So we need to emit a zext rather than a sext to avoid negative results.
-
LLVM GN Syncbot authored
-
Nikolas Klauser authored
This also includes `<__ostream/basic_ostream.h>` in `<sstream>` now, reducing the include time of `<complex>` from 819ms to 603ms.
-
Youngsuk Kim authored
Closes #89198
-
Maksim Panchenko authored
Move code that checks for __bolt_reserved_{start,end} into a new discoverBOLTReserved() function and call it from discoverFileObjects() so that the reserved space info is accessible to passes. NFC for the current set of binaries. -
Maksim Panchenko authored
Parse .smp_locks section entries and create fixups that are going to be used to update the section before the binary emission.
-
Jay Foad authored
Factor out copyToDestRegs and copyFromSrcRegs for merging store sources and unmerging load results. NFC.
-
Florian Hahn authored
Additional test case from https://github.com/llvm/llvm-project/pull/78304.
-
Vitaly Buka authored
Breaks https://lab.llvm.org/buildbot/#/builders/5/builds/43086/steps/9/logs/stdio Reverts llvm/llvm-project#90499
-
Schrodinger ZHU Yifan authored
-
Matt Arsenault authored
shouldCastAtomicLoadInIR is a hack that should be removed. Simple bitcasting of operations should be in the domain of ordinary type legalization and does not need to be done in the IR. This introduces a code quality regression due to the hack currently used to avoid using 128-bit values in the case where the floating point value is ultimately used as an integer. This would be avoidable if there were always a legal 128-bit type (like v2i64). This is a pretty niche situation so I assume it's not important. I implemented about 85% of the work necessary to make v2i64 legal, but it was taking too long and I lack the necessary familiarity with systemz to complete it. I've pushed it here for someone to pick up: https://github.com/arsenm/llvm-project/pull/new/systemz-legal-v2i64 Depends #90861
-
Stephen Tozer authored
This patch fixes debug records in clang, by adding support for debug records to the only remaining place that refers to DbgVariableIntrinsics directly and does not handle DbgVariableRecords.
-
Augusto Noronha authored
A DISubprogram's hashing algorithm takes into account its Scope. A Scope can be a temporary though which can be replaced later on during compilation. This means that the hashing algorithm for a DISubprogram could produce a different hash before/after the Scope has changed. Fix this by checking the Scope's linkage name instead, which should always be the same. rdar://127004707
-
Stanislav Mekhanoshin authored
-
zhijian lin authored
The PR implements a subset of features of function __builtin_cpu_support() for AIX OS based on the information which AIX kernel runtime variable `_system_configuration` and function call `getsystemcfg()` of /usr/include/sys/systemcfg.h in AIX OS can provide. Following subset of features are supported in the PR "arch_3_00", "arch_3_1","booke","cellbe","darn","dfp","dscr" ,"ebb","efpsingle","efpdouble","fpu","htm","isel", "mma","mmu","pa6t","power4","power5","power5+","power6x","ppc32","ppc601","ppc64","ppcle","smt", "spe","tar","true_le","ucache","vsx"
-
Nico Weber authored
-
Billy Zhu authored
If a CallSiteLoc's caller cannot be translated (returns null), we cannot simply return the translation of the callee location. This is because the resulting DILocation will not have any InlinedAt field for the function it is in, and will fail the LLVM IR verifier.
-
Zequan Wu authored
Fix #85974.
-
Florian Hahn authored
This patch adds an assert to createAndCollectMergePhiForReduction to make sure there is a resume phi when vectorizing the epilogue loop. This is needed to set the resume value from the main vector loop. This assertion guards against the issue caused the revert of https://github.com/llvm/llvm-project/pull/78304.
-
Vijay Kandiah authored
This change inserts a few extension point callbacks in the DefaultFIROptimizerPassPipeline. As an example usage of callbacks in the FIR optimizer pipeline, the FIRInlinerCallback is now used to register the default MLIR inliner pass in flang-new, tco, and bbc compilation flows. Other compilation flows can use these callbacks to add extra passes at different points of the pass pipeline. --------- Co-authored-by:Vijay Kandiah <vkandiah@sky6.pgi.net>
-
Kevin Frei authored
I'm taking yet another swing at getting these tests going, on the hypothesis that the problems with buildbots & whatnot are because they're not configured with CURL support, which I've confirmed would cause the previous tests to fail. (I have no access to an ARM64 linux system, but I did repro the failure on MacOS configured without CURL support) So, the only difference between this diff and [previous](https://github.com/llvm/llvm-project/pull/85693) [diffs](https://github.com/llvm/llvm-project/pull/87676) that have already been approved is that I've added a condition to the tests to only run if Debuginfod capabilities should be built into the binary. I had done this for these tests when they were [Shell tests](https://github.com/llvm/llvm-project/pull/79181 ) and not API tests, but I couldn't find a direct analog in any API test, so I used the "plugins" model used by the intel-pt tests as well. --------- Co-authored-by:
Kevin Frei <freik@meta.com>
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Chris B authored
This PR fixes bugs in HLSL floating conversions. HLSL always has `half`, `float` and `double` types, which promote in the order: `half`->`float`->`double` and convert in the order: `double`->`float`->`half` As with other conversions in C++, promotions are preferred over conversions. We do have floating conversions documented in the draft language specification (https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf [Conv.rank.float]) although the exact language is still in flux (https://github.com/microsoft/hlsl-specs/pull/206). Resolves #81047
-
Krzysztof Pszeniczny authored
Currently the code uses FunctionSamples::getCallSiteIdentifier which will sometimes incorrectly guess that FSAFDO discriminators are probe based and will convert them incorrectly. This change doesn't affect builds which don't use FSAFDO, it only fixes sample profile matching with FS discriminators. The test for this is manually updated to use discriminator value 15, which is a perfectly valid base discriminator in the FS world, but satisfies `isPseudoProbeDiscriminator`, so `getBaseDiscriminatorFromDiscriminator` will incorrectly extract the probe index from it. Note: this change only affects how the base discriminators will be extracted when doing stale profile matching in the IR-level sample profile loader. It doesn't add stale profile matching to the MIR-level FS profile loader pass.
-
Craig Topper authored
[RISCV] Detect empty extension name after parsing MajorVersion in parseNormalizedArchString. (#90790) If the string is just a version, we will end up adding an empty string as an extension which crashes in the compare function for the std::map.
-
Timm Bäder authored
This reverts commit 6195e228.
-
Matheus Izvekov authored
Addressing post-commit review on #89807
-
Stephen Tozer authored
Reverted following probably-causing failures on some clang buildbots: https://lab.llvm.org/buildbot/#/builders/245/builds/24037 This reverts commit a1262254.
-
Heejin Ahn authored
-
Craig Topper authored
Previously we only rejected upper case characters. We should instead reject anything except lower case, numbers, and underscore. Other characters will likely confuse the extension sorting.
-