Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding openMP parallelization pragmas #105

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ebbb305
Added basic openMP skeleton to ir2vec
nishant-sachdeva May 3, 2024
2d002f9
Added openMP samples across the codebase
nishant-sachdeva May 20, 2024
877417d
Added code changes to increase speed
nishant-sachdeva Jun 27, 2024
323cd27
incremental change : openmp compilation
nishant-sachdeva Jun 27, 2024
c2fe500
test changes
nishant-sachdeva Jun 27, 2024
5e1b4fb
removing parallelisation around triplet generation
nishant-sachdeva Jun 27, 2024
352c47e
Parallelised bb2vec
nishant-sachdeva Jun 28, 2024
0e35da8
Pruning omp usage. Adding omp usage to flowaware pipeline
nishant-sachdeva Jul 18, 2024
b7b6cf9
Code refactoring in IR2Vec.cpp
nishant-sachdeva Jul 18, 2024
d54d520
scaleVector function changed to include std::transform
nishant-sachdeva Jul 30, 2024
40f982f
removing unnecessary printing from sanity_check
nishant-sachdeva Jul 31, 2024
f3e625d
Sqlite3 tests fixed
nishant-sachdeva Jul 31, 2024
939bc33
minor flowaware changes
nishant-sachdeva Aug 8, 2024
650d70a
getValue function made inline. Accepts pointers now
nishant-sachdeva Aug 9, 2024
d3b381a
removed array returns, and array params. replaced with pointers
nishant-sachdeva Aug 9, 2024
77635bc
opt checkpoint
nishant-sachdeva Aug 12, 2024
8a68c0d
opt checkpoint
nishant-sachdeva Aug 12, 2024
9a3fd2d
opt checkpoint : changed UpdateFuncVecMap from recursive to iterative
nishant-sachdeva Aug 12, 2024
85be0d7
opt checkpoint
nishant-sachdeva Aug 12, 2024
aae25cc
opt checkpoint. changed DFSUtil from recursive to iterative
nishant-sachdeva Aug 12, 2024
b25348c
test changes
nishant-sachdeva Aug 13, 2024
91b7ac2
opt checkpoint. changed transitiveReads from recursive to iterative
nishant-sachdeva Aug 13, 2024
2e9c9e1
added pragmas into GaussJordan
nishant-sachdeva Aug 28, 2024
56f381b
pragma omp into gaussJordan
nishant-sachdeva Aug 28, 2024
3e9a4ec
nit : testing func2vec without pragmas
nishant-sachdeva Sep 4, 2024
e156033
test commit : fixing extra benchmark time
nishant-sachdeva Sep 10, 2024
673c318
pre-commit format commit
nishant-sachdeva Sep 10, 2024
e680b82
pre-commit check format change
nishant-sachdeva Sep 10, 2024
454c183
precommit format fix change
nishant-sachdeva Sep 10, 2024
2c6f3bd
rmake check results fixed
nishant-sachdeva Sep 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(ir2vec VERSION 2.1.2)
set(IR2VEC_LIB "IR2Vec")
set(IR2VEC_LIB_STATIC "IR2Vec_Static")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pg")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

Expand Down
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ if(NOT LLVM_IR2VEC)
# llvm_map_components_to_libnames(llvm_libs all)
llvm_map_components_to_libnames(llvm_libs support core irreader analysis TransformUtils)

# Check if OpenMP is supported by the compiler
find_package(OpenMP REQUIRED)

add_executable(${PROJECT_NAME} ${binsrc})
target_link_libraries (${PROJECT_NAME} ${llvm_libs} objlib)
target_link_libraries (${PROJECT_NAME} ${llvm_libs} objlib OpenMP::OpenMP_CXX)
target_include_directories(${PROJECT_NAME} PRIVATE .)

add_library(objlib OBJECT ${libsrc})
Expand All @@ -50,6 +53,9 @@ if(NOT LLVM_IR2VEC)
PUBLIC_HEADER DESTINATION include
RESOURCE DESTINATION ./)

# Add compiler flags for OpenMP
target_compile_options(${PROJECT_NAME} PRIVATE ${OpenMP_CXX_FLAGS})

add_subdirectory(test-suite)

add_custom_target(check
Expand Down
14 changes: 1 addition & 13 deletions src/CollectIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,32 @@ void CollectIR::traverseBasicBlock(BasicBlock &B) {

if (type->isVoidTy()) {
stype = " voidTy ";
res += stype;
} else if (type->isFloatingPointTy()) {
stype = " floatTy ";
res += stype;
} else if (type->isIntegerTy()) {
stype = " integerTy ";
res += stype;
} else if (type->isFunctionTy()) {
stype = " functionTy ";
res += stype;
} else if (type->isStructTy()) {
stype = " structTy ";
res += stype;
} else if (type->isArrayTy()) {
stype = " arrayTy ";
res += stype;
} else if (type->isPointerTy()) {
stype = " pointerTy ";
res += stype;
} else if (type->isVectorTy()) {
stype = " vectorTy ";
res += stype;
} else if (type->isEmptyTy()) {
stype = " emptyTy ";
res += stype;
} else if (type->isLabelTy()) {
stype = " labelTy ";
res += stype;
} else if (type->isTokenTy()) {
stype = " tokenTy ";
res += stype;
} else if (type->isMetadataTy()) {
stype = " metadataTy ";
res += stype;
} else {
stype = " unknownTy ";
res += stype;
}
res += stype;

IR2VEC_DEBUG(errs() << "Type taken : " << stype << "\n";);

Expand Down
Loading
Loading