6 #include <gtest/gtest.h>
13 TEST(ControLFlowGraphPurgeTests, test)
23 auto op = std::make_unique<jlm::rvsdg::ControlConstantOperation>(
29 bb0->add_outedge(bb1);
30 bb0->add_outedge(cfg.
exit());
31 bb1->add_outedge(bb1);
37 EXPECT_EQ(cfg.
nnodes(), 2u);
TEST(ControLFlowGraphPurgeTests, test)
static BasicBlock * create(ControlFlowGraph &cfg)
static std::unique_ptr< llvm::ThreeAddressCode > create(size_t nalternatives, const Variable *operand)
void divert_inedges(llvm::ControlFlowGraphNode *new_successor)
static std::string ToAscii(const ControlFlowGraph &controlFlowGraph)
ExitNode * exit() const noexcept
size_t nnodes() const noexcept
static std::unique_ptr< llvm::ThreeAddressCode > create(std::unique_ptr< rvsdg::SimpleOperation > operation, const std::vector< const Variable * > &operands)
Global memory state passed between functions.
void purge(ControlFlowGraph &cfg)
Remove all basic blocks without instructions.