6 #include <gtest/gtest.h>
21 std::ofstream outputFile;
22 outputFile.open(fileName);
27 TEST(LoopPassThroughTests, test)
40 rm.Rvsdg().GetRootRegion(),
45 auto loop_out = loop->AddLoopVar(lambda->GetFunctionArguments()[1]);
47 auto f = lambda->finalize({ loop_out });
61 EXPECT_EQ(lambda->GetFunctionResults()[0]->origin(), lambda->GetFunctionArguments()[1]);
static jlm::util::StatisticsCollector statisticsCollector
static void stringToFile(std::string output, std::string fileName)
TEST(LoopPassThroughTests, test)
std::string run(llvm::LlvmRvsdgModule &rm)
static LoopNode * create(rvsdg::Region *parent, bool init=true)
static void CreateAndRun(rvsdg::RvsdgModule &rvsdgModule, util::StatisticsCollector &statisticsCollector)
static std::unique_ptr< LlvmLambdaOperation > Create(std::shared_ptr< const jlm::rvsdg::FunctionType > type, std::string name, const jlm::llvm::Linkage &linkage, jlm::llvm::CallingConvention callingConvention, jlm::llvm::AttributeSet attributes)
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
static std::shared_ptr< const FunctionType > Create(std::vector< std::shared_ptr< const jlm::rvsdg::Type >> argumentTypes, std::vector< std::shared_ptr< const jlm::rvsdg::Type >> resultTypes)
static GraphExport & Create(Output &origin, std::string name)
static LambdaNode * Create(rvsdg::Region &parent, std::unique_ptr< LambdaOperation > operation)
std::string view(const rvsdg::Region *region)