Skip to content

Commit 69ef101

Browse files
Simon Mollefocht
authored andcommitted
RV integration as an LLVM component
1 parent 3b20827 commit 69ef101

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-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
@@ -1033,6 +1033,8 @@ if(LLVM_TARGET_IS_CROSSCOMPILE_HOST)
10331033
# (this is a variable that CrossCompile sets on recursive invocations)
10341034
endif()
10351035

1036+
include_directories("${CMAKE_SOURCE_DIR}/lib/rv/include")
1037+
10361038
if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
10371039
# special hack for Solaris to handle crazy system sys/regset.h
10381040
include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris")

llvm/lib/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ add_subdirectory(Passes)
3838
add_subdirectory(TextAPI)
3939
add_subdirectory(ToolDrivers)
4040
add_subdirectory(XRay)
41+
add_subdirectory(rv)
42+
4143
if (LLVM_INCLUDE_TESTS)
4244
add_subdirectory(Testing)
4345
endif()

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
@@ -250,6 +250,8 @@
250250
#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
251251
#include "llvm/Transforms/Vectorize/VectorCombine.h"
252252

253+
#include "rv/registerPasses.h"
254+
253255
using namespace llvm;
254256

255257
static const Regex DefaultAliasRegex(
@@ -413,6 +415,7 @@ PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO,
413415
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
414416
#include "PassRegistry.def"
415417
}
418+
rv::addConfiguredRVPasses(*this);
416419
}
417420

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

llvm/lib/rv

Submodule rv added at def8c8d

0 commit comments

Comments
 (0)