1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib
Alexey Lapshin 5b59e688d3 [Transforms][GlobalSRA] huge array causes long compilation time and huge memory usage.
Summary:
For artificial cases (huge array, few usages), Global SRA optimization creates
a lot of redundant data. It creates an instance of GlobalVariable for each array
element. For huge array, that means huge compilation time and huge memory usage.
Following example compiles for 10 minutes and requires 40GB of memory.

namespace {
  char LargeBuffer[64 * 1024 * 1024];
}

int main ( void ) {

    LargeBuffer[0] = 0;

    printf("\n ");

    return LargeBuffer[0] == 0;
}

The fix is to avoid Global SRA for large arrays.

Reviewers: craig.topper, rnk, efriedma, fhahn

Reviewed By: rnk

Subscribers: xbolva00, lebedev.ri, lkail, merge_guards_bot, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71993
2020-01-04 16:42:38 +03:00
..
Analysis [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
AsmParser Revert "DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization" 2019-12-30 22:33:35 -08:00
BinaryFormat [AIX] Emit TOC entries for ASM printing 2019-11-27 17:20:55 -05:00
Bitcode Revert "DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization" 2019-12-30 22:33:35 -08:00
Bitstream [Bitstream] Delete skipAbbreviatedField which duplicates readAbbreviatedField 2019-12-25 18:55:02 -08:00
CodeGen [TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits for ISD::EXTRACT_VECTOR_ELT (REAPPLIED) 2020-01-04 13:15:50 +00:00
DebugInfo [DWARF] Don't assume optional always has a value. 2020-01-03 09:53:44 -08:00
Demangle Revert "Add some missing includes to MicrosoftDemangle.cpp (PR44217)" 2019-12-04 11:10:07 -08:00
ExecutionEngine [NFC][ORC] Fix typos and whitespaces in comments 2020-01-03 21:54:03 +01:00
Frontend [OpenMP] Use the OpenMPIRBuilder for omp parallel 2019-12-30 13:57:13 -06:00
Fuzzer
FuzzMutate [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
IR [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
IRReader [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LineEditor [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Linker [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
LTO [ThinLTO] Show preserved symbols in DOT files 2019-12-18 18:33:15 +03:00
MC [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
MCA [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
Object [llvm-readobj] - Remove an excessive helper for printing dynamic tags. 2019-12-24 11:55:45 +03:00
ObjectYAML [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
Option [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Passes [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
ProfileData Revert "[Coverage] Revise format to reduce binary size" 2019-12-04 10:35:14 -08:00
Remarks [Remarks] Allow empty temporary remark files 2019-11-22 15:58:12 -08:00
Support build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00
TableGen [TableGen] Add bang-operators !getop and !setop. 2019-12-11 12:05:22 +00:00
Target [AMDGPU] Revert scheduling to reduce spilling 2020-01-03 15:20:21 -08:00
Testing
TextAPI [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
ToolDrivers [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Transforms [Transforms][GlobalSRA] huge array causes long compilation time and huge memory usage. 2020-01-04 16:42:38 +03:00
WindowsManifest Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name"" 2019-12-03 09:27:14 -08:00
XRay [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CMakeLists.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00
LLVMBuild.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00