- Jan 26, 2022
-
-
Nathan Sidwell authored
Code generating the special substitutions in std is a switch statement with each case block containing the same conststruction template. It is more efficient to commonize that after the switch, having determined which SubKind to create. Also, let's sort the cases. Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D118131
-
Nathan Sidwell authored
The demangler test harness is a little unclear. The failed demangling message always causes me to think about 'reality', changing to a simple 'Found' seems clearer. The expected-to-fail tests abort as soon as one passes, rather than continue, and then abort if any passed. This changes that loop to fail at the end, in a similar manner to the expected-to-work loop. Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D118130
-
serge-sans-paille authored
A few header removal, some forward declarations. As usual, this can break your build due to false dependencies, the most notable change are: - "llvm/BinaryFormat/AMDGPUMetadataVerifier.h" no longer includes "llvm/BinaryFormat/MsgPackDocument.h" The impact on generated preprocessed lines for LLVMBinaryFormat is pretty nice: $ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/BinaryFormat/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l before this patch: 705281 after this patch: 751456 Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
-
Nicolas Vasilache authored
This revision adds enough support to allow InlineAsmOp to work properly with indirect memory constraints "*m". These require an explicit "elementtype" TypeAttr on the operands to pass LLVM verification and need to be provided. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D118006
-
Simon Pilgrim authored
Test on SSE2/SSE41/AVX1 targets to compare PMOVMSK vs PTEST codegen paths Add v8i8 reduction case and test on X64 and X86 targets to check 32-bit handling
-
alex-t authored
Currently not (xor_one_use) pattern is always selected to S_XNOR irrelative od the node divergence. This relies on further custom selection pass which converts to VALU if necessary and replaces with V_NOT_B32 ( V_XOR_B32) on those targets which have no V_XNOR. Current change enables the patterns which explicitly select the not (xor_one_use) to appropriate form. We assume that xor (not) is already turned into the not (xor) by the combiner. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D116270
-
LLVM GN Syncbot authored
-
Pavel Labath authored
-
Paul Walker authored
NOTE: Only considers i64 based vectors at this time because smaller element types require extra isel operand parsing. Differential Revision: https://reviews.llvm.org/D118040
-
Salman Javed authored
-
LLVM GN Syncbot authored
-
Salman Javed authored
Build warning here: https://lab.llvm.org/buildbot/#/builders/57/builds/14322
-
LLVM GN Syncbot authored
-
Nikita Popov authored
This extends support to byval arguments. It would be further extended to handle the case of non-captured noalias returns.
-
Stanislav Gatev authored
Make specializations of `DataflowAnalysis` extendable with domain-specific logic for merging distinct values when joining environments. This could be a strict lattice join or a more general widening operation. This is part of the implementation of the dataflow analysis framework. See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev. Reviewed-by: xazax.hun Differential Revision: https://reviews.llvm.org/D118038
-
OCHyams authored
Not quite NFC because a little work was required to configure some tests to run on Windows at all. Before this patch on Windows: $ llvm-lit cross-project-tests\debuginfo-tests\dexter\feature-tests Unsupported: 49 Passed : 23 After this patch on Windows: $ llvm-lit cross-project-tests\debuginfo-tests\dexter\feature-tests Unsupported : 27 Passed : 39 Expectedly failed: 6 There are 3 main changes here. The first is to add a few more substitutions in cross-project-tests/lit.cfg.py so that tests need to use specific flags can still use the dexter regression test defaults for the native platform. These are: %dexter_regression_test_debugger %dexter_regression_test_builder %dexter_regression_test_cflags %dexter_regression_test_ldflags Tests that now use these options and therefore can be run on Windows too (though the second is still failing for unknown reasons): cross-project-tests/debuginfo-tests/dexte/feature_tests /subtools/clang-opt-bisect/clang-opt-bisect.cpp /subtools/test/source-root-dir.cpp The second change is to remove spurious `REQUIRES: system-linux, lldb` and `UNSUPPORTED: system-windows` directives, and make changes to lit.local.cfg files that have the same effect. I've also added comments to the genuine REQUIRES, UNSUPPORTED, and XFAIL directives so it's easier to understand requirements at a glance. The most common reason for a test to not be supported on Windows is that it uses DexLimitSteps, DexDeclareAddress, or DexCommandLine, none of which are supported in the dbgeng driver. There are two failures on Windows that were previously hidden, which I've XFAILed: cross-project-tests/debuginfo-tests/dexter/feature_tests /commands/perfect/dex_finish_test/default_conditional.cpp /commands/perfect/dex_finish_test/default_conditional_hit_count.cpp And two that were easy to fix: cross-project-tests/debuginfo-tests/dexter/feature_tests /commands/perfect/dex_finish_test/default_simple.cpp /commands/perfect/dex_finish_test/default_hit_count.cpp Lastly, I've set three directories as unsupported. cross-project-tests/debuginfo-tests/dexter/feature_tests /commands/perfect/limit_steps /commands/perfect/dex_declare_address /commands/perfect/dex_declare_file The first two are unsupported on Windows because they contains tests for the DexLimitSteps and DexDeclareAddress commands which aren't supported in the dbgeng driver. The third is unsupported on all platforms as the tests involve invoking clang directly, which isn't currently a supported way of building tests for dexter in lit (it can cause problems for cross compilers that can target the host, as the tests use the default triple and linker, which may be aligned for the default target, not host). Tested on Windows and Linux. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D118048 -
Simon Pilgrim authored
-
Sebastian Neubauer authored
Fold (unmerge undef) -> undef, undef, ... Differential Revision: https://reviews.llvm.org/D118138
-
Sebastian Neubauer authored
-
David Spickett authored
This is to be used when you want to know what subranges of a larger range have memory tagging. Like MakeTaggedRange but memory without tags is skipped and you get a list of ranges back. Will be used later by DumpDataExtractor to show memory tags. MakeTaggedRanges assumes that the memory regions it is given are sorted in ascending order and do not overlap. For the current use case where you get regions from GetMemoryRegions and are on some Linux like OS, this is reasonable to assume. I've used asserts to check those conditions. In future any API binding will check them up front to prevent a crash. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D112824
-
Max Kazantsev authored
These tests demonstrate how suboptimal is the lowering of equality checks for short vectors.
-
Salman Javed authored
Support for NOLINT(BEGIN/END) blocks (implemented in D108560) is currently costly. This patch aims to improve the performance with the following changes: - The use of tokenized NOLINTs instead of a series of repetitive ad-hoc string operations (`find()`, `split()`, `slice()`, regex matching etc). - The caching of NOLINT(BEGIN/END) block locations. Determining these locations each time a new diagnostic is raised is wasteful as it requires reading and parsing the entire source file. Move NOLINT-specific code from `ClangTidyDiagnosticConsumer` to new purpose-built class `NoLintDirectiveHandler`. Differential Revision: https://reviews.llvm.org/D116085
-
Nicolas Vasilache authored
Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D118116
-
Nikita Popov authored
Test a possibly unwinding call with a byval and sret argument.
-
Nuno Lopes authored
-
Benjamin Kramer authored
Use shufflevector to do the subvector extracts. This allows a lot more load merging on AMDGPU and also on NVPTX when <2 x half> is involved. Differential Revision: https://reviews.llvm.org/D117219
-
Stanislav Gatev authored
This patch ensures that the dataflow analysis framework does not crash when it encounters access to members of union types. This is part of the implementation of the dataflow analysis framework. See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev. Reviewed-by: xazax.hun Differential Revision: https://reviews.llvm.org/D118226
-
Alexander Batashev authored
Add a custom parser and printer for `omp.target` operation. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D117539
-
Jan Svoboda authored
The Clang frontend sometimes fails on the following assertion when launched with `-serialize-diagnostic-file <x>`: ``` Assertion failed: (BlockScope.empty() && CurAbbrevs.empty() && "Block imbalance"), function ~BitstreamWriter, file BitstreamWriter.h, line 125. ``` This was first noticed when passing an unknown command-line argument to `-cc1`. It turns out the `DiagnosticConsumer::finish()` function should be called as soon as processing of all source files ends, but there are some code paths where that doesn't happen: 1. when command line parsing fails in `cc1_main()`, 2. when `!Act.PrepareToExecute(*this)` or `!createTarget()` evaluate to `true` in `CompilerInstance::ExecuteAction` and the function returns early. This patch ensures `finish()` is called in all those code paths. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D118150
-
Jan Svoboda authored
LLVM Programmer’s Manual strongly discourages the use of `std::vector<bool>` and suggests `llvm::BitVector` as a possible replacement. This patch replaces `std::vector<bool>` with `llvm::BitVector` in the Syntax library and replaces range-based for loop with regular for loop. This is necessary due to `llvm::BitVector` not having `begin()` and `end()` (D117116). Reviewed By: dexonsmith, dblaikie Differential Revision: https://reviews.llvm.org/D118109
-
Jan Svoboda authored
LLVM Programmer’s Manual strongly discourages the use of `std::vector<bool>` and suggests `llvm::BitVector` as a possible replacement. This patch replaces the use of `std::vector` with `llvm::BitVector` in LLVM's YAML traits and replaces the call to `Vec.insert(Vec.begin(), N, false)` on empty `Vec` with `Vec.resize(N)`, which has the same semantics but avoids using `insert` and iterators, which `llvm::BitVector` doesn't possess. Reviewed By: dexonsmith, dblaikie Differential Revision: https://reviews.llvm.org/D118111
-
Nuno Lopes authored
The phi-of-ops functionality has a function OpIsSafeForPHIOfOps to determine when it's safe to create the new phi. But this function only checks for the obvious dominator conditions and ignores memory. This patch takes the conservative approach and disables phi-of-ops whenever there's a load that doesn't dominate the phi, as its value may be affected by a store inside the loop. This can be improved later to check aliasing between the load/stores. Fixes https://llvm.org/PR53277 Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D117999
-
serge-sans-paille authored
A few more forward-declarations, a few less headers. the impact on number of preprocessed lines for LLVMSupport is negligible (-3K lines) but it's always good to remove dependencies. Related discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
-
Nikita Popov authored
This extract a common isNotVisibleOnUnwind() helper into AliasAnalysis, which handles allocas, byval arguments and noalias calls. After D116998 this could also handle sret arguments. We have similar logic in DSE and MemCpyOpt, which will be switched to use this helper as well. The noalias call case is a bit different from the others, because it also requires that the object is not captured. The caller is responsible for doing the appropriate check. Differential Revision: https://reviews.llvm.org/D117000
-
serge-sans-paille authored
-
Nikita Popov authored
-
Nikita Popov authored
This was reintroduced by D110114.
-
Maciej Gabka authored
When wider vectors are used, for example fixed width SVE, there is no patterns to select AArch64ISD::LD1LANEpost nodes, so we should do an early exit. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D117674
-
Adrian Kuegel authored
Differential Revision: https://reviews.llvm.org/D118221
-
Martin Storsjö authored
This allows getting rid of one case of LIBCXX-WINDOWS-FIXME. The fixme comment was inaccurate; aligned allocation functions are provided these days, but the test kept failing as it was using mismatched allocation and free functions. A similar issue was fixed earlier, in 6596778b. That test was fixed by overriding the aligned `operator new` too, and returning a dummy fixed allocation instead. As this test is libcxx specific, it can use the internal `std::__libcpp_aligned_free()` instead, to match libcxx's internal aligned `operator new`. Differential Revision: https://reviews.llvm.org/D118190
-