- Jan 26, 2022
-
-
Sam McCall authored
Underscore-uglified identifiers are used in standard library implementations to guard against collisions with macros, and they hurt readability considerably. (Consider `push_back(Tp_ &&__value)` vs `push_back(Tp value)`. When we're describing an interface, the exact names of parameters are not critical so we can drop these prefixes. This patch adds a new PrintingPolicy flag that can applies this stripping when recursively printing pieces of AST. We set it in code completion/signature help, and in clangd's hover display. All three features also do a bit of manual poking at names, so fix up those too. Fixes https://github.com/clangd/clangd/issues/736 Differential Revision: https://reviews.llvm.org/D116387
-
Nikita Popov authored
AMDGPUHSAMetadataStreamer currently assumes that pointer arguments without align attribute have ABI alignment of the pointee type. This is incompatible with opaque pointers, but also plain incorrect: Pointer arguments without explicit alignment have alignment 1. It is the responsibility of the frontent to add correct align annotations. Differential Revision: https://reviews.llvm.org/D118229
-
David Spickett authored
This adds an option --show-tags to "memory read". (lldb) memory read mte_buf mte_buf+32 -f "x" -s8 --show-tags 0x900fffff7ff8000: 0x0000000000000000 0x0000000000000000 (tag: 0x0) 0x900fffff7ff8010: 0x0000000000000000 0x0000000000000000 (tag: 0x1) Tags are printed on the end of each line, if that line has any tags associated with it. Meaning that untagged memory output is unchanged. Tags are printed based on the granule(s) of memory that a line covers. So you may have lines with 1 tag, with many tags, no tags or partially tagged lines. In the case of partially tagged lines, untagged granules will show "<no tag>" so that the ordering is obvious. For example, a line that covers 2 granules where the first is not tagged: (lldb) memory read mte_buf-16 mte_buf+16 -l32 -f"x" --show-tags 0x900fffff7ff7ff0: 0x00000000 <...> (tags: <no tag> 0x0) Untagged lines will just not have the "(tags: ..." at all. Though they may be part of a larger output that does have some tagged lines. To do this I've extended DumpDataExtractor to also print memory tags where it has a valid execution context and is asked to print them. There are no special alignment requirements, simply use "memory read" as usual. All alignment is handled in DumpDataExtractor. We use MakeTaggedRanges to find all the tagged memory in the current dump, then read all that into a MemoryTagMap. The tag map is populated once in DumpDataExtractor and re-used for each subsequently printed line (or recursive call of DumpDataExtractor, which some formats do). Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D107140
-
Nikita Popov authored
We could keep the non-i8 GEP code for non-opaque pointers, but there's two reasons I'm dropping it: First, this actually appears to be dead code, at least it isn't hit in any of our tests. I expect that this is because we usually expand trip counts, and those are never pointers (anymore). Second, the non-i8 GEP was actually incorrect in multiple ways, because it used SCEV type sizes, which don't match DL type sizes (for pointers) and certainly don't match type alloc sizes (which is what GEPs actually use). As such, I'm simplifying the code to always use the i8 GEP code path if it does get hit.
-
Alban Bridonneau authored
We have some bitcasts which we know will be simplified, so their cost is zero. Reviewed By: david-arm, sdesmalen Differential Revision: https://reviews.llvm.org/D118019
-
Sebastian Neubauer authored
Starting with VS 2019, CMake defaults to the x64 host toolchain, so the warning does not apply anymore. References: VS 2017 defaults to x86 https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2015%202017.html?highlight=host#toolset-selection VS 2019 and 2022 default to x64 for x64 targets https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html?highlight=host#toolset-selection https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html?highlight=host#toolset-selection Differential Revision: https://reviews.llvm.org/D118228
-
David Spickett authored
-
David Spickett authored
-
Abhina Sreeskantharajan authored
This commit https://github.com/llvm/llvm-project/commit/75e164f61d391979b4829bf2746a5d74b94e95f2 removed the AutoConvert.h header causing a build break on z/OS. This patch adds it back to fix it. Reviewed By: zibi Differential Revision: https://reviews.llvm.org/D118129
-
LLVM GN Syncbot authored
-
David Spickett authored
The tag map holds a sparse set of memory tags and allows you to query ranges for tags. Granules that do not have tags will be set to llvm::None. to keep the ordering intact. If there are no tags for the requested range we'll just return an empty result so that callers don't need to check that all values are llvm::None. This will be combined with MemoryTagManager's MakeTaggedRanges: * MakeTaggedRanges * Read from all those ranges * Insert the results into the tag map * Give the tag map to whatever needs to print tags Which in this case will be "memory read"/DumpDataExtractor. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D112825
-
Nikita Popov authored
-
serge-sans-paille authored
Based on the output of iwyu. A full rebuild of llvm-project doesn't exhibit any significant false dependencies. The impact on preprocessed output is larger than expected, given the small amount of changes $ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/TextAPI/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l before: 635319 After: 643716 Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
-
Salman Javed authored
Comment change only, no functional change intended. Example of warning: https://lab.llvm.org/buildbot/#/builders/188/builds/8696/steps/4/logs/warnings__2_
-
Simon Moll authored
Packed-mode broadcast of f32/i32 requires the subregister to be replicated to the full I64 register prior. Add repl_i32 and repl_f32 to faciliate this. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D117878
-
serge-sans-paille authored
Should fix https://lab.llvm.org/buildbot#builders/37/builds/10259
-
Nikita Popov authored
This should be no functional change, as the cases supported by the helper and the cases supported by DSE are currently the same, the code structure is just slightly different.
-
Paul Walker authored
-
Andrzej Warzynski authored
`tco` does not generate machine code, so it does not require (machine) code-gen related dependencies. Differential Revision: https://reviews.llvm.org/D118112
-
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.
-