KKazu Hirata[ADT] Deprecate Optional::getValueOr (NFC)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Fixed Point] Fix C++20 compilation error Due to how operator== changed after operator<=> landing in C++20 (error: use of overloaded operator '==' is ambiguous (with operand types 'const llvm::APSInt' and 'const unsigned long')), CheckIntPartMin/CheckIntPartMax interfaces are now leveraging APSInt::compareValues. Differential Revision: https://reviews.llvm.org/D129567 | 4 年前 | |
[APFloat] Fix truncation of certain subnormal numbers Certain subnormals would be incorrectly rounded away from zero. Fixes #55838 Differential Revision: https://reviews.llvm.org/D127140 | 4 年前 | |
[ISel] Match all bits when merge undefs for DAG combine Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D128570 | 4 年前 | |
ADT: Fix that APSInt's string constructor claims it requires 5 bits to store a zero Summary: When constructing an APSInt from a string, the constructor doesn't correctly truncate the bit width of the result if the passed in string was "0" (or any alternative way to express 0 like "-0" or "000"). Instead of 1 (which is the smallest allowed bit width) it returns an APSInt with a bit width of 5. The reason is that the constructor checks that it never truncates the result to the invalid bit width of 0, so when it calculates that storing a "0" doesn't require any bits it just keeps the original overestimated bit width (which happens to be 5). This patch just sets the bit width of the result to 1 if the required bit width is 0. Reviewers: arphaman, dexonsmith Reviewed By: dexonsmith Subscribers: hiraditya, dexonsmith, JDevlieghere, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81329 | 6 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
ADT/ArrayRef: Add makeMutableArrayRef overloads Equivalent overloads already exist for makeArrayRef. Differential Revision: https://reviews.llvm.org/D126421 | 4 年前 | |
[Bitfields][NFC] Make sure bitfields are contiguous Differential Revision: https://reviews.llvm.org/D83202 | 6 年前 | |
[llvm][ADT] Implement BitVector::{pop_,}back LLVM Programmer’s Manual strongly discourages the use of std::vector<bool> and suggests llvm::BitVector as a possible replacement. Currently, some users of std::vector<bool> cannot switch to llvm::BitVector because it doesn't implement the pop_back() and back() functions. To enable easy transition of std::vector<bool> users, this patch implements llvm::BitVector::pop_back() and llvm::BitVector::back(). Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D117115 | 4 年前 | |
[ADT] Make BitmaskEnum operations constant expressions This avoids runtime initialization (a global constructor) whenever they appear in the initializer. The patch just adds the constexpr keyword to a couple of functions. Differential Revision: https://reviews.llvm.org/D121281 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[ADT][NFC] Early bail out for ComputeEditDistance The minimun bound for number of edits is the size difference between the 2 arrays. If MaxEditDistance is smaller than this, we can bail out early without needing to traverse any of the arrays. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D127070 | 4 年前 | |
[LiveDebugValues] Speed up removeEntryValue, NFC Summary: Instead of iterating over all VarLoc IDs in removeEntryValue(), just iterate over the interval reserved for entry value VarLocs. This changes the iteration order, hence the test update -- otherwise this is NFC. This appears to give an ~8.5x wall time speed-up for LiveDebugValues when compiling sqlite3.c 3.30.1 with a Release clang (on my machine): ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- Before: 2.5402 ( 18.8%) 0.0050 ( 0.4%) 2.5452 ( 17.3%) 2.5452 ( 17.3%) Live DEBUG_VALUE analysis After: 0.2364 ( 2.1%) 0.0034 ( 0.3%) 0.2399 ( 2.0%) 0.2398 ( 2.0%) Live DEBUG_VALUE analysis The change in removeEntryValue() is the only one that appears to affect wall time, but for consistency (and to resolve a pending TODO), I made the analogous changes for iterating over SpillLocKind VarLocs. Reviewers: nikic, aprantl, jmorse, djtodoro Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80684 | 6 年前 | |
[NFC] Move CombinationGenerator from Exegesis to ADT Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D113213 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Fix assertion in SmallDenseMap constructor with reserve from non-power-of-2 buckets count SmallDenseMap constructor with reserve gets an arbitrary NumInitBuckets value and passes it below to init method. If NumInitBuckets is greater then InlineBuckets, then SmallDenseMap initializes to large representation passing NumInitBuckets below to DenseMap initialization. DenseMap::initEmpty method asserts that initial buckets count must be a power of 2. Proposed solution is to update NumInitBuckets value in SmallDenseMap constructor till the next power of 2. It should satisfy both DenseMap preconditions and required minimum buckets count for reservation. Reviewed By: atrick Differential Revision: https://reviews.llvm.org/D129825 | 4 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[DDG] DirectedGraph as a base class for various dependence graphs such as DDG and PDG. Summary: This is an implementation of a directed graph base class with explicit representation of both nodes and edges. This implementation makes the edges explicit because we expect to assign various attributes (such as dependence type, distribution interference weight, etc) to the edges in the derived classes such as DDG and DIG. The DirectedGraph consists of a list of DGNode's. Each node consists of a (possibly empty) list of outgoing edges to other nodes in the graph. A DGEdge contains a reference to a single target node. Note that nodes do not know about their incoming edges so the DirectedGraph class provides a function to find all incoming edges to a given node. This is the first patch in a series of patches that we are planning to contribute upstream in order to implement Data Dependence Graph and Program Dependence Graph. More information about the proposed design can be found here: https://ibm.ent.box.com/v/directed-graph-and-ddg Authored By: bmahjour Reviewer: Meinersbur, myhsum hfinkel, fhahn, jdoerfert, kbarton Reviewed By: Meinersbur Subscribers: mgorny, wuzish, jsji, lebedev.ri, dexonsmith, kristina, llvm-commits, Whitney, etiotto Tag: LLVM Differential Revision: https://reviews.llvm.org/D64088 llvm-svn: 367043 | 6 年前 | |
[ADT][NFC] Early bail out for ComputeEditDistance The minimun bound for number of edits is the size difference between the 2 arrays. If MaxEditDistance is smaller than this, we can bail out early without needing to traverse any of the arrays. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D127070 | 4 年前 | |
[DDG] Data Dependence Graph - Pi Block Summary: This patch adds Pi Blocks to the DDG. A pi-block represents a group of DDG nodes that are part of a strongly-connected component of the graph. Replacing all the SCCs with pi-blocks results in an acyclic representation of the DDG. For example if we have: {a -> b}, {b -> c, d}, {c -> a} the cycle a -> b -> c -> a is abstracted into a pi-block "p" as follows: {p -> d} with "p" containing: {a -> b}, {b -> c}, {c -> a} In this implementation the edges between nodes that are part of the pi-block are preserved. The crossing edges (edges where one end of the edge is in the set of nodes belonging to an SCC and the other end is outside that set) are replaced with corresponding edges to/from the pi-block node instead. Authored By: bmahjour Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert Reviewed By: Meinersbur Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack Tag: #llvm Differential Revision: https://reviews.llvm.org/D68827 | 6 年前 | |
[adt] Fix compiler warning in test Differential Revision: https://reviews.llvm.org/D115589 | 4 年前 | |
[ADT] Add a fallible_iterator wrapper. A fallible iterator is one whose increment or decrement operations may fail. This would usually be supported by replacing the ++ and -- operators with methods that return error: class MyFallibleIterator { public: // ... Error inc(); Errro dec(); // ... }; The downside of this style is that it no longer conforms to the C++ iterator concept, and can not make use of standard algorithms and features such as range-based for loops. The fallible_iterator wrapper takes an iterator written in the style above and adapts it to (mostly) conform with the C++ iterator concept. It does this by providing standard ++ and -- operator implementations, returning any errors generated via a side channel (an Error reference passed into the wrapper at construction time), and immediately jumping the iterator to a known 'end' value upon error. It also marks the Error as checked any time an iterator is compared with a known end value and found to be inequal, allowing early exit from loops without redundant error checking*. Usage looks like: MyFallibleIterator I = ..., E = ...; Error Err = Error::success(); for (auto &Elem : make_fallible_range(I, E, Err)) { // Loop body is only entered when safe. // Early exits from loop body permitted without checking Err. if (SomeCondition) return; } if (Err) // Handle error. * Since failure causes a fallible iterator to jump to end, testing that a fallible iterator is not an end value implicitly verifies that the error is a success value, and so is equivalent to an error check. Reviewers: dblaikie, rupprecht Subscribers: mgorny, dexonsmith, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57618 llvm-svn: 353237 | 7 年前 | |
Separately track input and output denormal mode AMDGPU and x86 at least both have separate controls for whether denormal results are flushed on output, and for whether denormals are implicitly treated as 0 as an input. The current DAGCombiner use only really cares about the input treatment of denormals. | 6 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[ADT] Extend EnableIfCallable for callables with incomplete returns std::is_convertible has no defined behavior when its arguments are incomplete, even if they are equal. In practice, it returns false. Adding std::is_same allows us to use the constructor using a callable, even if the return value is incomplete. We also check the case where we convert a T into a const T. Reviewed By: DaniilSuchkov Differential Revision: https://reviews.llvm.org/D104703 Committer: Daniil Suchkov <dsuchkov@azul.com> | 4 年前 | |
[ADT] Fix accidental pointer comparison in test | 5 年前 | |
[Support] Automatically support hash_value when HashBuilder support is available. Use the HBuilder interface to provide default implementations of llvm::hash_value. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D109024 | 4 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[ADT] Notify ilist traits about in-list transfers Summary: Previously no client of ilist traits has needed to know about transfers of nodes within the same list, so as an optimization, ilist doesn't call transferNodesFromList in that case. However, now there are clients that want to use ilist traits to cache instruction ordering information to optimize dominance queries of instructions in the same basic block. This change updates the existing ilist traits users to detect in-list transfers and do nothing in that case. After this change, we can start caching instruction ordering information in LLVM IR data structures. There are two main ways to do that: - by putting an order integer into the Instruction class - by maintaining order integers in a hash table on BasicBlock I plan to implement and measure both, but I wanted to commit this change first to enable other out of tree ilist clients to implement this optimization as well. Reviewers: lattner, hfinkel, chandlerc Subscribers: hiraditya, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D57120 llvm-svn: 351992 | 7 年前 | |
[RGT] Recode more unreachable assertions and tautologies Count iterations of zero-trip loops and assert the count is zero, rather than asserting inside the loop. Unreachable functions should use llvm_unreachable. Remove tautological 'if' statements, even when they're following a pattern of checks. Found by the Rotten Green Tests project. | 5 年前 | |
[ADT] Fix for ImmutableMapRef The Root member of ImmutableMapRef was changed recently from a plain pointer to IntrusiveRefCntPtr. However, the Profile member function was not adjusted. This results in comilation error whenever the Profile method is used on an ImmutableMapRef. This patch fixes this issue and also adds unit tests for ImmutableMapRef. Differential Revision: https://reviews.llvm.org/D89486 | 5 年前 | |
[ADT] Remove ImmutableSet::foreach and ImmutableMap::foreach (NFC) These functions seem to be unused for at least 1 year. | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[ADT] Explicitly delete copy/move constructors and operator= in IntervalMap The default implementations will perform a shallow copy instead of a deep copy, causing some internal data structures to be shared between different objects. Disable these operations so they don't get accidentally used. Differential Revision: https://reviews.llvm.org/D126401 | 4 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
ADT: Fix const-correctness of iterator facade Fix the const-ness of iterator_facade_base::operator-> and iterator_facade_base::operator[]. This is a follow-up to 1b651be0465de70cfa22ce4f715d3501a4dcffc1, which fixed const-ness of various iterator adaptors. Iterators, like the pointers that they generalize, have two types of const. - The const qualifier on members indicates whether the iterator itself can be changed. This is analagous to int *const. - The const qualifier on return values of operator*(), operator[](), and operator->() controls whether the the pointed-to value can be changed. This is analogous to const int*. If an iterator facade returns a handle to its own state, then T (and PointerT and ReferenceT) should usually be const-qualified. Otherwise, if clients are expected to modify the state itself, the field can be declared mutable or a const_cast can be used. | 4 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
[mlir] Optimize usage of llvm::mapped_iterator mapped_iterator is a useful abstraction for applying a map function over an existing iterator, but our current usage ends up allocating storage/making indirect calls even with the map function is a known function, which is horribly inefficient. This commit refactors the usage of mapped_iterator to avoid this, and allows for directly referencing the map function when dereferencing. Fixes PR52319 Differential Revision: https://reviews.llvm.org/D113511 | 4 年前 | |
[ADT] Deprecate Optional::getValueOr (NFC) This patch deprecates getValueOr in favor of value_or. Differential Revision: https://reviews.llvm.org/D130140 | 3 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
PointerLikeTypeTraits: Standardize NumLowBitsAvailable on static constexpr rather than anonymous enum This is (more?) usable by GDB pretty printers and seems nicer to write. There's one tricky caveat that in C++14 (LLVM's codebase today) the static constexpr member declaration is not a definition - so odr use of this constant requires an out of line definition, which won't be provided (that'd make all these trait classes more annoyidng/expensive to maintain). But the use of this constant in the library implementation is/should always be in a non-odr context - only two unit tests needed to be touched to cope with this/avoid odr using these constants. Based on/expanded from D72590 by Christian Sigg. | 6 年前 | |
Switch from llvm::is_trivially_copyable to std::is_trivially_copyable GCC<5 did not support std::is_trivially_copyable. Now LLVM builds require 5.1 we can migrate to std::is_trivially_copyable. The Optional.h change made MSVC choke (https://buildkite.com/llvm-project/premerge-checks/builds/18587#cd1bb616-ffdc-4581-9795-b42c284196de) so I leave it out for now. Differential Revision: https://reviews.llvm.org/D92514 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[PointerUnionTest] Fix an incorrectly written test The test being change appears to have been intended to exercise PointerUnion, but what it actually did was cast<> a double to a double*. This only worked because cast<> was missing the required assertion. Adding the assertion reveals a template error where isa<const double*>(double) fails to compile. | 4 年前 | |
[ADT] Update RPOT to work with specializations of different types. At the moment, ReversePostOrderTraversal performs a post-order walk on the entry node of the passed in graph, rather than the graph type itself. If GT::NodeRef is the same as GraphT, everything works as expected and this is the case for the current uses in-tree. But it does not work as expected if GraphT != GT::NodeRef. In that case, we either fail to build (if there is no GraphTrait specialization for GT:NodeRef) or we pick the GraphTrait specialization for GT::NodeRef, instead of the specialization of GraphT. Both the depth-first and post-order iterators pick the expected specalization and this patch updates ReversePostOrderTraversal to delegate to po_begin & po_end to pick the right specialization, rather than forcing using GraphTraits<GT::NodeRef>, by first getting the entry node. This makes ReversePostOrderTraversal<Graph<6>> RPOT(G); build and work as expected in the test. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D100169 | 5 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Fix warnings when -Wdeprecated-enum-enum-conversion is enabled clang may throw the following warning: include/clang/AST/DeclarationName.h:210:52: error: arithmetic between different enumeration types ('clang::DeclarationName::StoredNameKind' and 'clang::detail::DeclarationNameExtra::ExtraKind') is deprecated when flags -Werror,-Wdeprecated-enum-enum-conversion are on. This adds the addEnumValues() helper function to STLExtras.h to hide the details of adding enumeration values together from two different enumerations. | 4 年前 | |
Put back the trailing commas on TYPED_TEST_SUITE This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also https://github.com/google/googletest/issues/2271 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Move STLFunctionalExtras out of STLExtras Only using that change in StringRef already decreases the number of preoprocessed lines from 7837621 to 7776151 for LLVMSupport Perhaps more interestingly, it shows that many files were relying on the inclusion of StringRef.h to have the declaration from STLExtras.h. This patch tries hard to patch relevant part of llvm-project impacted by this hidden dependency removal. Potential impact: - "llvm/ADT/StringRef.h" no longer includes <memory>, "llvm/ADT/Optional.h" nor "llvm/ADT/STLExtras.h" Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831 | 4 年前 | |
[llvm] Add contains(KeyType) -> bool methods to SetVector Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449 | 5 年前 | |
Move STLFunctionalExtras out of STLExtras Only using that change in StringRef already decreases the number of preoprocessed lines from 7837621 to 7776151 for LLVMSupport Perhaps more interestingly, it shows that many files were relying on the inclusion of StringRef.h to have the declaration from STLExtras.h. This patch tries hard to patch relevant part of llvm-project impacted by this hidden dependency removal. Potential impact: - "llvm/ADT/StringRef.h" no longer includes <memory>, "llvm/ADT/Optional.h" nor "llvm/ADT/STLExtras.h" Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831 | 4 年前 | |
Use the range-based overload of llvm::sort where possible Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D130403 | 4 年前 | |
Use llvm::sort instead of std::sort where possible llvm::sort is beneficial even when we use the iterator-based overload, since it can optionally shuffle the elements (to detect non-determinism). However llvm::sort is not usable everywhere, for example, in compiler-rt. Reviewed By: nhaehnle Differential Revision: https://reviews.llvm.org/D130406 | 4 年前 | |
[llvm] Rename StringRef _lower() method calls to _insensitive() This is a mechanical change. This actually also renames the similarly named methods in the SmallString class, however these methods don't seem to be used outside of the llvm subproject, so this doesn't break building of the rest of the monorepo. | 5 年前 | |
Add missing comparison operators to SmallVector Differential Revision: https://reviews.llvm.org/D124407 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[llvm] Add contains(KeyType) -> bool methods to SparseSet Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449 | 5 年前 | |
[llvm] Use has_value instead of hasValue (NFC) | 4 年前 | |
[ADT] support fixed-width output with utohexstr Will use it to output a hash value that needs fixed-width. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D118427 | 4 年前 | |
[ADT] Use Empty Base Optimization for Allocators In D94439, BumpPtrAllocator changed its implementation to use an empty base optimization for the underlying allocator. This patch builds on that by extending its functionality to more classes as well as enabling the underlying allocator to be a reference type, something not currently possible as you can't derive from a reference. The main place this sees use is in StringMaps which often use the default MallocAllocator, yet have to pay the size of a pointer for no reason. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D129206 | 4 年前 | |
[ADT] Add edit_distance_insensitive to StringRef In some instances its advantageous to calculate edit distances without worrying about casing. Currently to achieve this both strings need to be converted to the same case first, then edit distance can be calculated. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D126159 | 4 年前 | |
Move STLFunctionalExtras out of STLExtras Only using that change in StringRef already decreases the number of preoprocessed lines from 7837621 to 7776151 for LLVMSupport Perhaps more interestingly, it shows that many files were relying on the inclusion of StringRef.h to have the declaration from STLExtras.h. This patch tries hard to patch relevant part of llvm-project impacted by this hidden dependency removal. Potential impact: - "llvm/ADT/StringRef.h" no longer includes <memory>, "llvm/ADT/Optional.h" nor "llvm/ADT/STLExtras.h" Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[ADT] Fixed -Wdeprecated-copy warning. NFCI | 6 年前 | |
Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" This reverts commit ef8206320769ad31422a803a0d6de6077fd231d2. - It conflicts with the existing llvm::size in STLExtras, which will now never be called. - Calling it without llvm:: breaks C++17 compat | 4 年前 | |
[SPIR-V] Allow setting SPIR-V version via target triple. Currently added versions are from v1.0 to v1.5, other versions can be added as needed. This change also adds documentation about SPIR-V target support in LLVM. Differential Revision: https://reviews.llvm.org/D124776 | 4 年前 | |
Consolidate string types into ptr and length representations. After rGbbbc4f110e35ac709b943efaa1c4c99ec073da30, we can move any string type that has convenient pointer and length fields into the PtrAndLengthKind, reducing the amount of code. Differential Revision: https://reviews.llvm.org/D106381 | 4 年前 | |
[mlir] Add support for walking locations similarly to Operations This allows for walking all nested locations of a given location, and is generally useful when processing locations. Differential Revision: https://reviews.llvm.org/D100437 | 5 年前 | |
[mlir][NFC] Remove the STLExtras.h header file now that it has been merged into LLVM. Now that no more utilities exist within, this file can be deleted. Differential Revision: https://reviews.llvm.org/D78079 | 6 年前 |