X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FWebAssembly%2FRelooper.h;h=7c564de82f3436f5ea983b4b4d5c846f2d8a9970;hb=454061bf3aeba2ac0b7b5dadb4f07e497139609f;hp=d15d2153996d725829b5d61e4e99f8f8f934bac6;hpb=c37a088af25be6ff5950d592eca6f6213cd5d0e8;p=oota-llvm.git diff --git a/lib/Target/WebAssembly/Relooper.h b/lib/Target/WebAssembly/Relooper.h index d15d2153996..7c564de82f3 100644 --- a/lib/Target/WebAssembly/Relooper.h +++ b/lib/Target/WebAssembly/Relooper.h @@ -14,13 +14,13 @@ /// //===-------------------------------------------------------------------===// -#include -#include -#include +#include "llvm/ADT/MapVector.h" +#include "llvm/ADT/SetVector.h" +#include "llvm/Support/Casting.h" #include -#include #include +#include #include #include #include @@ -181,34 +181,6 @@ struct LoopShape : public LabeledShape { static bool classof(const Shape *S) { return S->getKind() == SK_Loop; } }; -/// -/// Implements the relooper algorithm for a function's blocks. -/// -/// Implementation details: The Relooper instance has -/// ownership of the blocks and shapes, and frees them when done. -/// -struct Relooper { - std::deque Blocks; - std::deque Shapes; - Shape *Root; - bool MinSize; - int BlockIdCounter; - int ShapeIdCounter; - - Relooper(); - ~Relooper(); - - void AddBlock(Block *New, int Id = -1); - - // Calculates the shapes - void Calculate(Block *Entry); - - // Sets us to try to minimize size - void SetMinSize(bool MinSize_) { MinSize = MinSize_; } -}; - -typedef MapVector BlockBlockSetMap; - } // namespace Relooper } // namespace llvm