Commit b6d4ce31 by Nicolas Capens Committed by Nicolas Capens

Refactor common Reactor implementations

Some functions in LLVMReactor.cpp and SubzeroReactor.cpp were identical and have been moved into a common Reactor.cpp. Bug swiftshader:21 Change-Id: Ib079757f9e35f83b1103e2791227f02775e034d3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27068Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 4ef71eb8
...@@ -1873,6 +1873,7 @@ if(${REACTOR_BACKEND} STREQUAL "Subzero") ...@@ -1873,6 +1873,7 @@ if(${REACTOR_BACKEND} STREQUAL "Subzero")
) )
set(SUBZERO_REACTOR_LIST set(SUBZERO_REACTOR_LIST
${SOURCE_DIR}/Reactor/Reactor.cpp
${SOURCE_DIR}/Reactor/SubzeroReactor.cpp ${SOURCE_DIR}/Reactor/SubzeroReactor.cpp
${SOURCE_DIR}/Reactor/Routine.cpp ${SOURCE_DIR}/Reactor/Routine.cpp
${SOURCE_DIR}/Reactor/Optimizer.cpp ${SOURCE_DIR}/Reactor/Optimizer.cpp
...@@ -1965,6 +1966,7 @@ list(REMOVE_ITEM SWIFTSHADER_LIST ...@@ -1965,6 +1966,7 @@ list(REMOVE_ITEM SWIFTSHADER_LIST
) )
set(REACTOR_LLVM_LIST set(REACTOR_LLVM_LIST
${SOURCE_DIR}/Reactor/Reactor.cpp
${SOURCE_DIR}/Reactor/LLVMReactor.cpp ${SOURCE_DIR}/Reactor/LLVMReactor.cpp
${SOURCE_DIR}/Reactor/Nucleus.hpp ${SOURCE_DIR}/Reactor/Nucleus.hpp
${SOURCE_DIR}/Reactor/Routine.cpp ${SOURCE_DIR}/Reactor/Routine.cpp
......
...@@ -174,6 +174,7 @@ cc_defaults { ...@@ -174,6 +174,7 @@ cc_defaults {
defaults: [ "libswiftshader_common_defaults" ], defaults: [ "libswiftshader_common_defaults" ],
srcs: [ srcs: [
"Reactor/Reactor.cpp",
"Reactor/LLVMReactor.cpp", "Reactor/LLVMReactor.cpp",
"Reactor/Routine.cpp", "Reactor/Routine.cpp",
"Reactor/LLVMRoutine.cpp", "Reactor/LLVMRoutine.cpp",
...@@ -192,6 +193,7 @@ cc_defaults { ...@@ -192,6 +193,7 @@ cc_defaults {
device_supported: false, device_supported: false,
srcs: [ srcs: [
"Reactor/Reactor.cpp",
"Reactor/SubzeroReactor.cpp", "Reactor/SubzeroReactor.cpp",
"Reactor/Routine.cpp", "Reactor/Routine.cpp",
"Reactor/Optimizer.cpp", "Reactor/Optimizer.cpp",
......
...@@ -61,6 +61,7 @@ COMMON_SRC_FILES += \ ...@@ -61,6 +61,7 @@ COMMON_SRC_FILES += \
Main/SwiftConfig.cpp Main/SwiftConfig.cpp
COMMON_SRC_FILES += \ COMMON_SRC_FILES += \
Reactor/Reactor.cpp \
Reactor/Routine.cpp \ Reactor/Routine.cpp \
Reactor/Debug.cpp \ Reactor/Debug.cpp \
Reactor/DebugAndroid.cpp \ Reactor/DebugAndroid.cpp \
......
...@@ -294,6 +294,7 @@ swiftshader_source_set("swiftshader_reactor") { ...@@ -294,6 +294,7 @@ swiftshader_source_set("swiftshader_reactor") {
] ]
sources = [ sources = [
"Reactor.cpp",
"Routine.cpp", "Routine.cpp",
"Debug.cpp", "Debug.cpp",
"ExecutableMemory.cpp", "ExecutableMemory.cpp",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -289,6 +289,7 @@ ...@@ -289,6 +289,7 @@
<ClCompile Include="LLVMRoutineManager.cpp" /> <ClCompile Include="LLVMRoutineManager.cpp" />
<ClCompile Include="LLVMReactor.cpp" /> <ClCompile Include="LLVMReactor.cpp" />
<ClCompile Include="ExecutableMemory.cpp" /> <ClCompile Include="ExecutableMemory.cpp" />
<ClCompile Include="Reactor.cpp" />
<ClCompile Include="Routine.cpp" /> <ClCompile Include="Routine.cpp" />
<ClCompile Include="Thread.cpp" /> <ClCompile Include="Thread.cpp" />
</ItemGroup> </ItemGroup>
......
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
<ClCompile Include="Thread.cpp"> <ClCompile Include="Thread.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Reactor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Nucleus.hpp"> <ClInclude Include="Nucleus.hpp">
......
...@@ -224,6 +224,7 @@ ...@@ -224,6 +224,7 @@
<ClCompile Include="Debug.cpp" /> <ClCompile Include="Debug.cpp" />
<ClCompile Include="ExecutableMemory.cpp" /> <ClCompile Include="ExecutableMemory.cpp" />
<ClCompile Include="Optimizer.cpp" /> <ClCompile Include="Optimizer.cpp" />
<ClCompile Include="Reactor.cpp" />
<ClCompile Include="Routine.cpp" /> <ClCompile Include="Routine.cpp" />
<ClCompile Include="SubzeroReactor.cpp" /> <ClCompile Include="SubzeroReactor.cpp" />
</ItemGroup> </ItemGroup>
......
...@@ -129,6 +129,9 @@ ...@@ -129,6 +129,9 @@
<ClCompile Include="Debug.cpp"> <ClCompile Include="Debug.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Reactor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="$(SolutionDir)third_party\subzero\src\IceAssembler.h"> <ClInclude Include="$(SolutionDir)third_party\subzero\src\IceAssembler.h">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment