- May 03, 2020
-
-
LemonBoy authored
The two code paths have the same goal, legalizing a load of a non-byte-sized vector by loading the "flattened" representation in memory, slicing off each single element and then building a vector out of those pieces. The technique employed by `ExpandLoad` is slightly more convoluted and produces slightly better codegen on ARM, AMDGPU and x86 but suffers from some bugs (D78480) and is wrong for BE machines. Differential Revision: https://reviews.llvm.org/D79096
-
Reid Kleckner authored
Otherwise an ArgumentParser is constructed for every directive section, and that involves copying the entire table of options into a vector. There is no need for this, just have one option table.
-
Thomas Preud'homme authored
Summary: Lld test ELF/linkerscript/thunk-gen-mips.s was accidentally disabled due to the use of wrong FileCheck directives. As a result the test seems to have bitrotted as it fails to pass if fixing the directive. To ease updates to the test in case of change of the __start address the checks have been changed to use numeric variables to express all the addresses based on the __start address. Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D79270
-
Milian Wolff authored
This makes the previously unaccessible AST nodes for C++17 "if with init statements" accessible to consumers of libclang. Differential Revision: https://reviews.llvm.org/D78214
-
Milian Wolff authored
This makes the BindingDecl accessible to consumers of libclang as CXCursor_UnexposedDecl where previously these AST nodes were not visited at all from the libclang API. Differential Revision: https://reviews.llvm.org/D78213
-
River Riddle authored
This is useful for several reasons: * In some situations the user can guarantee that thread-safety isn't necessary and don't want to pay the cost of synchronization, e.g., when parsing a very large module. * For things like logging threading is not desirable as the output is not guaranteed to be in stable order. This flag also subsumes the pass manager flag for multi-threading. Differential Revision: https://reviews.llvm.org/D79266
-
Simon Pilgrim authored
Causing buildbot failures
-
Simon Pilgrim authored
rL368553 added SimplifyMultipleUseDemandedBits handling for ISD::TRUNCATE to SimplifyDemandedBits so we don't need to duplicate this (and it gets rid of another GetDemandedBits call which is slowly being replaced with SimplifyMultipleUseDemandedBits anyhow).
-
mydeveloperday authored
Summary: Unable to build sema library on MSVC with Debug target ``` C:\clang\llvm-project\clang\lib\Sema\SemaOpenMP.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj ``` Reviewed By: aaron.ballman Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79292
-
Benjamin Kramer authored
std::pair has a trivial copy ctor, std::tuple doesn't.
-
Nico Weber authored
The failures only happened in fully clean builds. Also put all current dependencies of LibraryDependencies.inc in the build graph, so that this type of thing will cause a failure in incremental builds next time as well.
-
Reid Kleckner authored
This generalizes the main Windows command line tokenizer to be able to produce StringRef substrings as well as freshly copied C strings. The implementation is still shared with the normal tokenizer, which is important, because we have unit tests for that. .drective sections can be very long. They can potentially list up to every symbol in the object file by name. It is worth avoiding these string copies. This saves a lot of memory when linking chrome.dll with PGO instrumentation: BEFORE AFTER % IMP peak memory: 6657.76MB 4983.54MB -25% real: 4m30.875s 2m26.250s -46% The time improvement may not be real, my machine was noisy while running this, but that the peak memory usage improvement should be real. This change may also help apps that heavily use dllexport annotations, because those also use linker directives in object files. Apps that do not use many directives are unlikely to be affected. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D79262 -
Benjamin Kramer authored
We don't require the type to be trivially assignable. While the standard says that only is_trivially_copyable types may be memcpy'd, this seems overly strict. We never assign the type, so there's no way for the type to observe that the copy/move construction got elided. This is important for std::pair<POD, POD>, which is not trivially assignable and probably never will be because changing that would break ABI. As a side-effect this no longer allows types with deleted copy/move constructors in SmallVector. That's an unintended side-effect of is_trivially_copyable anyways. Shrinks Release+Asserts clang by 20k.
-
Benjamin Kramer authored
This seems to be working by accident.
-
- May 02, 2020
-
-
Benjamin Kramer authored
These allocations are so tiny that the buffer can be grown in-place most of the time.
-
mydeveloperday authored
Summary: Ensure the clang-format unit tests are themselves clang-formatted Having areas of the llvm code which are clang-format clean, give us more areas to run new clang-format binaries on ensuring we haven't broken anything. It seems to me we SHOULD have this clang-formatted at a minimum, otherwise how can we expect others to use clang-format if we "don't eat our own dogfood", also if the tests are dependent on the formatting of the code then that would also be bad! Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D79204
-
Benjamin Kramer authored
This lets it use sized deallocation and make more efficient alignment decisions. Also adjust BumpPtrAllocator to always allocate at alignof(std::max_align_t).
-
Sam Elliott authored
Summary: The current lowering of `select` on RISC-V uses a branch instruction to load a register with one or other value. This is inefficient, especially in the case of small constants that can be computed easily. By implementing the TargetLowering::convertSelectOfConstantsToMath hook, some of the simpler cases are covered that let us avoid introducing a branch in these cases. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D79260
-
Sam Elliott authored
Summary: This just adds some simple cases for testing select of constants. There will be a follow-up patch that improves code generation in some of these cases. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D79259
-
Sam Elliott authored
Summary: This patch addresses some weird assembly sequences we were seeing during comparing floats. In particular, comparing a float to itself tells you whether it is NaN or not, which we were doing correctly, but with an extra unneeded `and` instruction. This patch specialises the existing patterns to remove the `and` instructions when both their operands are the same. Reviewed By: luismarques, asb Differential Revision: https://reviews.llvm.org/D78908
-
Sam Elliott authored
Summary: I worked on adding some SelectionDag patterns to address code generated by these examples, which came out of some differential testing against GCC. The pattern additions will be in a follow-up patch. Reviewers: luismarques, asb Reviewed By: luismarques, asb Differential Revision: https://reviews.llvm.org/D78907
-
Sam McCall authored
I've left out some cases where I wasn't totally sure this was right or whether the include was ok (compiler-rt) or idiomatic (flang).
-
Sam McCall authored
Use this in clangd, will follow up with replacements for isspace where locale-dependent is clearly not intended.
-
LLVM GN Syncbot authored
-
Sam McCall authored
-
Sam McCall authored
Summary: Old model: chunks are always separated by one space. This makes it impossible to render "Foo `bar`." correctly. New model: chunks are separated by space if the left had trailing space, or the right had leading space, or space was explicitly requested. (Only leading/trailing space in plaintext chunks count, not code) Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79139 -
Tamás Zolnai authored
Summary: To cover STR34-C rule's second use case, where ``signed char`` is used for array subscript after an integer conversion. In the case of non-ASCII character this conversion will result in a value in excess of UCHAR_MAX. There is another clang-tidy check which catches these cases. cppcoreguidelines-pro-bounds-constant-array-index catches any indexing which is not integer constant. I think this check is very strict about the index (e.g. constant), so it's still useful to cover the ``signed char`` use case in this check, so we can provide a way to catch the SEI cert rule's use cases on a codebase, where this CPP guideline is not used. Reviewers: aaron.ballman, njames93 Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D78904
-
Marek Kurdej authored
Summary: This patch adds return type to std::erase and std::erase_if functions. Also: * Update __cpp_lib_erase_if to 202002L. * Fix synopsis in unordered_map. * Fix generate_feature_test_macro_components.py script. Reviewers: EricWF, mclow.lists, ldionne, #libc Reviewed By: ldionne, #libc Subscribers: broadwaylamb, zoecarver, dexonsmith, ldionne, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D75905
-
Nikita Popov authored
Don't compute known bits of all GEP operands, if we already know that we don't know anything.
-
Nikita Popov authored
getNumUses() scans the full use list. Don't use it is we only want to check if there's zero or one uses.
-
Nikita Popov authored
When the shufflevector mask operand was converted into special instruction data, the FunctionComparator was not updated to account for this. As such, MergeFuncs will happily merge shufflevectors with different masks. This fixes https://bugs.llvm.org/show_bug.cgi?id=45773. Differential Revision: https://reviews.llvm.org/D79261
-
Xing GUO authored
Summary: In D77860, we have changed `getSymbolFlags()` return type to `Expected<uint32_t>`. This change helps bubble the error further up the stack. Reviewers: jhenderson, grimar, JDevlieghere, MaskRay Reviewed By: jhenderson Subscribers: hiraditya, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79075
-
Stephen Neuendorffer authored
Prior change introduces this target, but we need it for out-of-tree users too
-
Michael Liao authored
-
Stephen Neuendorffer authored
In cmake, dependencies on generated files require some sophistication in the build system. At build time, files are parsed to determine which headers they depend on and these dependencies are injected into the build system. This works well with ninja, but has some constraints with the makefile generator. According to the cmake documentation, this only works reliably within the same directory. This patch expands the usage of mlir-headers to include all generated headers and adds an mlir-generic-headers target which triggers generation of dialect-independent headers. These targets are used to express dependencies on generated headers. This is mostly handled in AddMLIR.cmake and only a few CMakeLists.txt files need to change. Differential Revision: https://reviews.llvm.org/D79242
-
Stephen Neuendorffer authored
These libraries are distinct from other things in Analysis in that they operate only on core IR concepts. This also simplifies dependencies so that Dialect -> Analysis -> Parser -> IR. Previously, the parser depended on portions of the the Analysis directory as well, which sometimes caused issues with the way the cmake makefile generator discovers dependencies on generated files during compilation. Differential Revision: https://reviews.llvm.org/D79240
-
River Riddle authored
-
Craig Topper authored
[CostModel][X86][ARM] Teach default implementation of getCastInstrCost to not add a split/join cost if source type and the destination type both have a SplitVector action If both the source and the destination need to be split then the two halves of the split operation are completely independent and don't need to be split or joined. So we don't need to assess a cost for the split or join. Differential Revision: https://reviews.llvm.org/D79111
-
Craig Topper authored
I think some copy/pasting was used to create loops of different VFs. But the increment of the induction variable wasn't updated to match the VF. This has no effect on the pattern matching we're testing, it just helps the test make sense to the reader.
-
Alexander Shaposhnikov authored
N_PEXT bit should not affect whether a symbol is considered to be external or not. This also fixes the construction of the symbol table since it relies on the correct ordering of symbols. Test plan: make check-all Differential revision: https://reviews.llvm.org/D78888
-