https://github.com/sam-mccall closed
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/martinboehme resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall updated
https://github.com/llvm/llvm-project/pull/66424
>From 35b33561af918fc2e13af9de18af6b181535ce49 Mon Sep 17 00:00:00 2001
From: Sam McCall
Date: Thu, 14 Sep 2023 21:36:50 +0200
Subject: [PATCH 1/3] [dataflow] Parse formulas from text
My immediate use for thi
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall updated
https://github.com/llvm/llvm-project/pull/66424
>From 35b33561af918fc2e13af9de18af6b181535ce49 Mon Sep 17 00:00:00 2001
From: Sam McCall
Date: Thu, 14 Sep 2023 21:36:50 +0200
Subject: [PATCH 1/2] [dataflow] Parse formulas from text
My immediate use for thi
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
+ EatWhitespace();
+
+ if (In.consume_front("!")) {
+if
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
+ EatWhitespace();
+
+ if (In.consume_front("!")) {
+if
@@ -258,114 +276,71 @@ TEST(SolverTest, IffWithUnits) {
}
TEST(SolverTest, IffWithUnitsConflict) {
- ConstraintContext Ctx;
- auto X = Ctx.atom();
- auto Y = Ctx.atom();
- auto XEqY = Ctx.iff(X, Y);
- auto NotY = Ctx.neg(Y);
-
- // (X <=> Y) ^ X !Y
- EXPECT_THAT(solve(
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
sam-mccall wrote:
Renamed, hard to know if
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -87,6 +87,9 @@ class alignas(const Formula *) Formula {
ArrayRef Operands,
unsigned Value = 0);
+ // Parse Formulas using Arena rather than caling this function directly.
+ static Formula *parse(llvm::BumpPtrAllocator &All
https://github.com/sam-mccall resolved
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
+ EatWhitespace();
+
+ if (In.consume_front("!")) {
+if
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
+ EatWhitespace();
+
+ if (In.consume_front("!")) {
+if
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun commented:
I think it is useful to have something like this checked in, I support this PR.
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
@@ -258,114 +276,71 @@ TEST(SolverTest, IffWithUnits) {
}
TEST(SolverTest, IffWithUnitsConflict) {
- ConstraintContext Ctx;
- auto X = Ctx.atom();
- auto Y = Ctx.atom();
- auto XEqY = Ctx.iff(X, Y);
- auto NotY = Ctx.neg(Y);
-
- // (X <=> Y) ^ X !Y
- EXPECT_THAT(solve(
@@ -87,6 +87,9 @@ class alignas(const Formula *) Formula {
ArrayRef Operands,
unsigned Value = 0);
+ // Parse Formulas using Arena rather than caling this function directly.
+ static Formula *parse(llvm::BumpPtrAllocator &All
@@ -13,6 +13,7 @@
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ErrorHandling.h"
#include
+#include
martinboehme wrote:
Inadvertent change? (There are no other changes in this file.)
https://github.com/llvm/llvm-project/pull/66424
_
@@ -87,6 +87,9 @@ class alignas(const Formula *) Formula {
ArrayRef Operands,
unsigned Value = 0);
+ // Parse Formulas using Arena rather than caling this function directly.
martinboehme wrote:
```suggestion
@@ -137,5 +140,46 @@ TEST_F(ArenaTest, Interning) {
EXPECT_EQ(&B1.formula(), &F1);
}
+TEST_F(ArenaTest, Parse) {
martinboehme wrote:
```suggestion
TEST_F(ArenaTest, ParseFormula) {
```
Matches name of the function, and we might conceivably add other parsin
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
martinboehme wrote:
```suggestion
auto Ea
@@ -95,4 +98,94 @@ BoolValue &Arena::makeBoolValue(const Formula &F) {
return *It->second;
}
+namespace {
+const Formula *parse(Arena &A, llvm::StringRef &In) {
+ auto EatWhitespace = [&] { In = In.ltrim(' '); };
+ EatWhitespace();
+
+ if (In.consume_front("!")) {
+if
https://github.com/martinboehme approved this pull request.
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/martinboehme edited
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ymand approved this pull request.
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -87,6 +87,9 @@ class alignas(const Formula *) Formula {
ArrayRef Operands,
unsigned Value = 0);
+ // Parse Formulas using Arena rather than caling this function directly.
ymand wrote:
nit: Maybe prefix wit
https://github.com/ymand edited https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sam-mccall wrote:
Not sure if this is really important to have checked in, but I've wanted to
investigate/reproduce flow condition slowness a few times now, so thought I
should send the patch in case others think it's useful.
https://github.com/llvm/llvm-project/pull/66424
https://github.com/sam-mccall review_requested
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall review_requested
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-analysis
Changes
My immediate use for this is not in checked-in code, but rather the
ability to plug printed flow conditions (from analysis logs) back into
sat solver unittests to reproduce slowness.
It does allow simplifying some of the
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvmbot labeled
https://github.com/llvm/llvm-project/pull/66424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sam-mccall created
https://github.com/llvm/llvm-project/pull/66424:
My immediate use for this is not in checked-in code, but rather the
ability to plug printed flow conditions (from analysis logs) back into
sat solver unittests to reproduce slowness.
It does allow simplifying
42 matches
Mail list logo