- Oct 31, 2023
-
-
Med Ismail Bennani authored
This should silence the "misleading indentiation" warnings introduced by b2929beb , by adding an no-op if-statement, if the surrounding if-statement have been compiled out. Signed-off-by:
Med Ismail Bennani <ismail@bennani.ma>
-
Artem Belevich authored
Code model has no impact on NVPTX as we do not produce any object files, but we need to avoid erroring out on the -mcmodel argument passed to the top-level compilation and propagated to all sub-compilations.
-
serge-sans-paille authored
Instead of passing the Size by reference, assuming it is initialized, return it alongside the expected char result as a POD. This makes the interface less error prone: previous interface expected the Size reference to be initialized, and it was often forgotten, leading to uninitialized variable usage. This patch fixes the issue. This also generates faster code, as the returned POD (a char and an unsigned) fits in 64 bits. The speedup according to compile time tracker reach -O.7%, with a good number of -0.4%. Details are available on https://llvm-compile-time-tracker.com/compare.php?from=3fe63f81fcb999681daa11b2890c82fda3aaeef5&to=fc76a9202f737472ecad4d6e0b0bf87a013866f3&stat=instructions:u And icing on the cake, on my setup it also shaves 2kB out of libclang-cpp :-) This is a recommit of d8f5a18b for -
Peiming Liu authored
-
Philip Reames authored
Builds on #67982 which recently introduced the nneg flag on a zext instruction. Note that this change is the first point where the flag is being used for an optimization, and thus may expose latent miscompiles. We've recently taught both CVP and InstCombine to infer the flag when forming zext, but nothing else is using the flag just yet.
-
Peiming Liu authored
-
Craig Topper authored
Builds on #67982 which recently introduced the nneg flag on a zext instruction.
-
Kirill Stoimenov authored
-
Nick Desaulniers authored
As alluded to in #20571, it would be nice if we could mutate operand lists of MachineInstr's more safely. Add an insert method that together with removeOperand allows for easier splicing of operands. Splitting this patch off early to get feedback; I need to either: - mutate an INLINEASM{_BR} MachinInstr's MachineOperands from being registers (physical or virtual) to memory (MachineOperandType::MO_FrameIndex). These are not 1:1 operand replacements, but N:M operand replacements. i.e. we need to update 2 MachineOperands into the middle of the operand list to 5 (at least for x86_64). - copy, modify, write a new MachineInstr which has its relevant operands replaced. Either approaches are hazarded by existing references to either the operands being moved, or the instruction being removed+replaced. For my purposes in regalloc, either seem to work for me, so hopefully reviewers can help me determine which approach is preferable. T... -
Youngsuk Kim authored
-
Danila Malyutin authored
The old algorithm would remove all operands matching %step SCEV when it intended to only remove a single one. This lead to assert when SCEVAddExpr was of the form %step + %step and potential miscompiles in similar cases. Such SCEVs could be created when construction reached depth thresholds. Fixes #70348
-
Jungwook Park authored
Added missing register_translations in python to replicate the same in the C-API Cleaned up the current calls to register passes where the other calls are already embedded in the mlirRegisterAllPasses. found here, https://discourse.llvm.org/t/opencl-example/74187
-
Alexey Bataev authored
If the very first reduction operation is not bool logical op, but some others are, still need to emit the boo logic op for all the extra reduction operations to avoid incorrect poison propagation.
-
Justin Bogner authored
Since e39f6c18 "[opt] Infer DataLayout from triple if not specified", this test (correctly) emits a load of an i64 with 8 byte alignment, rather than with 4 byte alignment.
-
michaelrj-google authored
The calculation for if a number being printed is truncated and should be rounded up assumed a double for one of its constants, causing occassional misrounding. This fixes that by making the constant based on the mantissa width.
-
Craig Topper authored
Builds on #67982 which recently introduced the nneg flag on a zext instruction.
-
Alexey Bataev authored
-
Philip Reames authored
This IR feature was recently added in #67982. An upcoming change will improve our lowering on these examples.
-
Justin Bogner authored
The frontend passes this along since https://reviews.llvm.org/D135335
-
Pete Lawrence authored
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return `void` instead of ~~`bool`~~ Justifications: - The code doesn't ultimately apply the `true`/`false` return values. - The methods already pass around a `CommandReturnObject`, typically with a `result` parameter. - Each command return object already contains: - A more precise status - The error code(s) that apply to that status Part 1 refactors the `CommandObject::Execute(...)` method. - See [https://github.com/llvm/llvm-project/pull/69989](https://github.com/llvm/llvm-project/pull/69989) rdar://117378957
-
Teresa Johnson authored
Detect when we are matching a memprof profile with no column numbers, and in that case treat all column numbers as 0 when matching. The profiled binary might have been built with -gno-column-info, for example.
-
Philip Reames authored
-
Andrew Gozillon authored
[Flang][MLIR][OpenMP] Temporarily re-add basic handling of uses in target regions to avoid gfortran test-suite regressions This was a regression introduced by myself in: https://github.com/llvm/llvm-project/commit/6a62707c048e16ce9bad37ed8e3520799139436b where I too hastily removed the basic handling of implicit captures we have currently. This will be superseded by all implicit captures being added to target operations map_info entries in a soon landing series of patches, however, that is currently not the case so we must continue to do some basic handling of these captures for the time being. This patch re-adds that behaviour to avoid regressions. Unfortunately this means some test changes as well as getUsedValuesDefinedAbove grabs constants used outside of the target region which aren't handled particularly well currently.
-
Shilei Tian authored
In D158802 we honored user's `thread_limit` value even with the optimization introduced in D152014. This patch adds a simple test.
-
Joseph Huber authored
Summary: Title
-
Jakub Kuderski authored
Update the documentation surrounding reduction kinds. Highlight different min/max reduction kinds for signed/unsigned integers and floats. Update IR examples.
-
Michael Maitland authored
When stride is x0, a strided load should behave like a unit stride load, which uses the VLDE sched class. --------- Co-authored-by:Wang Pengcheng <wangpengcheng.pp@bytedance.com>
-
Michael Maitland authored
G_GLOBAL_VALUE should be lowered into an absolute address if `-codemodel=small` is used or into a PC-relative if `-codemodel=medium` is used. PR #68380 tried to create special instructions to do this, but I don't see why we need to do that.
-
Vlad Serebrennikov authored
-
Aiden Grossman authored
This reverts commit 4aa12afb. This change introduced failures upon checking out the PR source code. Pulling this out of tree while I investigate further.
-
Aiden Grossman authored
This patch makes a couple changes to the PR code formatting check: - Moves the `changed-files` action to before the checkout to make sure that it pulls information from the Github API rather than by running `git diff` to alleviate some performance problems. - Checkout the head of the pull request head instead of the base of the pull request to ensure that we have the PR commits inside the checkout. - Add an additional sparse checkout of the necessary LLVM tools to run the action to alleviate security problems introduced by checking out the head of the pull request. Only code from the base of the pull request runs. - Adjust the commit references to be based on `HEAD` as Github doesn't give exact commit SHAs for the first commit in the PR.
-
Philip Reames authored
Builds on #67982 which recently introduced the nneg flag on a zext instruction. InstCombine is one of our largest canonicalizers of zext from non-negative sext instructions, so set the flag there.
-
Vlad Serebrennikov authored
This patch backports a one-liner `std::to_underlying` that came with C++23. This is useful for refactoring unscoped enums into scoped enums, because the latter are not implicitly convertible to integer types. I followed libc++ implementation, but I consider their testing too heavy for us, so I wrote a simpler set of tests.
-
Jan Kokemüller authored
The calls to std::construct_at might overwrite the previously set __has_value_ flag in the case where the flag is overlapping with the actual value or error being stored (since we use [[no_unique_address]]). To fix this issue, this patch ensures that we initialize the __has_value_ flag after we call std::construct_at. Fixes #68552
-
Igor Kirillov authored
* Enhanced the logic of ExpandMemCmp pass to merge contiguous subsequences in LoadSequence, based on sizes allowed in `AllowedTailExpansions`. * This enhancement seeks to minimize the number of basic blocks and produce optimized code when using memcmp with non-register aligned sizes. * Enable this feature for AArch64 with memcmp sizes modulo 8 equal to 3, 5, and 6. Reapplication of #69942 after fixing a bug
-
Philip Reames authored
To reduce the spurious test delta in an upcoming change.
-
Jon Chesterfield authored
I think it follows from the HSA spec that a write to the first byte is deemed significant to the GPU in which case writing to the second short and reading back from it later would be safe. However, the examples for this all involve an atomic write to the first 32 bits and it seems a credible risk that the occasional CI errors abound invalid packets have as their root cause that the firmware notices the early write to packet->setup and treats that as a sign that the packet is ready to go. That was overly-paranoid, however in passing noticed the code in libc is genuinely invalid. The memset writes a zero to the header byte, changing it from type_invalid (1) to type_vendor (0), at which point the GPU is free to read the 64 byte packet and interpret it as a vendor packet, which is probably why libc CI periodically errors about invalid packets. Also a drive by change to do the atomic store on a uint32_t consistently. I'm not sure offhand what __atomic_store_n on a uint16_t* and an int resolves to, seems better to be unambiguous there.
-
Antonio Frighetto authored
AArch64 backend now features v8.4a atomic Load-Acquire RCpc and Store-Release register unscaled support.
-
Antonio Frighetto authored
-
Simon Pilgrim authored
Fix discrepancy from when this was forked from the SkylakeServer model Confirmed with Agner + uops.info
-