6 #include <gtest/gtest.h>
15 TEST(ControlFlowGraphPruneTests, test)
35 bb0->add_outedge(bb1);
36 bb1->add_outedge(cfg.
exit());
46 EXPECT_EQ(cfg.
nnodes(), 1u);
TEST(ControlFlowGraphPruneTests, test)
static std::unique_ptr< Argument > create(const std::string &name, std::shared_ptr< const jlm::rvsdg::Type > type, const AttributeSet &attributes)
static BasicBlock * create(ControlFlowGraph &cfg)
void divert_inedges(llvm::ControlFlowGraphNode *new_successor)
static std::string ToAscii(const ControlFlowGraph &controlFlowGraph)
EntryNode * entry() const noexcept
ExitNode * exit() const noexcept
size_t nnodes() const noexcept
llvm::Argument * append_argument(std::unique_ptr< llvm::Argument > arg)
void append_result(const Variable *v)
static std::unique_ptr< llvm::ThreeAddressCode > create(const std::vector< std::pair< const Variable *, ControlFlowGraphNode * >> &arguments, std::shared_ptr< const jlm::rvsdg::Type > type)
static std::unique_ptr< llvm::ThreeAddressCode > create(std::unique_ptr< rvsdg::SimpleOperation > operation, const std::vector< const Variable * > &operands)
static std::shared_ptr< const TestType > createValueType()
Global memory state passed between functions.
void prune(ControlFlowGraph &cfg)