Skip to content

Commit 8b58781

Browse files
author
Simon Moll
committed
RV integration as an LLVM component
1 parent 7dadb0f commit 8b58781

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "llvm/lib/rv"]
2+
path = llvm/lib/rv
3+
url = https://github.com/sx-aurora-dev/rv.git
4+
branch = hpce/develop

llvm/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,8 @@ if(LLVM_TARGET_IS_CROSSCOMPILE_HOST)
10261026
# (this is a variable that CrossCompile sets on recursive invocations)
10271027
endif()
10281028

1029+
include_directories("${CMAKE_SOURCE_DIR}/lib/rv/include")
1030+
10291031
if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
10301032
# special hack for Solaris to handle crazy system sys/regset.h
10311033
include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris")

llvm/lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ add_subdirectory(Passes)
3737
add_subdirectory(TextAPI)
3838
add_subdirectory(ToolDrivers)
3939
add_subdirectory(XRay)
40+
add_subdirectory(rv)
4041

4142
if (LLVM_INCLUDE_TESTS)
4243
add_subdirectory(Testing)

llvm/lib/Passes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ add_llvm_component_library(LLVMPasses
2727
TransformUtils
2828
Vectorize
2929
Instrumentation
30+
RV
3031
)

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@
247247
#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
248248
#include "llvm/Transforms/Vectorize/VectorCombine.h"
249249

250+
#include "rv/registerPasses.h"
251+
250252
using namespace llvm;
251253

252254
static const Regex DefaultAliasRegex(
@@ -410,6 +412,7 @@ PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO,
410412
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
411413
#include "PassRegistry.def"
412414
}
415+
rv::addConfiguredRVPasses(*this);
413416
}
414417

415418
void PassBuilder::registerModuleAnalyses(ModuleAnalysisManager &MAM) {

llvm/lib/rv

Submodule rv added at def8c8d

0 commit comments

Comments
 (0)