1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Transforms
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
..
ADCE Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
AddDiscriminators Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
AggressiveInstCombine
AlignmentFromAssumptions
ArgumentPromotion [ArgPromo][Tests] Run update_test_checks on all ArgumentPromotion tests 2019-12-14 00:29:38 -06:00
AtomicExpand AMDGPU: Fix copy-pasted test name error 2019-12-11 19:44:47 +05:30
Attributor [Attributor][FIX] Allow dead users of rewritten function 2020-01-03 10:43:40 -06:00
BDCE Clang-trunk Generates Wrong Debug values with -O1 2019-11-21 13:53:10 -08:00
BlockExtractor
BranchFolding
CalledValuePropagation
CallSiteSplitting
CanonicalizeAliases
CodeExtractor
CodeGenPrepare Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
ConstantHoisting Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ConstantMerge
ConstProp
Coroutines Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
CorrelatedValuePropagation [ConstantRange][LVI] Use overflow flags from sub to constrain the range 2019-11-07 16:18:03 +03:00
CrossDSOCFI
DCE [BasicBlockUtils] Add utility to remove redundant dbg.value instrs 2019-12-16 11:41:21 +01:00
DeadArgElim Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
DeadStoreElimination Fix for a dangling point bug in DeadStoreElimination pass 2020-01-03 14:28:44 +00:00
DivRemPairs
EarlyCSE Reapply: [DebugInfo] Correctly handle salvaged casts and split fragments at ISel 2019-12-18 16:26:42 +00:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp [X86] Make memcmp vector lowering handle arbitrary expansions 2019-10-30 09:12:57 +02:00
Float2Int
ForcedFunctionAttrs
FunctionAttrs [Attributor] Copy or port test cases related to Attributor to Attributor test folder 2019-12-02 15:36:29 +00:00
FunctionImport Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
GCOVProfiling Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
GlobalDCE Reland: Dead Virtual Function Elimination 2019-10-17 09:58:57 +00:00
GlobalMerge
GlobalOpt [Transforms][GlobalSRA] huge array causes long compilation time and huge memory usage. 2020-01-04 16:42:38 +03:00
GlobalSplit
GuardWidening Broaden the definition of a "widenable branch" 2019-11-21 10:46:16 -08:00
GVN Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
GVNHoist Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
GVNSink
HardwareLoops Recommit "[HardwareLoops] Optimisation remarks" 2019-11-05 09:06:22 +00:00
HotColdSplit HotColdSplitting: Do not outline within noreturn functions 2019-12-19 14:06:24 -08:00
IndirectBrExpand
IndVarSimplify Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
InferAddressSpaces
InferFunctionAttrs [Attributor] Copy or port test cases related to Attributor to Attributor test folder 2019-12-02 15:36:29 +00:00
Inline Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
InstCombine [NFC][InstCombine] '(Op1 & С) - Op1' -> '-(Op1 & ~C)' fold (PR44427) 2020-01-03 21:25:48 +03:00
InstMerge
InstNamer
InstSimplify [ValueTracking] isKnownNonZero() should take non-null-ness assumptions into consideration (PR43267) 2019-12-20 01:47:57 +03:00
InterleavedAccess [ARM] Disable VLD4 under MVE 2019-12-08 10:37:29 +00:00
Internalize Reland: Dead Virtual Function Elimination 2019-10-17 09:58:57 +00:00
IPConstantProp Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
IRCE
JumpThreading Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
LCSSA [LCSSA] Don't use VH callbacks to invalidate SCEV when creating LCSSA phis 2019-12-06 13:21:49 +07:00
LICM Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
LoadStoreVectorizer
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopFusion [LoopFusion] Move instructions from FC0.Latch to FC1.Latch. 2019-12-17 22:10:23 +00:00
LoopIdiom Revert BCmp Loop Idiom recognition transform (PR43870) 2019-11-02 12:48:03 +03:00
LoopInstSimplify
LoopInterchange [LoopInterchange] Improve inner exit loop safety checks. 2019-12-04 17:46:01 +00:00
LoopLoadElim
LoopPredication [LoopPred] Robustly handle partially unswitched loops 2019-11-21 15:44:36 -08:00
LoopReroll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
LoopRotate [BasicBlockUtils] Fix dbg.value elimination problem in MergeBlockIntoPredecessor 2019-12-16 11:41:21 +01:00
LoopSimplify
LoopSimplifyCFG
LoopStrengthReduce Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
LoopTransformWarning
LoopUnroll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
LoopUnrollAndJam
LoopUnswitch
LoopVectorize [PowerPC][LoopVectorize] Add tests for fp128 and fp16 2020-01-03 21:39:29 +00:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Propagate and use shape info for binary operators. 2019-12-27 15:50:47 +00:00
LowerSwitch
LowerTypeTests
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there."" 2019-11-26 20:28:52 -08:00
MergeFunc [MergeFuncs] Remove incorrect attribute copying 2019-12-11 20:09:54 +01:00
MergeICmps Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ObjCARC llvm/ObjCARC: Eliminate inlined AutoreleaseRV calls 2019-11-19 12:02:01 -08:00
PartiallyInlineLibCalls
PGOProfile
PhaseOrdering Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same. 2019-12-13 14:30:21 +00:00
PlaceSafepoints
PreISelIntrinsicLowering [ObjC] Override TailCallKind when lowering objc intrinsics 2019-11-11 08:30:06 -08:00
PruneEH
Reassociate Migrate function attribute "no-frame-pointer-elim-non-leaf" to "frame-pointer"="non-leaf" as cleanups after D56351 2019-12-24 16:05:15 -08:00
Reg2Mem
RewriteStatepointsForGC
SafeStack Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
SampleProfile Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ScalarizeMaskedMemIntrin/X86
Scalarizer Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
SCCP
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [SimpleLoopUnswitch] Invalidate the topmost loop with ExitBB as exiting. 2019-12-04 11:32:09 +00:00
SimplifyCFG Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
Sink
SLPVectorizer Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
SpeculateAroundPHIs
SpeculativeExecution
SROA Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
StraightLineStrengthReduce Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
StripDeadPrototypes
StripSymbols
StructurizeCFG
SyntheticCountsPropagation
TailCallElim
ThinLTOBitcodeWriter
TypePromotion/ARM Revert "[ARM][TypePromotion] Enable by default" 2019-12-22 11:27:11 -08:00
Util Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
WholeProgramDevirt