https://github.com/kuhar approved this pull request.
LGTM % formatting
https://github.com/llvm/llvm-project/pull/131460
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-
https://github.com/kuhar commented:
Since this essentially breaks logic for gfx940 and gfx941, should we assert in
code like `Chipset` that these are not used and silently miscompiled?
https://github.com/llvm/llvm-project/pull/125836
___
llvm-branch-c
https://github.com/kuhar approved this pull request.
Nice!
https://github.com/llvm/llvm-project/pull/123326
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -147,6 +148,22 @@ class SmallSet {
using const_iterator = SmallSetIterator;
SmallSet() = default;
+ SmallSet(const SmallSet &) = default;
+ SmallSet(SmallSet &&) = default;
+
+ template SmallSet(IterT Begin, IterT End) {
+insert(Begin, End);
+ }
+
+ template
https://github.com/kuhar approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/108601
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/kuhar edited https://github.com/llvm/llvm-project/pull/108601
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -17,6 +17,66 @@
using namespace llvm;
+TEST(SmallSetTest, ConstructorIteratorPair) {
+ auto L = {1, 2, 3, 4, 5};
+ SmallSet S(std::begin(L), std::end(L));
+ for (int Value : L)
+EXPECT_TRUE(S.contains(Value));
kuhar wrote:
You can also do `EXPECT_T
@@ -147,6 +148,22 @@ class SmallSet {
using const_iterator = SmallSetIterator;
SmallSet() = default;
+ SmallSet(const SmallSet &) = default;
+ SmallSet(SmallSet &&) = default;
+
+ template SmallSet(IterT Begin, IterT End) {
+this->insert(Begin, End);
+ }
+
+ temp
@@ -17,6 +17,66 @@
using namespace llvm;
+TEST(SmallSetTest, ConstructorIteratorPair) {
+ auto L = {1, 2, 3, 4, 5};
kuhar wrote:
Could you make the type explicit, both here and everywhere else below. Either
initializer list or some other vector type is fin
https://github.com/kuhar approved this pull request.
https://github.com/llvm/llvm-project/pull/108590
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -234,19 +225,12 @@ class SmallSet {
/// Check if the SmallSet contains the given element.
bool contains(const T &V) const {
if (isSmall())
- return vfind(V) != Vector.end();
-return Set.find(V) != Set.end();
+ return llvm::is_contained(Vector, V);
+
@@ -231,6 +215,31 @@ class SmallSet {
private:
bool isSmall() const { return Set.empty(); }
+
+ template
+ std::pair insertImpl(ArgType &&V) {
+static_assert(std::is_convertible_v,
+ "ArgType must be convertible to T!");
+if (!isSmall()) {
+
@@ -231,6 +215,31 @@ class SmallSet {
private:
bool isSmall() const { return Set.empty(); }
+
+ template
+ std::pair insertImpl(ArgType &&V) {
+static_assert(std::is_convertible_v,
+ "ArgType must be convertible to T!");
+if (!isSmall()) {
+
@@ -231,6 +215,31 @@ class SmallSet {
private:
bool isSmall() const { return Set.empty(); }
+
+ template
+ std::pair insertImpl(ArgType &&V) {
+static_assert(std::is_convertible_v,
+ "ArgType must be convertible to T!");
+if (!isSmall()) {
+
@@ -231,6 +215,31 @@ class SmallSet {
private:
bool isSmall() const { return Set.empty(); }
+
+ template
+ std::pair insertImpl(ArgType &&V) {
+static_assert(std::is_convertible_v,
+ "ArgType must be convertible to T!");
+if (!isSmall()) {
+
@@ -231,6 +215,31 @@ class SmallSet {
private:
bool isSmall() const { return Set.empty(); }
+
+ template
+ std::pair insertImpl(ArgType &&V) {
+static_assert(std::is_convertible_v,
+ "ArgType must be convertible to T!");
+if (!isSmall()) {
+
https://github.com/kuhar commented:
Could you add a test showing the values are forwarded?
https://github.com/llvm/llvm-project/pull/108590
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/kuhar edited https://github.com/llvm/llvm-project/pull/108590
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -206,11 +196,12 @@ class SmallSet {
bool erase(const T &V) {
if (!isSmall())
return Set.erase(V);
-for (mutable_iterator I = Vector.begin(), E = Vector.end(); I != E; ++I)
- if (*I == V) {
-Vector.erase(I);
-return true;
- }
+
+a
https://github.com/kuhar approved this pull request.
Nice
https://github.com/llvm/llvm-project/pull/108585
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/kuhar edited https://github.com/llvm/llvm-project/pull/108585
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2546,87 +2522,61 @@ static Operation *findLiveUserOfReplaced(
return nullptr;
}
-LogicalResult OperationConverter::legalizeConvertedOpResultTypes(
-ConversionPatternRewriter &rewriter,
-ConversionPatternRewriterImpl &rewriterImpl,
-DenseMap> &inverseMapping)
https://github.com/kuhar edited https://github.com/llvm/llvm-project/pull/108381
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2546,87 +2522,61 @@ static Operation *findLiveUserOfReplaced(
return nullptr;
}
-LogicalResult OperationConverter::legalizeConvertedOpResultTypes(
-ConversionPatternRewriter &rewriter,
-ConversionPatternRewriterImpl &rewriterImpl,
-DenseMap> &inverseMapping)
@@ -2459,10 +2457,42 @@ OperationConverter::finalize(ConversionPatternRewriter
&rewriter) {
return failure();
DenseMap> inverseMapping =
rewriterImpl.mapping.getInverse();
+ if (failed(legalizeConvertedOpResultTypes(rewriter, rewriterImpl,
+
https://github.com/kuhar approved this pull request.
https://github.com/llvm/llvm-project/pull/101514
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -113,8 +113,9 @@ class ValueBoundsConstraintSet {
///
/// The first parameter of the function is the shaped value/index-typed
/// value. The second parameter is the dimension in case of a shaped value.
- using StopConditionFn =
- function_ref /*dim*/)>;
+ /// Th
Author: kuhar
Date: Sun May 21 20:56:33 2017
New Revision: 303524
URL: http://llvm.org/viewvc/llvm-project?rev=303524&view=rev
Log:
[clang-tidy] Fix PR32896, PR33058: detect initializer lists in
modernize-use-empalce
Summary:
The patch is backported from: r302281 to fix the 4.0.1 release blocker
28 matches
Mail list logo