Skip to content

Commit a86221e

Browse files
author
Simon Moll
committed
RV integration as an LLVM component
1 parent 74c3e23 commit a86221e

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

1035+
include_directories("${CMAKE_SOURCE_DIR}/lib/rv/include")
1036+
10351037
if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
10361038
# special hack for Solaris to handle crazy system sys/regset.h
10371039
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
@@ -249,6 +249,8 @@
249249
#include "llvm/Transforms/Vectorize/SLPVectorizer.h"
250250
#include "llvm/Transforms/Vectorize/VectorCombine.h"
251251

252+
#include "rv/registerPasses.h"
253+
252254
using namespace llvm;
253255

254256
static const Regex DefaultAliasRegex(
@@ -412,6 +414,7 @@ PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO,
412414
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
413415
#include "PassRegistry.def"
414416
}
417+
rv::addConfiguredRVPasses(*this);
415418
}
416419

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

llvm/lib/rv

Submodule rv added at def8c8d

0 commit comments

Comments
 (0)