Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicAPInt: optimize size of structure #97831

Merged
merged 4 commits into from
Jul 6, 2024

Conversation

artagnon
Copy link
Contributor

@artagnon artagnon commented Jul 5, 2024

Reuse the APInt::BitWidth to eliminate DynamicAPInt::HoldsLarge, cutting the size of DynamicAPInt by four bytes. This is implemented by making DynamicAPInt a friend of SlowDynamicAPInt and APInt, so it can directly access SlowDynamicAPInt::Val and APInt::BitWidth.

We get a speedup of 4% with this patch.

Reuse the APInt::BitWidth to eliminate DynamicAPInt::HoldsLarge, cutting
the size of DynamicAPInt by four bytes. This is implemented by making
DynamicAPInt a friend of SlowDynamicAPInt and APInt, so it can directly
access SlowDynamicAPInt::Val and APInt::BitWidth.
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 5, 2024

@llvm/pr-subscribers-llvm-support

@llvm/pr-subscribers-llvm-adt

Author: Ramkumar Ramachandra (artagnon)

Changes

Reuse the APInt::BitWidth to eliminate DynamicAPInt::HoldsLarge, cutting the size of DynamicAPInt by four bytes. This is implemented by making DynamicAPInt a friend of SlowDynamicAPInt and APInt, so it can directly access SlowDynamicAPInt::Val and APInt::BitWidth.


Full diff: https://github.com/llvm/llvm-project/pull/97831.diff

3 Files Affected:

  • (modified) llvm/include/llvm/ADT/APInt.h (+4)
  • (modified) llvm/include/llvm/ADT/DynamicAPInt.h (+12-11)
  • (modified) llvm/include/llvm/ADT/SlowDynamicAPInt.h (+7)
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index 6cfa6ec665084..108df7e0eaeaa 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -30,6 +30,7 @@ class StringRef;
 class hash_code;
 class raw_ostream;
 struct Align;
+class DynamicAPInt;
 
 template <typename T> class SmallVectorImpl;
 template <typename T> class ArrayRef;
@@ -1895,6 +1896,9 @@ class [[nodiscard]] APInt {
   friend struct DenseMapInfo<APInt, void>;
   friend class APSInt;
 
+  // Make DynamicAPInt a friend so it can access BitWidth directly.
+  friend DynamicAPInt;
+
   /// This constructor is used only internally for speed of construction of
   /// temporaries. It is unsafe since it takes ownership of the pointer, so it
   /// is not public.
diff --git a/llvm/include/llvm/ADT/DynamicAPInt.h b/llvm/include/llvm/ADT/DynamicAPInt.h
index f312f776df971..03325d3313b5a 100644
--- a/llvm/include/llvm/ADT/DynamicAPInt.h
+++ b/llvm/include/llvm/ADT/DynamicAPInt.h
@@ -35,21 +35,20 @@ namespace llvm {
 /// We always_inline all operations; removing these results in a 1.5x
 /// performance slowdown.
 ///
-/// When HoldsLarge is true, a SlowMPInt is held in the union. If it is false,
-/// the int64_t is held. Using std::variant instead would lead to significantly
-/// worse performance.
+/// When isLarge returns true, a SlowMPInt is held in the union. If isSmall
+/// returns true, the int64_t is held. Using std::variant instead would lead to
+/// significantly worse performance.
 class DynamicAPInt {
   union {
     int64_t ValSmall;
     detail::SlowDynamicAPInt ValLarge;
   };
-  unsigned HoldsLarge;
 
   LLVM_ATTRIBUTE_ALWAYS_INLINE void initSmall(int64_t O) {
     if (LLVM_UNLIKELY(isLarge()))
       ValLarge.detail::SlowDynamicAPInt::~SlowDynamicAPInt();
     ValSmall = O;
-    HoldsLarge = false;
+    ValLarge.Val.BitWidth = 0;
   }
   LLVM_ATTRIBUTE_ALWAYS_INLINE void
   initLarge(const detail::SlowDynamicAPInt &O) {
@@ -66,14 +65,13 @@ class DynamicAPInt {
       // and leak it.
       ValLarge = O;
     }
-    HoldsLarge = true;
   }
 
   LLVM_ATTRIBUTE_ALWAYS_INLINE explicit DynamicAPInt(
       const detail::SlowDynamicAPInt &Val)
-      : ValLarge(Val), HoldsLarge(true) {}
-  LLVM_ATTRIBUTE_ALWAYS_INLINE bool isSmall() const { return !HoldsLarge; }
-  LLVM_ATTRIBUTE_ALWAYS_INLINE bool isLarge() const { return HoldsLarge; }
+      : ValLarge(Val) {}
+  constexpr bool isSmall() const { return ValLarge.Val.BitWidth == 0; }
+  constexpr bool isLarge() const { return !isSmall(); }
   /// Get the stored value. For getSmall/Large,
   /// the stored value should be small/large.
   LLVM_ATTRIBUTE_ALWAYS_INLINE int64_t getSmall() const {
@@ -105,14 +103,17 @@ class DynamicAPInt {
 
 public:
   LLVM_ATTRIBUTE_ALWAYS_INLINE explicit DynamicAPInt(int64_t Val)
-      : ValSmall(Val), HoldsLarge(false) {}
+      : ValSmall(Val) {
+    ValLarge.Val.BitWidth = 0;
+  }
   LLVM_ATTRIBUTE_ALWAYS_INLINE DynamicAPInt() : DynamicAPInt(0) {}
   LLVM_ATTRIBUTE_ALWAYS_INLINE ~DynamicAPInt() {
     if (LLVM_UNLIKELY(isLarge()))
       ValLarge.detail::SlowDynamicAPInt::~SlowDynamicAPInt();
   }
   LLVM_ATTRIBUTE_ALWAYS_INLINE DynamicAPInt(const DynamicAPInt &O)
-      : ValSmall(O.ValSmall), HoldsLarge(false) {
+      : ValSmall(O.ValSmall) {
+    ValLarge.Val.BitWidth = 0;
     if (LLVM_UNLIKELY(O.isLarge()))
       initLarge(O.ValLarge);
   }
diff --git a/llvm/include/llvm/ADT/SlowDynamicAPInt.h b/llvm/include/llvm/ADT/SlowDynamicAPInt.h
index 1678bda046fec..cda5f39eb98c3 100644
--- a/llvm/include/llvm/ADT/SlowDynamicAPInt.h
+++ b/llvm/include/llvm/ADT/SlowDynamicAPInt.h
@@ -21,6 +21,10 @@
 #include "llvm/ADT/APInt.h"
 #include "llvm/Support/raw_ostream.h"
 
+namespace llvm {
+class DynamicAPInt;
+} // namespace llvm
+
 namespace llvm::detail {
 /// A simple class providing dynamic arbitrary-precision arithmetic. Internally,
 /// it stores an APInt, whose width is doubled whenever an overflow occurs at a
@@ -69,6 +73,9 @@ class SlowDynamicAPInt {
   /// Overload to compute a hash_code for a SlowDynamicAPInt value.
   friend hash_code hash_value(const SlowDynamicAPInt &X); // NOLINT
 
+  // Make DynamicAPInt a friend so it can access Val directly.
+  friend DynamicAPInt;
+
   unsigned getBitWidth() const { return Val.getBitWidth(); }
 
   void print(raw_ostream &OS) const;

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for following up on this.

Do you happen to see any performance improvement from this?

llvm/include/llvm/ADT/APInt.h Show resolved Hide resolved
llvm/include/llvm/ADT/SlowDynamicAPInt.h Show resolved Hide resolved
@artagnon
Copy link
Contributor Author

artagnon commented Jul 5, 2024

Do you happen to see any performance improvement from this?

Will LLVM Compile Time Tracker be sufficient?

@nikic
Copy link
Contributor

nikic commented Jul 5, 2024

Do you happen to see any performance improvement from this?

Will LLVM Compile Time Tracker be sufficient?

No, I meant for the Presburger library. I thought you had benchmarks for it, but maybe that was someone else?

@artagnon
Copy link
Contributor Author

artagnon commented Jul 5, 2024

Do you happen to see any performance improvement from this?

Will LLVM Compile Time Tracker be sufficient?

No, I meant for the Presburger library. I thought you had benchmarks for it, but maybe that was someone else?

The best I can do is statistical benchmarking of wall-clock-time of the unit-test executable of the Presburger library. I don't have any other benchmarks.

@Superty
Copy link
Member

Superty commented Jul 5, 2024

Did not review, but am happy to accept in principle if you do not see a regression in the performance of the Presburger unit tests. Can you confirm this?

@artagnon
Copy link
Contributor Author

artagnon commented Jul 5, 2024

Okay, the results are in, and I'm confused about why there is a 36% slowdown:

Command Mean [ms] Min [ms] Max [ms] Relative
./main 749.2 ± 25.0 720.6 794.7 1.00
./patch 1015.4 ± 23.5 988.3 1053.3 1.36 ± 0.05

@artagnon artagnon marked this pull request as draft July 5, 2024 18:17
@artagnon
Copy link
Contributor Author

artagnon commented Jul 5, 2024

Okay, the symbol table shows that isSmall() and isLarge() weren't inlined. Will fix shortly.

@artagnon
Copy link
Contributor Author

artagnon commented Jul 5, 2024

Nice 4% speedup.

Command Mean [ms] Min [ms] Max [ms] Relative
./main 790.1 ± 10.9 778.1 814.0 1.04 ± 0.02
./patch 761.5 ± 12.6 743.6 780.5 1.00

@artagnon artagnon marked this pull request as ready for review July 5, 2024 19:11
Copy link

github-actions bot commented Jul 5, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Member

@Superty Superty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce the speedup but I see no slowdown so I'm happy to approve this from the Presburger side

llvm/include/llvm/ADT/DynamicAPInt.h Outdated Show resolved Hide resolved
llvm/include/llvm/ADT/DynamicAPInt.h Show resolved Hide resolved
llvm/include/llvm/ADT/DynamicAPInt.h Outdated Show resolved Hide resolved
@artagnon artagnon merged commit 4a9aef6 into llvm:main Jul 6, 2024
8 checks passed
@artagnon artagnon deleted the dynamicapint-optz branch July 6, 2024 12:16
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 6, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-windows running on premerge-windows-1 while building llvm at step 7 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/728

Here is the relevant piece of the build log for the reference:

Step 7 (build-unified-tree) failure: build (failure)
...
[6460/10118] Building CXX object tools\flang\lib\Optimizer\CodeGen\CMakeFiles\obj.FIRCodeGen.dir\TBAABuilder.cpp.obj
[6461/10118] Building CXX object tools\clang\tools\libclang\CMakeFiles\libclang.dir\CXExtractAPI.cpp.obj
[6462/10118] Building CXX object tools\flang\lib\Optimizer\CodeGen\CMakeFiles\obj.FIRCodeGen.dir\FIROpPatterns.cpp.obj
[6463/10118] Building CXX object tools\flang\lib\Optimizer\CodeGen\CMakeFiles\obj.FIRCodeGen.dir\CodeGenOpenMP.cpp.obj
[6464/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ComponentPath.cpp.obj
[6465/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\SymbolMap.cpp.obj
[6466/10118] Building CXX object tools\flang\lib\Optimizer\CodeGen\CMakeFiles\obj.FIRCodeGen.dir\CodeGen.cpp.obj
[6467/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\HlfirIntrinsics.cpp.obj
[6468/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\Coarray.cpp.obj
[6469/10118] Building CXX object tools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\FrontendActions.cpp.obj
FAILED: tools/flang/lib/Frontend/CMakeFiles/obj.flangFrontend.dir/FrontendActions.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\FrontendActions.cpp.obj /Fdtools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend\FrontendActions.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\stdexcept(41): fatal error C1060: compiler is out of heap space
[6470/10118] Building CXX object tools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\FrontendAction.cpp.obj
FAILED: tools/flang/lib/Frontend/CMakeFiles/obj.flangFrontend.dir/FrontendAction.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\FrontendAction.cpp.obj /Fdtools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend\FrontendAction.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\vector(1644): fatal error C1060: compiler is out of heap space
[6471/10118] Building CXX object tools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\CompilerInstance.cpp.obj
FAILED: tools/flang/lib/Frontend/CMakeFiles/obj.flangFrontend.dir/CompilerInstance.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\CompilerInstance.cpp.obj /Fdtools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend\CompilerInstance.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\assert.h(15): fatal error C1060: compiler is out of heap space
[6472/10118] Building CXX object tools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\CompilerInvocation.cpp.obj
FAILED: tools/flang/lib/Frontend/CMakeFiles/obj.flangFrontend.dir/CompilerInvocation.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\CompilerInvocation.cpp.obj /Fdtools\flang\lib\Frontend\CMakeFiles\obj.flangFrontend.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Frontend\CompilerInvocation.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(608): fatal error C1060: compiler is out of heap space
[6473/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\VectorSubscripts.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/VectorSubscripts.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\VectorSubscripts.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\VectorSubscripts.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(863): fatal error C1060: compiler is out of heap space
[6474/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\OpenMP\Utils.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenMP/Utils.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\OpenMP\Utils.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\Utils.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(479): fatal error C1060: compiler is out of heap space
[6475/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\PFTBuilder.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/PFTBuilder.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\PFTBuilder.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\PFTBuilder.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\variant(1529): fatal error C1060: compiler is out of heap space
[6476/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\Runtime.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/Runtime.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\Runtime.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\Runtime.cpp
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\xmemory(33): fatal error C1060: compiler is out of heap space
[6477/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\OpenMP\ClauseProcessor.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenMP/ClauseProcessor.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\OpenMP\ClauseProcessor.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\ClauseProcessor.cpp
C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\ClauseProcessor.cpp(1102): fatal error C1060: compiler is out of heap space
[6478/10118] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\OpenMP\ReductionProcessor.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenMP/ReductionProcessor.cpp.obj 
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe  /nologo /TP -DBUILD_EXAMPLES -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\include -Itools\flang\include -Iinclude -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\..\clang\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\OpenMP\ReductionProcessor.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\ReductionProcessor.cpp
C:\ws\buildbot\premerge-monolithic-windows\llvm-project\flang\lib\Lower\OpenMP\ReductionProcessor.cpp(848): fatal error C1060: compiler is out of heap space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants