Skip to content

Commit b73334b

Browse files
Vladislavkaniandr
authored andcommitted
[TSAR, Transform, LoopSwap] Add tsar-server usage
1 parent eb04942 commit b73334b

File tree

5 files changed

+340
-163
lines changed

5 files changed

+340
-163
lines changed

include/tsar/Support/DiagnosticKinds.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,4 @@ def warn_loopswap_not_perfect: Warning<"expected perfect loop">;
195195
def warn_loopswap_id_not_found: Warning<"induction not found">;
196196
def warn_loopswap_not_forstmt: Warning<"expected for loop">;
197197
def err_loopswap_dependency: Error<"loop contains dependence. use 'nostrict' clause to skip this check">;
198+
def warn_loopswap_no_analysis: Warning<"loop has no analysis. use 'nostrict' clause to skip this check">;
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
#ifndef TSAR_CLANG_RENAME_LOCAL_H
2-
#define TSAR_CLANG_RENAME_LOCAL_H
1+
#ifndef TSAR_CLANG_LOOP_SWAP_H
2+
#define TSAR_CLANG_LOOP_SWAP_H
33

4-
#include "tsar/Transform/Clang/Passes.h"
54
#include <bcl/utility.h>
65
#include <llvm/Pass.h>
7-
86
namespace llvm {
9-
class ClangLoopSwapPass : public ModulePass, private bcl::Uncopyable {
7+
class ClangLoopSwap : public ModulePass, private bcl::Uncopyable {
108
public:
119
static char ID;
12-
13-
ClangLoopSwapPass() : ModulePass(ID) {
14-
initializeClangLoopSwapPassPass(*PassRegistry::getPassRegistry());
15-
}
16-
10+
ClangLoopSwap();
1711
bool runOnModule(Module &M) override;
1812
void getAnalysisUsage(AnalysisUsage &AU) const override;
1913
};
2014
} // namespace llvm
21-
#endif
15+
16+
#endif

include/tsar/Transform/Clang/Passes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,8 @@ void initializeClangStructureReplacementPassPass(PassRegistry &Registry);
8484

8585
void initializeClangLoopSwapPassPass(PassRegistry &Registry);
8686
ModulePass* createClangLoopSwapPass();
87+
88+
void initializeClangLoopSwapPass(PassRegistry &Registry);
89+
ModulePass* createClangLoopSwap();
8790
}
8891
#endif//TSAR_CLANG_TRANSFORM_PASSES_H

0 commit comments

Comments
 (0)