- Nov 22, 2022
-
-
Aart Bik authored
This brings back previous SIMD functionality, but in a separate pass. The idea is to improve this new pass incrementally, going beyond for-loops to while-loops for co-iteration as welll (masking), while introducing new abstractions to make the lowering more progressive. The separation of sparsification and vectorization is a very good first step on this journey. Also brings back ArmSVE support Still to be fine-tuned: + use of "index" in SIMD loop (viz. a[i] = i) + check that all ops really have SIMD support + check all forms of reductions + chain reduction SIMD values Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D138236
-
David Blaikie authored
-
Kai Nacke authored
Extends the global isel implementation to support G_ADD and G_SUB. Reviewed By: arsenm, amyk Differential Revision: https://reviews.llvm.org/D128106
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D138435
-
Quentin Colombet authored
This pass has outgrown its original goal and is now going to be used to expand certain memref operations before lowering. Reflect that in the name. The pass is now called expand-strided-metadata. NFC Differential Revision: https://reviews.llvm.org/D138448
-
Saleem Abdulrasool authored
We would previously reject valid input where GNU attributes preceded the standard attributes on top-level declarations. A previous attribute handling change had begun rejecting this whilst GCC does honour this layout. In practice, this breaks use of `extern "C"` attributed functions which use both standard and GNU attributes as experienced by the Swift runtime. Objective-C deserves an honourable mention for requiring some additional special casing. Because attributes on declarations and definitions differ in semantics, we need to replicate some of the logic for detecting attributes to declarations to which they appertain cannot be attributed. This should match the existing case for the application of GNU attributes to interfaces, protocols, and implementations. Take the opportunity to split out the tooling tests into two cases: ones which process macros and ones which do not. Special thanks to Aaron Ballman for the many hints and extensive rubber ducking that was involved in identifying the various places where we accidentally dropped attributes. Differential Revision: https://reviews.llvm.org/D137979 Fixes: #58229 Reviewed By: aaron.ballman, arphaman
-
John Baldwin authored
GCC expands the pointer type in this conditional expression even for template types _Up that are not arrays. This raises an error when std::decay<> is used with reference types (as is done in LLVM's sources). Using add_pointer<> causes GCC to only instantiate a pointer type for array types. Reviewed By: #libc, philnik, ldionne Differential Revision: https://reviews.llvm.org/D135469
-
Heejin Ahn authored
This disables `RegisterCoalescer` pass at -O1, which currently runs for all levels except for -O0, as a part of common optimization pipeline. `RegisterCoalescer` pass degrades Wasm debug info quality by a significant margin. When I use `LiveDebugValue` analysis, disabling this increases the average PC ranges covered by 15% on Emscripten core benchmarks (52% -> 66.8%). (Our code is currently not using `LiveDebugValues` analysis at the moment, and the experiment was done on a local setting that enabled it. I'm planning to upstream it soon.) In Emscripten core benchmarks, disabling this at -O1 causes +4.5% in code size and +1% in the number of locals. The number of globals stays the same. I believe this tradeoff is acceptable given that -O1 is not usually used in production builds and is often used for debugging when the application size is very large. The plan is to investigate and fix what's causing the degradation in that pass, but for now disabling it seems like a low-hanging quick fix. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D138455
-
Florian Hahn authored
At the moment, getRangeRef may overflow the stack for very deeply nested expressions. This patch introduces a new getRangeRefIter function, which first builds a worklist of N-ary expressions and phi nodes, followed by their operands iteratively. getRangeRef has been extended to also take a Depth argument and it switches to use getRangeRefIter once the depth reaches a certain threshold. This ensures compile-time is not impacted in general. Note that the iterative algorithm may lead to a slightly different evaluation order, which could result in slightly worse ranges for cyclic phis. https://llvm-compile-time-tracker.com/compare.php?from=23c3eb7cdf3478c9db86f6cb5115821a8f0f5f40&to=e0e09fa338e77e53242bfc846e1484350ad79773&stat=instructions Fixes #49579. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D130728
-
Nikolas Klauser authored
This is just to make to follow-up diffs simpler Reviewed By: ldionne, #libc, EricWF Spies: EricWF, libcxx-commits Differential Revision: https://reviews.llvm.org/D137498
-
Benjamin Kramer authored
[PowerPC] Move PPCGenRegisterBankInfo.def into the directory where it would be if it was autogenerated
-
Ji, Jinsong authored
The vim Formatonsave integration is not working if we create a new file directly using vim. eg: vi -V9t.log t.cpp It will not able to format the buffer. > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "...clang/tools/clang-format/clang-format.py", line 156, in <module> > main() > File "...clang/tools/clang-format/clang-format.py", line 80, in main > with open(vim.current.buffer.name, 'r') as f: > FileNotFoundError: [Errno 2] No such file or directory: '...t.cpp' This patch check the file before we try to open it. Reviewed By: owenpan Differential Revision: https://reviews.llvm.org/D138234
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D138438
-
Christian Kandeler authored
... in semantic highlighting. These specifiers cannot be identified by simple lexing (since e.g. variables with these names can legally be declared), which means they should be semantic tokens. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D137943
-
Fangrui Song authored
Restore global descriptor demangling after D138095 "[asan] Keep Itanium mangled names in global metadata" This amends commit 00be3578 to demangle symbol names in global descriptors. We keep the mangled name for the `__odr_gen_asan_*` variables and the runtime __cxa_demangle call site change (which fixed possible leaks for other scenarios: non-fatal diagnostics). compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp uses an undefined weak `__cxa_demangle` which does not pull in an archive definition. A -static-libstdc++ executable link does not get demangled names. Unfortunately this means we cannot rely on runtime demangling. See compiler-rt/test/asan/TestCases/global-demangle.cpp
-
Dave Lee authored
Update `fullpath` asserts in TestMiniDump.py. This reverts commit 682fcc95f4149f00e9da961817fe2f5832e4b301.
-
Thomas Lively authored
Including builtin and intrinsic names. These should be the final names for the proposal. https://github.com/WebAssembly/relaxed-simd/blob/main/proposals/relaxed-simd/Overview.md Reviewed By: aheejin, maratyszcza Differential Revision: https://reviews.llvm.org/D138249
-
Owen Pan authored
Fixes #59089. Differential Revision: https://reviews.llvm.org/D138371
-
Kazu Hirata authored
This patch replaces None with a custom base class in FormatVariadicTest.cpp. As part of the migration from llvm::Optional to std::optional, I'd like to define None as std::nullopt, but FormatVariadicTest.cpp blocks that. When you specialize indexed_accessor_range with the base class being None, the template instantiation eventually generates code to compare two instances of None. That's not guaranteed with std::nullopt. Replacing None with a custom base class allows me to define None as std::nullopt. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Differential Revision: https://reviews.llvm.org/D138381
-
Dave Lee authored
Reimplement `SBFileSpec.fullpath` to (indirectly) use `FileSpec::GetPath`. Instead of hardcoding a `/` separator, use `GetPath`. This makes use of the `FileSpec`'s internal style, which for example allows for backslash on Windows where required. It's not obvious from looking at the source, but the `fullpath` property is implemented with `str`, which calls `GetDescription`, which finally calls `GetPath`. Differential Revision: https://reviews.llvm.org/D138348
-
Kai Nacke authored
Adds some more code to GlobalISel to enable instruction selection for and/or/xor. - Makes G_IMPLICIT_DEF, G_CONSTANT, G_AND, G_OR, G_XOR legal for 64bit register size. - Implement lowerReturn in CallLowering - Provides mapping of the operands to register banks. - Adds register info to G_COPY operands. The utility functions are all only implemented so far to support this use case. Especially the functions in PPCGenRegisterBankInfo.def are too simple for general use. Reviewed By: nemanjai, shchenz, amyk Differential Revision: https://reviews.llvm.org/D127530
-
Florian Hahn authored
Extra test coverage for D130728.
-
Jordan Rupprecht authored
This test copies main.c to main-copy.c and modifies main-copy.c while debugging, but main.c may have come from a readonly location, which means writing to main-copy.c will fail because permissions are preserved. Run the equivalent of "chmod u+w" before attempting to modify it. This effect can be seen by attempting to run this test after running `chmod u-w lldb/test/API/source-manager/main.c`
-
Nikolas Klauser authored
We currently call a lot of functions with the same list of types. To avoid forgetting any of them, this patch adds type_lists and utilities for it. Specifically, it adds - `type_list` - This is just a list of types - `concatenate` - This allows concatenating type_lists - `for_each` - Iterate over a type_list Reviewed By: ldionne, #libc Spies: jloser, EricWF, libcxx-commits Differential Revision: https://reviews.llvm.org/D137476
-
Maryam Moghadas authored
This patch adds 8 news load and store with length instructions including lxvrl, lxvrll, stxvrl, stxvrll, lxvprl, lxvprll, stxvprl, stxvprll. Reviewed By: stefanp, amyk, saghir Differential Revision: https://reviews.llvm.org/D136992
-
Nathan Sidwell authored
Replace old-style, brittle, grep with new-fangled FileCheck technology. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D137941
-
Sanjay Patel authored
An early run of VectorCombine was added with D102496 specifically to deal with unnecessary vector ops produced with the C matrix extension. This patch is proposing to try those folds in general and add a pair of load folds to the menu. The load transform will partly solve (see PhaseOrdering diffs) a longstanding vectorization perf bug by removing redundant loads via GVN: issue #17113 The main reason for not enabling the extra pass generally in the initial patch was compile-time cost. The cost of VectorCombine was significantly (surprisingly) improved with: 87debdad https://llvm-compile-time-tracker.com/compare.php?from=ffe05b8f57d97bc4340f791cb386c8d00e0739f2&to=87debdadaf18f8a5c7e5d563889e10731dc3554d&stat=instructions:u ...so the extra run is going to cost very little now - the total cost of the 2 runs should be less than the 1 run before that micro-optimization: https://llvm-compile-time-tracker.com/compare.php?from=5e8c2026d10e8e2c93c038c776853bed0e7c8fc1&to=2c4b68eab5ae969811f422714e0eba44c5f7eefb&stat=instructions:u It may be possible to reduce the cost slightly more with a few more earlier-exits like that, but it's probably in the noise based on timing experiments. Differential Revision: https://reviews.llvm.org/D138353
-
Sanjay Patel authored
The option was added with https://reviews.llvm.org/D102496, and currently the name is accurate, but I am hoping to add a load transform that is not a scalarization. See issue #17113.
-
Fangrui Song authored
-
Manuel Brito authored
Differential Revision: https://reviews.llvm.org/D138450
-
Mark de Wever authored
This was a bug discovered by @jwakely. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D137911
-
Archibald Elliott authored
The intention behind this commit is to reduce the use of Host.h/Host.cpp in Support, to where it is only necessary. In this case, the endian-detection and support functionality needed by these implementations can be provided by `Support/SwapByteOrder.h` in a cleaner manner. This patch also changes the byte swap in SHA256.cpp to use the byte swap function from that header, rather than an inlined implementation. Differential Revision: https://reviews.llvm.org/D137834
-
Alexey Bataev authored
extractelements. If the resulting type is going to be scalarized, no need to adjust the cost of removed extractelement and insert/extract subvector costs. Otherwise, the compiler can crash because of the wrong type sizes.
-
Hassnaa Hamdi authored
1-To generate code compatible to streaming mode: - enable custom lowering fp_to_int, int_to_fp, fp_round, fmul, trunc. - disable fp_to_int combining into invalid NEON intrinsic. 2-Add testing files: fp_to_int.ll fp-convert.ll int_to_fp.ll trunc.ll Differential Revision: https://reviews.llvm.org/D138281
-
Hassnaa Hamdi authored
-
Jordan Rupprecht authored
This is not available in all versions of swig 3.
-
Caroline Concatto authored
-
Christian Sigg authored
`Optional<T>::hasValue()` is deprecated and should be private like `has_value()`. Reviewed By: tpopp, bondhugula Differential Revision: https://reviews.llvm.org/D138400
-
Craig Topper authored
This matches what we get for something like. %0 = shl i32 %x, C %1 = zext i32 %0 to i64 %2 = getelementptr i32, ptr %y, %1 The shift before the zext and the shift implied by the GEP get combined with an AND after them. We need to split it back into 2 shifts so we can fold one into shXadd.uw. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D137886
-