- Jun 03, 2022
-
-
Fangrui Song authored
-
Fangrui Song authored
echo.ll is unchanged to test typed pointers.
-
River Riddle authored
These effectively all share the same implementation, i.e. forward to the non-templated overload and then construct the container op.
-
Amir Ayupov authored
Follow LLVM style guide suggestion to avoid function definitions in anonymous namespaces: https://llvm.org/docs/CodingStandards.html#anonymous-namespaces Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D124896
-
Shilei Tian authored
-
Shilei Tian authored
This patch adds the codegen support for `atomic compare capture` in clang. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D120290
-
Amir Ayupov authored
Clang's doxygen documentation specifies LLVM revision. Do the same for BOLT. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D126912
-
Daniil Suchkov authored
Reverting the commit due to numerous buildbot failures. This reverts commit 00633447.
-
Mike Rice authored
-
Akira Hatanaka authored
brace-init-list containing a single element of a different scoped enumeration type It is rejected because it doesn't satisfy the condition that the element has to be implicitly convertible to the underlying type of the enumeration. http://eel.is/c++draft/dcl.init.list#3.8 Differential Revision: https://reviews.llvm.org/D126084
-
Aart Bik authored
Similar to complex128/complex64, float16 has no direct support in the ctypes implementation. This fixes the issue by using a custom F16 type to change the view in and out of MLIR code Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D126928
-
-
River Riddle authored
Since version 0.7 we've added: * Initial language support for TableGen * Tweaked syntax highlighting for PDLL * Added a new command to view intermediate PDLL output
-
River Riddle authored
This commit enables providing long-form documentation more seamlessly to the LSP by revamping decl documentation. For ODS imported constructs, we now also import descriptions and attach them to decls when possible. For PDLL constructs, the LSP will now try to provide documentation by parsing the comments directly above the decls location within the source file. This commit also adds a new parser flag `enableDocumentation` that gates the import and attachment of ODS documentation, which is unnecessary in the normal build process (i.e. it should only be used/consumed by tools). Differential Revision: https://reviews.llvm.org/D124881
-
Arjun P authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D126790
-
Chia-hung Duan authored
The assertion should come after null check
-
Nicolas van Kempen authored
modernize-use-emplace only recommends going from a push_back to an emplace_back, but does not provide a recommendation when emplace_back is improperly used. This adds the functionality of warning the user when an unecessary temporary is created while calling emplace_back or other "emplacy" functions from the STL containers. Reviewed By: kuhar, ivanmurashko Differential Revision: https://reviews.llvm.org/D101471
-
Congzhe Cao authored
This patch proposed to use a new cost model for loop interchange, which is obtained from loop cache analysis. Given a loopnest, what loop cache analysis returns is a vector of loops [loop0, loop1, loop2, ...] where loop0 should be replaced as the outermost loop, loop1 should be placed one more level inside, and loop2 one more level inside, etc. What loop cache analysis does is not only more comprehensive than the current cost model, it is also a "one-shot" query which means that we only need to query it once during the entire loop interchange pass, which is better than the current cost model where we query it every time we check whether it is profitable to interchange two loops. Thus complexity is reduced, especially after D120386 where we do more interchanges to get the globally optimal loop access pattern. Updates made to test cases are mostly minor changes and some corrections. Test coverage for loop interchange is not reduced. Currently we did not completely remove the legacy cost model, but keep it as fall-back in case the new cost model did not run successfully. This is because currently we have some limitations in delinearization, which sometimes makes loop cache analysis bail out. The longer term goal is to enhance delinearization and eventually remove the legacy cost model compeletely. Reviewed By: bmahjour, #loopoptwg Differential Revision: https://reviews.llvm.org/D124926
-
Paul Pluzhnikov authored
This is alternative to https://reviews.llvm.org/D121733 and helps with Clang header modules in which FILE may expand to "./foo.h" or "foo.h" depending on whether the file was included directly or not. Only do this when UseTargetPathSeparator is true, as we are already changing the path in that case. Reviewed By: ayzhao Differential Revision: https://reviews.llvm.org/D126396
-
Shilei Tian authored
This patch removes all `IgnoreImpCasts` in Sema, and only uses it if necessary. If the expression is not of the same type as the pointer value, a cast is inserted. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D126602
-
Paul Robinson authored
-
Mehdi Amini authored
This reverts commit 1350c988. Shared library build is broken with undefined references.
-
Matt Arsenault authored
This isn't the most natural place for it, but it avoids a circular include dependency in an out of tree patch.
-
Julien Pages authored
This patch improves the codegen of extractelement and insertelement for vector containing 8 elements. Before, a dag combine transformation was generating a sequence of 8 select/cmp. This patch changes the upper limit for this transformation and the movrel instruction will eventually be used instead. Extractlement/insertelement for vectors containing less than 8 elements are unchanged. Differential Revision: https://reviews.llvm.org/D126389
-
Alexander Smarus authored
This makes it possible to crosscompile runtimes with cl.exe on Windows. An external project is completely misconfigured otherwise because cmake_args is set only for native builds or builds crosscompiled with clang. Differential Revision: https://reviews.llvm.org/D122578 Reviewed By: beanz, compnerd
-
David Blaikie authored
While it's not as robust as using the attribute on enums/classes (the type information may be lost through a function pointer, a declaration or use of the underlying type without using the typedef, etc) but I think there's still value in being able to attribute a typedef and have all return types written with that typedef pick up the warn_unused_result behavior. Specifically I'd like to be able to annotate LLVMErrorRef (a wrapper for llvm::Error used in the C API - the underlying type is a raw pointer, so it can't be attributed itself) to reduce the chance of unhandled errors. Differential Revision: https://reviews.llvm.org/D102122
-
Craig Topper authored
If the imm is out of range for an ADDI, we will materialize it in a register using multiple instructions. If the ADD is used by a load/store, doPeepholeLoadStoreADDI can try to pull an ADDI from the constant materialization into the load/store offset. This only works if the ADD has a single use, otherwise the peephole would have to rebuild multiple nodes. This patch instead tries to solve the problem when the add is selected. We check that the add is only used by loads/stores and if it is we will select it to (ADDI (ADD X, Imm-Lo12), Lo12). This will enable the simple case in doPeepholeLoadStoreADDI that can bypass an ADDI used as a pointer. As a result we can remove the more complicated peephole from doPeepholeLoadStoreADDI. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D126576
-
Florian Hahn authored
Currently the MaxUsesToExplore limit only applies to the number of users per value, not the total number of users to explore. The current limit of 20 pessimizes IR with opaque pointers in some cases. Without opaque pointers, we have deeper pointer def-use chains in general due to extra bitcasts and geps for structs with index 0. With opaque pointers the def-use chain is not as deep but wider, due to bitcasts & 0-geps missing. To improve the situation for opaque pointers, this patch does 2 things: 1. Apply the limit to the total number of uses visited. From the wording in the description of the option it seems like this may be the original intention. With the current implementation we could still end up walking a lot of uses. 2. Increase the limit to 100. This is quite arbitrary, but enables a good number of additional optimizations. Those adjustments have a noticeable compile-time impact though. In part that is likely due to additional transformations (and conversely the current baseline misses optimizations after switching to opaque pointers). This recovers some regressions that showed up after enabling opaque pointers. Limit=100: * NewPM-O3: +0.21% * NewPM-ReleaseThinLTO: +0.87% * NewPM-ReleaseLTO-g: +0.46% https://llvm-compile-time-tracker.com/compare.php?from=2e50ecb2ef4e1da1aeab05bcf66380068e680991&to=7e6fbe519d958d09f32f01d5d44a622f551e2031&stat=instructions Limit=60: * NewPM-O3: +0.14% * NewPM-ReleaseThinLTO: +0.41% * NewPM-ReleaseLTO-g: +0.21% https://llvm-compile-time-tracker.com/compare.php?from=aeb19817d66f1a15754163c7f48e01e9ebdd6d45&to=520563fdc146319aae90d06f88d87f2e9e1247b7&stat=instructions Limit=40: * NewPM-O3: +0.11% * NewPM-ReleaseThinLTO: +0.12% * NewPM-ReleaseLTO-g: +0.09% https://llvm-compile-time-tracker.com/compare.php?from=aeb19817d66f1a15754163c7f48e01e9ebdd6d45&to=c9182576e9fe3f1c84a71479665aef91a416318c&stat=instructions Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D126236 -
Fangrui Song authored
.zdebug is unlikely used any longer: gcc -gz switched from legacy .zdebug to SHF_COMPRESSED with binutils 2.26 (2016), which has been several years. clang 14 dropped -gz=zlib-gnu support. According to Debian Code Search (`gz=zlib-gnu`), no project uses -gz=zlib-gnu. Remove .zdebug support to (a) simplify code and (b) allow removal of llvm-mc's --compress-debug-sections=zlib-gnu. In case the old object file `a.o` uses .zdebug, run `objcopy --decompress-debug-sections a.o` Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D126793
-
Fangrui Song authored
-
Krzysztof Drewniak authored
This commit defines a dataflow analysis for integer ranges, which uses a newly-added InferIntRangeInterface to compute the lower and upper bounds on the results of an operation from the bounds on the arguments. The range inference is a flow-insensitive dataflow analysis that can be used to simplify code, such as by statically identifying bounds checks that cannot fail in order to eliminate them. The InferIntRangeInterface has one method, inferResultRanges(), which takes a vector of inferred ranges for each argument to an op implementing the interface and a callback allowing the implementation to define the ranges for each result. These ranges are stored as ConstantIntRanges, which hold the lower and upper bounds for a value. Bounds are tracked separately for the signed and unsigned interpretations of a value, which ensures that the impact of arithmetic overflows is correctly tracked during the analysis. The commit also adds a -test-int-range-inference pass to ...
-
Mingming Liu authored
advisor. This patch has no functional change, and merely a preparation patch for main functional change. The motivating use case is to annotate inline remark pass name with context information (e.g. prelink or postlink, CGSCC or always-inliner), see D125495 for more details. Differential Revision: https://reviews.llvm.org/D126824
-
Adrian Prantl authored
With opaque pointers, the LLVM IR expected by this function changed.
-
Philip Reames authored
Calling the non-MI version directly was unsound (as fixed in dcdb0bf2), so remove that version to decrease likelyhood of future mistakes.
-
Xiang Li authored
One clang builtins are introduced uint WaveActiveCountBits( bool bBit ) as Langugage builtin function for HLSL. The detail for WaveActiveCountBits is at https://github.com/microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics#uint-waveactivecountbits-bool-bbit- This is only clang part change to make WaveActiveCountBits into AST. llvm intrinsic for WaveActiveCountBits will be add in separate PR. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D126857
-
Sanjay Patel authored
-
Sanjay Patel authored
We could go either way on this and several similar matches. Just matching as a binop is possibly slightly more efficient; we don't need to re-confirm the opcode of the instruction.
-
Maksim Panchenko authored
Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D126844
-
Craig Topper authored
If C is non-negative, the result of the smax must also be non-negative, so all sign bits of the result are 0. This allows DAGCombiner to remove a zext_inreg in the modified test. This zext_inreg started as a sext that became zext before type legalization then was promoted to a zext_inreg. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D126896
-
Joe Loser authored
In 6423a9f0, I accidentally thought this was getting tested, but these variables are unused. Just remove the lines instead of leaving them commented out. Differential Revision: https://reviews.llvm.org/D126901
-