moved to transformations

This commit is contained in:
2025-06-02 08:50:03 +03:00
parent 18b2666c0e
commit 885eb53705
4 changed files with 2727 additions and 2728 deletions

View File

@@ -188,8 +188,8 @@ set(TR_IMPLICIT_NONE src/Transformations/set_implicit_none.cpp
src/Transformations/set_implicit_none.h)
set(TR_REPLACE_ARRAYS_IN_IO src/Transformations/replace_dist_arrays_in_io.cpp
src/Transformations/replace_dist_arrays_in_io.h)
SET(SWAP_OPERATORS src/SwapOperators/swapOperators.cpp
src/SwapOperators/swapOperators.h)
SET(TR_SWAP_OPERATORS src/Transformations/SwapOperators/swap_operators.cpp
src/Transformations/SwapOperators/swap_operators.h)
set(TRANSFORMS
${TR_DEAD_CODE}
@@ -209,7 +209,8 @@ set(TRANSFORMS
${TR_CONV}
${TR_PRIV_DEL}
${TR_IMPLICIT_NONE}
${TR_REPLACE_ARRAYS_IN_IO})
${TR_REPLACE_ARRAYS_IN_IO}
${TR_SWAP_OPERATORS})
set(CFG src/CFGraph/IR.cpp
src/CFGraph/IR.h
@@ -428,8 +429,7 @@ set(SOURCE_EXE
${ZLIB}
${GR_LAYOUT}
${PR_PARAM}
${PROJ_MAN}
${SWAP_OPERATORS})
${PROJ_MAN})
add_executable(Sapfor_F ${SOURCE_EXE})
source_group (CFGraph FILES ${CFG})
@@ -455,6 +455,7 @@ source_group (Transformations\\GlobalVariables FILES ${TR_GV})
source_group (Transformations\\ConvertToC FILES ${TR_CONV})
source_group (Transformations\\SetImplicitNone FILES ${TR_IMPLICIT_NONE})
source_group (Transformations\\ReplaceArraysInIO FILES ${TR_REPLACE_ARRAYS_IN_IO})
source_group (Transformations\\SwapOperators FILES ${TR_SWAP_OPERATORS})
source_group (CreateIntervals FILES ${CREATE_INTER_T})
@@ -473,7 +474,6 @@ source_group (Utils FILES ${UTILS})
source_group (VerificationCode FILES ${VERIF})
source_group (ProjectParameters FILES ${PR_PARAM})
source_group (ProjectManipulation FILES ${PROJ_MAN})
source_group (SwapOperators FILES ${SWAP_OPERATORS})
source_group (VisualizerCalls FILES ${VS_CALLS})
source_group (VisualizerCalls\\GraphLayout FILES ${GR_LAYOUT})

View File

@@ -72,8 +72,6 @@
#include "VisualizerCalls/SendMessage.h"
#include "VisualizerCalls/BuildGraph.h"
#include "SwapOperators/swapOperators.h"
#include "Transformations/enddo_loop_converter.h"
#include "Transformations/loop_transform.h"
#include "Transformations/array_assign_to_loop.h"
@@ -90,6 +88,7 @@
#include "Transformations/convert_to_c.h"
#include "Transformations/set_implicit_none.h"
#include "Transformations/dead_code.h"
#include "Transformations/SwapOperators/swap_operators.h"
#include "RenameSymbols/rename_symbols.h"
#include "ProjectParameters/projectParameters.h"

View File

@@ -4,14 +4,14 @@
#include <queue>
#include <iostream>
#include "../Utils/errors.h"
#include "../Utils/SgUtils.h"
#include "../GraphCall/graph_calls.h"
#include "../GraphCall/graph_calls_func.h"
#include "../CFGraph/CFGraph.h"
#include "../CFGraph/IR.h"
#include "../GraphLoop/graph_loops.h"
#include "swapOperators.h"
#include "../../Utils/errors.h"
#include "../../Utils/SgUtils.h"
#include "../../GraphCall/graph_calls.h"
#include "../../GraphCall/graph_calls_func.h"
#include "../../CFGraph/CFGraph.h"
#include "../../CFGraph/IR.h"
#include "../../GraphLoop/graph_loops.h"
#include "swap_operators.h"
using namespace std;

View File

@@ -1,6 +1,6 @@
#pragma once
#include "../GraphLoop/graph_loops.h"
#include "../CFGraph/CFGraph.h"
#include "../../GraphLoop/graph_loops.h"
#include "../../CFGraph/CFGraph.h"
void runSwapOperators(SgFile *file, std::map<std::string, std::vector<LoopGraph*>>& loopGraph, std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR, int& countOfTransform);