llvm-6502/include/llvm/Transforms/IPO/SimpleStructMutation.h
Chris Lattner 24d5c6a0cc Moved header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1509 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 07:41:55 +00:00

31 lines
872 B
C++

//===- llvm/Transforms/SimpleStructMutation.h - Permute Structs --*- C++ -*--=//
//
// This pass does is a wrapper that can do a few simple structure mutation
// transformations.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_SIMPLESTRUCTMUTATION_H
#define LLVM_TRANSFORMS_SIMPLESTRUCTMUTATION_H
#include "llvm/Transforms/IPO/MutateStructTypes.h"
class SimpleStructMutation : public MutateStructTypes {
public:
enum Transform { SwapElements, SortElements } CurrentXForm;
SimpleStructMutation(enum Transform XForm) : CurrentXForm(XForm) {}
virtual bool run(Module *M) {
setTransforms(getTransforms(M, CurrentXForm));
bool Changed = MutateStructTypes::run(M);
clearTransforms();
return Changed;
}
private:
static TransformsType getTransforms(Module *M, enum Transform);
};
#endif