[llvm] [SandboxIR][Pass] Implement Analyses class (PR #113962)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 16:08:01 PDT 2024
================
@@ -12,11 +12,25 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
-namespace llvm::sandboxir {
+namespace llvm {
+
+class ScalarEvolution;
+
+namespace sandboxir {
class Function;
class Region;
+class Analyses {
+ ScalarEvolution *SE = nullptr;
+
+public:
+ /// Used by unittests.
+ Analyses() = default;
----------------
aeubanks wrote:
I think this API is a bit dangerous to expose. Perhaps
```
class Analyses {
private:
Analyses() = default;
public:
Analyses(ScalarEvolution&) : SE(&SE) {}
static Analyses emptyForTesting() { return Analyses(); }
};
```
https://github.com/llvm/llvm-project/pull/113962
More information about the llvm-commits
mailing list