summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/SetTheory.h
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-07-11 18:25:51 +0000
committerDavid Greene <greened@obbligato.org>2011-07-11 18:25:51 +0000
commitaf973b4f36b4a7f171a92d89d4a9c6156276a600 (patch)
treee05d900e5a00aa45185f9595e4bf44b7a11ac180 /llvm/utils/TableGen/SetTheory.h
parent256d39d47d27a2752cdfba97e2ecf03ec44bb5b3 (diff)
downloadbcm5719-llvm-af973b4f36b4a7f171a92d89d4a9c6156276a600.tar.gz
bcm5719-llvm-af973b4f36b4a7f171a92d89d4a9c6156276a600.zip
[AVX] Make Inits Foldable
Manage Inits in a FoldingSet. This provides several benefits: - Memory for Inits is properly managed - Duplicate Inits are folded into Flyweights, saving memory - It enforces const-correctness, protecting against certain classes of bugs The above benefits allow Inits to be used in more contexts, which in turn provides more dynamism to TableGen. This enhanced capability will be used by the AVX code generator to a fold common patterns together. llvm-svn: 134907
Diffstat (limited to 'llvm/utils/TableGen/SetTheory.h')
-rw-r--r--llvm/utils/TableGen/SetTheory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/SetTheory.h b/llvm/utils/TableGen/SetTheory.h
index e37a76ee68c..e2309b2af6f 100644
--- a/llvm/utils/TableGen/SetTheory.h
+++ b/llvm/utils/TableGen/SetTheory.h
@@ -70,7 +70,7 @@ public:
/// apply - Apply this operator to Expr's arguments and insert the result
/// in Elts.
- virtual void apply(SetTheory&, DagInit *Expr, RecSet &Elts) =0;
+ virtual void apply(SetTheory&, const DagInit *Expr, RecSet &Elts) =0;
};
/// Expander - A callback function that can transform a Record representing a
@@ -115,7 +115,7 @@ public:
void addOperator(StringRef Name, Operator*);
/// evaluate - Evaluate Expr and append the resulting set to Elts.
- void evaluate(Init *Expr, RecSet &Elts);
+ void evaluate(const Init *Expr, RecSet &Elts);
/// evaluate - Evaluate a sequence of Inits and append to Elts.
template<typename Iter>
OpenPOWER on IntegriCloud