Internal Cleanup P3
Status Update
Comments
ni...@google.com <ni...@google.com>
ni...@google.com <ni...@google.com> #2
This was opened in response to
In addition, untangling the dependencies on llvm-subzero doesn't appear to be straightforward, so this might just not be worth the trouble.
ap...@google.com <ap...@google.com> #3
Project: SwiftShader
Branch: master
commit f272427bda39a1abf3aa6e1a1bdd9b628b5ea5b1
Author: Nicolas Capens <capn@google.com>
Date: Mon Jul 20 13:46:14 2020
Eliminate dead host/target feature code for Subzero
Subzero requires specifying the target CPU features at construction,
and doesn't use this legacy LLVM support code.
It is conceivable that this code was putting build host specific
information into static variables, thus not producing the same binary
when built on different machines.
Bug: chromium:937268
Bug: b/155971541
Change-Id: I8934c4abfebc3901ef50edfe86a0122b1b50e319
Reviewed-on:https://swiftshader-review.googlesource.com/c/SwiftShader/+/46689
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
M src/Reactor/BUILD.gn
M third_party/llvm-subzero/Android.bp
M third_party/llvm-subzero/CMakeLists.txt
D third_party/llvm-subzero/include/llvm/ADT/Triple.h
M third_party/llvm-subzero/include/llvm/Support/Host.h
D third_party/llvm-subzero/include/llvm/Support/TargetParser.h
M third_party/llvm-subzero/lib/Support/CommandLine.cpp
D third_party/llvm-subzero/lib/Support/Host.cpp
D third_party/llvm-subzero/lib/Support/TargetParser.cpp
M third_party/llvm-subzero/lib/Support/Threading.cpp
D third_party/llvm-subzero/lib/Support/Triple.cpp
D third_party/llvm-subzero/lib/Support/Unix/Host.inc
D third_party/llvm-subzero/lib/Support/Windows/Host.inc
https://swiftshader-review.googlesource.com/46689
Branch: master
commit f272427bda39a1abf3aa6e1a1bdd9b628b5ea5b1
Author: Nicolas Capens <capn@google.com>
Date: Mon Jul 20 13:46:14 2020
Eliminate dead host/target feature code for Subzero
Subzero requires specifying the target CPU features at construction,
and doesn't use this legacy LLVM support code.
It is conceivable that this code was putting build host specific
information into static variables, thus not producing the same binary
when built on different machines.
Bug: chromium:937268
Bug:
Change-Id: I8934c4abfebc3901ef50edfe86a0122b1b50e319
Reviewed-on:
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
M src/Reactor/BUILD.gn
M third_party/llvm-subzero/Android.bp
M third_party/llvm-subzero/CMakeLists.txt
D third_party/llvm-subzero/include/llvm/ADT/Triple.h
M third_party/llvm-subzero/include/llvm/Support/Host.h
D third_party/llvm-subzero/include/llvm/Support/TargetParser.h
M third_party/llvm-subzero/lib/Support/CommandLine.cpp
D third_party/llvm-subzero/lib/Support/Host.cpp
D third_party/llvm-subzero/lib/Support/TargetParser.cpp
M third_party/llvm-subzero/lib/Support/Threading.cpp
D third_party/llvm-subzero/lib/Support/Triple.cpp
D third_party/llvm-subzero/lib/Support/Unix/Host.inc
D third_party/llvm-subzero/lib/Support/Windows/Host.inc
ap...@google.com <ap...@google.com> #4
Project: SwiftShader
Branch: master
commit b3e5c440d23951be27ded79ae912cd5b9ce55e60
Author: Nicolas Capens <nicolascapens@google.com>
Date: Wed Jan 20 06:16:24 2021
Enable and require C++17 compilation
Updates build files to specify using the C++17 standard.
Add a usage of the C++17 exclusive [[maybe_unused]] attribute as a test.
Also unconditionally use <filesystem> in Reactor unit tests.
C++17 deprecates things like std::unary_function<>, which were present
in Subzero's LLVM headers, but the functionality was unused so it has
been deleted.
Bug: b/174843857
Bug: b/155971541
Change-Id: Ib167726535399b0b12751a3d93feaa9db762cd5d
Signed-off-by: Nicolas Capens <capn@google.com>
Reviewed-on:https://swiftshader-review.googlesource.com/c/SwiftShader/+/51948
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
M .vscode/c_cpp_properties.json
M Android.bp
M BUILD.gn
M CMakeLists.txt
M src/Device/Blitter.cpp
M src/System/Build.cpp
M tests/ReactorUnitTests/ReactorUnitTests.cpp
M third_party/llvm-subzero/include/llvm/ADT/STLExtras.h
https://swiftshader-review.googlesource.com/51948
Branch: master
commit b3e5c440d23951be27ded79ae912cd5b9ce55e60
Author: Nicolas Capens <nicolascapens@google.com>
Date: Wed Jan 20 06:16:24 2021
Enable and require C++17 compilation
Updates build files to specify using the C++17 standard.
Add a usage of the C++17 exclusive [[maybe_unused]] attribute as a test.
Also unconditionally use <filesystem> in Reactor unit tests.
C++17 deprecates things like std::unary_function<>, which were present
in Subzero's LLVM headers, but the functionality was unused so it has
been deleted.
Bug:
Bug:
Change-Id: Ib167726535399b0b12751a3d93feaa9db762cd5d
Signed-off-by: Nicolas Capens <capn@google.com>
Reviewed-on:
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
M .vscode/c_cpp_properties.json
M Android.bp
M BUILD.gn
M CMakeLists.txt
M src/Device/Blitter.cpp
M src/System/Build.cpp
M tests/ReactorUnitTests/ReactorUnitTests.cpp
M third_party/llvm-subzero/include/llvm/ADT/STLExtras.h
ap...@google.com <ap...@google.com> #5
Project: SwiftShader
Branch: master
commit 22f5c92d4331415e9a8f6ce2c6e584aac1f6bb8d
Author: Nicolas Capens <capn@google.com>
Date: Thu May 07 09:48:34 2020
Eliminate Subzero's dependency on llvm::FoldingSet
Bug: b/155971541
Change-Id: I039fb24b31f01fff1ca2190fd6fe3b3e8118990e
Reviewed-on:https://swiftshader-review.googlesource.com/c/SwiftShader/+/44929
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Sean Risser <srisser@google.com>
D third_party/llvm-subzero/lib/Support/FoldingSet.cpp
M third_party/llvm-subzero/include/llvm/IR/Attributes.h
D third_party/llvm-subzero/include/llvm/ADT/FoldingSet.h
M third_party/llvm-subzero/CMakeLists.txt
M src/Reactor/BUILD.gn
M third_party/llvm-subzero/Android.bp
M third_party/llvm-subzero/lib/Support/APInt.cpp
M third_party/llvm-subzero/include/llvm/Support/CommandLine.h
https://swiftshader-review.googlesource.com/44929
Branch: master
commit 22f5c92d4331415e9a8f6ce2c6e584aac1f6bb8d
Author: Nicolas Capens <capn@google.com>
Date: Thu May 07 09:48:34 2020
Eliminate Subzero's dependency on llvm::FoldingSet
Bug:
Change-Id: I039fb24b31f01fff1ca2190fd6fe3b3e8118990e
Reviewed-on:
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Sean Risser <srisser@google.com>
D third_party/llvm-subzero/lib/Support/FoldingSet.cpp
M third_party/llvm-subzero/include/llvm/IR/Attributes.h
D third_party/llvm-subzero/include/llvm/ADT/FoldingSet.h
M third_party/llvm-subzero/CMakeLists.txt
M src/Reactor/BUILD.gn
M third_party/llvm-subzero/Android.bp
M third_party/llvm-subzero/lib/Support/APInt.cpp
M third_party/llvm-subzero/include/llvm/Support/CommandLine.h
Description
The third_party/llvm-subzero directory contains a tiny subset of an old version of LLVM, necessary for building Subzero (mostly headers). It's a confusing bit of overlap between the two projects, and now that Subzero is in maintenance mode for NaCl we no longer receive essential upstream improvements and can change Subzero to our liking.
llvm-subzero should be stripped to its absolute minimum, and the remaining bits integrated into Subzero types.