aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-10 07:28:25 +0000
committerChris Lattner <sabre@nondot.org>2001-11-10 07:28:25 +0000
commit7546c21ae10204dee71d2186e6698a3c8dda68cb (patch)
tree2c77d5ed78a3822e6b6c19b72ba2a26aa07bc6c5 /include
parent2ac03f488bb2f1caec96e8122cb9b89cfd435400 (diff)
downloadexternal_llvm-7546c21ae10204dee71d2186e6698a3c8dda68cb.zip
external_llvm-7546c21ae10204dee71d2186e6698a3c8dda68cb.tar.gz
external_llvm-7546c21ae10204dee71d2186e6698a3c8dda68cb.tar.bz2
Initail checking of structure swapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Transforms/IPO/SimpleStructMutation.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/llvm/Transforms/IPO/SimpleStructMutation.h b/include/llvm/Transforms/IPO/SimpleStructMutation.h
new file mode 100644
index 0000000..62da418
--- /dev/null
+++ b/include/llvm/Transforms/IPO/SimpleStructMutation.h
@@ -0,0 +1,35 @@
+//===- llvm/Transforms/SwapStructContents.h - Permute Structs ----*- C++ -*--=//
+//
+// This pass does a simple transformation that swaps all of the elements of the
+// struct types in the program around.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TRANSFORMS_SWAPSTRUCTCONTENTS_H
+#define LLVM_TRANSFORMS_SWAPSTRUCTCONTENTS_H
+
+#include "llvm/Pass.h"
+
+class SwapStructContents : public Pass {
+ Pass *StructMutator;
+public:
+ // doPassInitialization - Figure out what transformation to do
+ //
+ bool doPassInitialization(Module *M);
+
+ // doPerMethodWork - Virtual method overriden by subclasses to do the
+ // per-method processing of the pass.
+ //
+ virtual bool doPerMethodWork(Method *M) {
+ return StructMutator->doPerMethodWork(M);
+ }
+
+ // doPassFinalization - Forward to our worker.
+ //
+ virtual bool doPassFinalization(Module *M) {
+ return StructMutator->doPassFinalization(M);
+ }
+
+};
+
+#endif