Jlm
Classes | Namespaces | Functions
ControlFlowRestructuring.cpp File Reference
#include <jlm/llvm/ir/basic-block.hpp>
#include <jlm/llvm/ir/cfg-structure.hpp>
#include <jlm/llvm/ir/operators/operators.hpp>
#include <deque>
#include <unordered_map>
Include dependency graph for ControlFlowRestructuring.cpp:

Go to the source code of this file.

Classes

struct  jlm::llvm::TailControlledLoop
 
struct  jlm::llvm::Continuation
 

Namespaces

 jlm
 
 jlm::llvm
 Global memory state passed between functions.
 

Functions

static TailControlledLoop jlm::llvm::ExtractLoop (ControlFlowGraphNode &loopEntry, ControlFlowGraphNode &loopExit)
 
static void jlm::llvm::ReinsertLoop (const TailControlledLoop &loop)
 
static const ThreeAddressCodeVariable * jlm::llvm::CreateContinuationVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariable & jlm::llvm::CreateLoopExitVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariable & jlm::llvm::CreateLoopEntryVariable (BasicBlock &bb, std::shared_ptr< const rvsdg::ControlType > type)
 
static const ThreeAddressCodeVariable & jlm::llvm::CreateLoopRepetitionVariable (BasicBlock &basicBlock)
 
static void jlm::llvm::AppendBranch (BasicBlock &basicBlock, const Variable *operand)
 
static void jlm::llvm::AppendConstantAssignment (BasicBlock &basicBlock, const ThreeAddressCodeVariable &variable, const size_t value)
 
static void jlm::llvm::RestructureLoopEntry (const StronglyConnectedComponentStructure &sccStructure, BasicBlock *newEntryNode, const ThreeAddressCodeVariable *entryVariable)
 
static void jlm::llvm::RestructureLoopExit (const StronglyConnectedComponentStructure &sccStructure, BasicBlock &newRepetitionNode, BasicBlock &newExitNode, ControlFlowGraphNode &regionExit, const ThreeAddressCodeVariable &repetitionVariable, const ThreeAddressCodeVariable *exitVariable)
 
static void jlm::llvm::RestructureLoopRepetition (const StronglyConnectedComponentStructure &sccStructure, ControlFlowGraphNode &newRepetitionNode, const ThreeAddressCodeVariable *entryVariable, const ThreeAddressCodeVariable &repetitionVariable)
 
static BasicBlock * jlm::llvm::GetEntryVariableBlock (ControlFlowGraphNode *node)
 
static void jlm::llvm::RestructureControlFlow (ControlFlowGraphNode &, ControlFlowGraphNode &, std::vector< TailControlledLoop > &)
 
static void jlm::llvm::RestructureLoops (ControlFlowGraphNode &regionEntry, ControlFlowGraphNode &regionExit, std::vector< TailControlledLoop > &loops)
 
static ControlFlowGraphNode & jlm::llvm::ComputeHeadBranch (ControlFlowGraphNode &start, ControlFlowGraphNode &end)
 
static util::HashSet< ControlFlowGraphNode * > jlm::llvm::ComputeDominatorGraph (const ControlFlowGraphEdge *edge)
 
static Continuation jlm::llvm::ComputeContinuation (const ControlFlowGraphNode &headBranch)
 
static void jlm::llvm::RestructureBranches (ControlFlowGraphNode &entry, ControlFlowGraphNode &exit)
 
void jlm::llvm::RestructureLoops (ControlFlowGraph &cfg)
 
void jlm::llvm::RestructureBranches (ControlFlowGraph &cfg)
 
void jlm::llvm::RestructureControlFlow (ControlFlowGraph &cfg)