- Aug 20, 2018
-
-
Sanjay Patel authored
llvm-svn: 340184
-
Raphael Isemann authored
Summary: The ASTImporter does currently not handle const_casts. This patch adds the missing const_cast importer code and the test case that discovered this. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50932 llvm-svn: 340182
-
Alexey Bataev authored
by a block. Added checks for capturing of the variable in the block when trying to emit correct address for the variable with the reference type. This extra check allows correctly identify the variables that are not captured in the block context. llvm-svn: 340181
-
Raphael Isemann authored
Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: cfe-commits, martong Differential Revision: https://reviews.llvm.org/D50928 llvm-svn: 340180
-
Raphael Isemann authored
Summary: Stream now has byte-counting functionality, so let's use this instead of manual byte counting. Reviewers: clayborg, davide Reviewed By: davide Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D50677 llvm-svn: 340179
-
Kostya Kortchinsky authored
Summary: Use `FUTEX_PRIVATE_FLAG` in conjunction with the wait & wake operations employed by `BlockingMutex`. As far as I can tell, the mutexes are process-private, and there is an actual performance benefit at employing the private operations. There should be no downside to switching to it. Reviewers: eugenis, alekseyshl, dvyukov Reviewed By: dvyukov Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D50910 llvm-svn: 340178
-
Andrea Di Biagio authored
[llvm-mca] Make the LSUnit a HardwareUnit, and allow derived classes to implement a different memory consistency model. The LSUnit is now a HardwareUnit, and it is owned by the mca::Context. Derived classes can now implement a different consistency model by overriding method `LSUnit::isReady()`. This patch also slightly refactors the Scheduler interface in the attempt to simplifying the interaction between ExecuteStage and the underlying Scheduler. llvm-svn: 340176
-
Kirill Bobyrev authored
This patch is a proof-of-concept Dex index implementation. It has several flaws, which don't allow replacing static MemIndex yet, such as: * Not being able to handle queries of small size (less than 3 symbols); a way to solve this is generating trigrams of smaller size and having such incomplete trigrams in the index structure. * Speed measurements: while manually editing files in Vim and requesting autocompletion gives an impression that the performance is at least comparable with the current static index, having actual numbers is important because we don't want to hurt the users and roll out slow code. Eric (@ioeric) suggested that we should only replace MemIndex as soon as we have the evidence that this is not a regression in terms of performance. An approach which is likely to be successful here is to wait until we have benchmark library in the LLVM core repository, which is something I have suggested in the LLVM mailing lists, received positive feedback on and started working on. I will add a dependency as soon as the suggested patch is out for a review (currently there's at least one complication which is being addressed by https://github.com/google/benchmark/pull/649). Key performance improvements for iterators are sorting by cost and the limit iterator. * Quality measurements: currently, boosting iterator and two-phase lookup stage are not implemented, without these the quality is likely to be worse than the current implementation can yield. Measuring quality is tricky, but another suggestion in the offline discussion was that the drop-in replacement should only happen after Boosting iterators implementation (and subsequent query enhancement). The proposed changes do not affect Clangd functionality or performance, `DexIndex` is only used in unit tests and not in production code. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50337 llvm-svn: 340175
-
Andrei Elovikov authored
Summary: See also http://lists.llvm.org/pipermail/cfe-users/2016-January/000854.html for the reasons why it's bad. Reviewers: Szelethus, erichkeane Reviewed By: Szelethus Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50963 llvm-svn: 340174
-
Simon Pilgrim authored
llvm-svn: 340173
-
Samuel Pitoiset authored
Some buildbot slaves reports compilation errors, but it compiled fine on my side, sorry for the breakage. llvm-svn: 340172
-
Samuel Pitoiset authored
32-bit constant address space is declared as 6, so the maximum number of address spaces is 6, not 5. Fixes "LLVM ERROR: Pointer address space out of range". v3: use static_assert() v2: add a very simple test for 32-bit addr space Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630 Signed-off-by:
Samuel Pitoiset <samuel.pitoiset@gmail.com> llvm-svn: 340171
-
Haojian Wu authored
Summary: Passing a nullptr to memcpy is UB. Reviewers: ioeric Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D50966 llvm-svn: 340170
-
Simon Pilgrim authored
Only adds support to the existing 'large element' scalar/vector to 'small element' vector bitcasts. Handle the case where the sign bit extends to only part of the small elements. llvm-svn: 340169
-
Stefan Granitz authored
llvm-svn: 340168
-
Simon Pilgrim authored
We need the signbits to extends to lower 16-bits of the even elements llvm-svn: 340167
-
Simon Pilgrim authored
[X86][SSE] Add PACKSS test showing ComputeNumSignBits failure to handle a partial sign bits extension through a bitcast llvm-svn: 340166
-
Simon Pilgrim authored
llvm-svn: 340165
-
George Rimar authored
This fixes the following warning when compiling with gcc version 8.0.1 20180319 (experimental) (GCC): /home/umb/LLVM/llvm/tools/lld/ELF/SyntheticSections.cpp:1951:46: warning: enumeral and non-enumeral type in conditional expression [-Wextra] return OS->SectionIndex >= SHN_LORESERVE ? SHN_XINDEX : OS->SectionIndex; llvm-svn: 340164
-
Victor Leschuk authored
DWARF-related classes in lib/DebugInfo/DWARF contained duplicating code for creating StringError instances, like: template <typename... Ts> static Error createError(char const *Fmt, const Ts &... Vals) { std::string Buffer; raw_string_ostream Stream(Buffer); Stream << format(Fmt, Vals...); return make_error<StringError>(Stream.str(), inconvertibleErrorCode()); } Similar function was placed in Support lib in https://reviews.llvm.org/D49824 This revision makes DWARF classes use this function instead of their local implementation of it. Reviewers: aprantl, dblaikie, probinson, wolfgangp, JDevlieghere, jhenderson Reviewed By: JDevlieghere, jhenderson Differential Revision: https://reviews.llvm.org/D49964 llvm-svn: 340163
-
Simon Pilgrim authored
llvm-svn: 340162
-
Haojian Wu authored
llvm-svn: 340161
-
Peter Smith authored
Older Arm architectures do not support the MOVT and MOVW instructions so we must use an alternative sequence of instructions to transfer control to the destination. Assuming at least Armv5 this patch adds support for Thunks that load or add to the program counter. Note that there are no Armv5 Thumb Thunks as there is no Thumb branch instruction in Armv5 that supports Thunks. These thunks will not work for Armv4t (arm7tdmi) as this architecture cannot change state from using the LDR or ADD instruction. Differential Revision: https://reviews.llvm.org/D50077 llvm-svn: 340160
-
Peter Smith authored
The Thumb BL and BLX instructions on older Arm Architectures such as v5 and v6 have a constrained encoding J1 and J2 must equal 1, later Architectures relaxed this restriction allowing J1 and J2 to be used to calculate a larger immediate. This patch adds support for the old encoding, it is used when the build attributes for the input objects only contain older architectures. Differential Revision: https://reviews.llvm.org/D50076 llvm-svn: 340159
-
Sander de Smalen authored
This patch adds system registers for controlling aspects of SVE: - ZCR_EL1 (r/w) visible at EL1 and EL0. - ZCR_EL2 (r/w) visible at EL2 and Non-secure EL1 and EL0. - ZCR_EL3 (r/w) visible at all exception levels. and a system register identifying SVE: - ID_AA64ZFR0_EL1 (r) SVE Feature identifier. Reviewers: SjoerdMeijer, samparker, pbarrio, fhahn, javed.absar Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D50885 llvm-svn: 340158
-
Kirill Bobyrev authored
Proposed changes: * Cleanup comments in `clangd/index/dex/Iterator.h`: Vim's `gq` formatting added redundant spaces instead of newlines in few places * Few comments in `OrIterator` are wrong * Use `EXPECT_TRUE(Condition)` instead of `EXPECT_THAT(Condition, true)` (same with `EXPECT_FALSE`) * Don't expose `dump()` method to the public by misplacing `private:` This patch does not affect functionality. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50956 llvm-svn: 340157
-
Haojian Wu authored
Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D50960 llvm-svn: 340156
-
Kirill Bobyrev authored
This patch introduces TRUE Iterator which efficiently handles posting lists containing all items within `[0, Size)` range. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50955 llvm-svn: 340155
-
Kirill Bobyrev authored
This patch significantly improves performance of the YAML serializer by optimizing `YAML::isNumeric` function. This function is called on the most strings and is highly inefficient for two reasons: * It uses `Regex`, which is parsed and compiled each time this function is called * It uses multiple passes which are not necessary This patch introduces stateful ad hoc YAML number parser which does not rely on `Regex`. It also fixes YAML number format inconsistency: current implementation supports C-stile octal number format (`01234567`) which was present in YAML 1.0 specialization (http://yaml.org/spec/1.0/), [Section 2.4. Tags, Example 2.19] but was deprecated and is no longer present in latest YAML 1.2 specification (http://yaml.org/spec/1.2/spec.html), see [Section 10.3.2. Tag Resolution]. Since the rest of the rest of the implementation does not support other deprecated YAML 1.0 numeric features such as sexagecimal numbers, commas as delimiters it is treated as inconsistency and not longer supported. This patch also adds unit tests to ensure the validity of proposed implementation. This performance bottleneck was identified while profiling Clangd's global-symbol-builder tool with my colleague @ilya-biryukov. The substantial part of the runtime was spent during a single-thread Reduce phase, which concludes with YAML serialization of collected symbol collection. Regex matching was accountable for approximately 45% of the whole runtime (which involves sharded Map phase), now it is reduced to 18% (which is spent in `clang::clangd::CanonicalIncludes` and can be also optimized because all used regexes are in fact either suffix matches or exact matches). `llvm-yaml-numeric-parser-fuzzer` was used to ensure the validity of the proposed regex replacement. Fuzzing for ~60 hours using 10 threads did not expose any bugs. Benchmarking `global-symbol-builder` (using `hyperfine --warmup 2 --min-runs 5 'command 1' 'command 2'`) tool by processing a reasonable amount of code (26 source files matched by `clang-tools-extra/clangd/*.cpp` with all transitive includes) confirmed our understanding of the performance bottleneck nature as it speeds up the command by the factor of 1.6x: | Command | Mean [s] | Min…Max [s] | | this patch (D50839) | 84.7 ± 0.6 | 83.3…84.7 | | master (rL339849) | 133.1 ± 0.8 | 132.4…134.6 | Using smaller samples (e.g. by collecting symbols from `clang-tools-extra/clangd/AST.cpp` only) yields even better performance improvement, which is expected because Map phase takes less time compared to Reduce and is 2.05x faster and therefore would significantly improve the performance of standalone YAML serializations. | Command | Mean [ms] | Min…Max [ms] | | this patch (D50839) | 3702.2 ± 48.7 | 3635.1…3752.3 | | master (rL339849) | 7607.6 ± 109.5 | 7533.3…7796.4 | Reviewed by: zturner, ilya-biryukov Differential revision: https://reviews.llvm.org/D50839 llvm-svn: 340154
-
Justin Bogner authored
It's clearer to use logical or for boolean values. Thanks to Steven Zhang for noticing! llvm-svn: 340153
-
Rui Ueyama authored
applyMask(0xffffffff, x) is an identity function. llvm-svn: 340152
-
Aleksandr Urakov authored
Update comment after rLLDB339994 Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 340151
-
Craig Topper authored
llvm-svn: 340150
-
QingShan Zhang authored
If the arch is P8, we will select XFLOAD to load the floating point, and then, expand it to vsx and non-vsx X-form instruction post RA. This patch is trying to convert the X-form to D-form if it meets the requirement that one operand of the x-form inst is the special Zero register, and another operand fed by add inst. i.e. y = add imm, reg LFDX. 0, y --> LFD imm(reg) Reviewers: Nemanjai Differential Revision: https://reviews.llvm.org/D49007 llvm-svn: 340149
-
whitequark authored
Add Go bindings for CoroEarly, CoroSplit, CoroElide and CoroCleanup. Differential Revision: https://reviews.llvm.org/D50951 llvm-svn: 340148
-
whitequark authored
Differential Revision: https://reviews.llvm.org/D50950 llvm-svn: 340147
-
whitequark authored
Added DIFlags in LLVMDIBuilderCreateBasicType to add optional DWARF attributes, such as DW_AT_endianity. Patch by Chirag Patel. Differential Revision: https://reviews.llvm.org/D50832 llvm-svn: 340146
-
Fangrui Song authored
llvm-svn: 340145
-
- Aug 19, 2018
-
-
Craig Topper authored
[InstCombine] Add test cases for an icmp combine that is missing support for splat vector constants. llvm-svn: 340144
-
Simon Pilgrim authored
Only adds support to the existing 'large element' scalar/vector to 'small element' vector bitcasts. The next step would be to support cases where the large elements aren't all sign bits, and determine the small element equivalent based on the demanded elements. llvm-svn: 340143
-