mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
a6ff22119f
For hung off uses, we need a Use* to tell use where the operands are. This was User::OperandList but we want to remove that to save space of all subclasses which aren't making use of 'hung off uses'. Hung off uses now allocate their own 'OperandList' Use* in the User::new which they call. getOperandList() now uses the hung off uses bit to work out where the Use* for the OperandList lives. If a User has hung off uses, then this bit tells them to go back a single Use* from the User* and use that value as the OperandList. If a User has no hung off uses, then we get the first operand by subtracting (NumOperands * sizeof(Use)) from the User this pointer. This saves a pointer from User and all subclasses. Given the average size of a subclass of User is 112 or 128 bytes, this saves around 7% of space With malloc tending to align to 16-bytes the real saving is typically more like 3.5%. On 'opt -O2 verify-uselistorder.lto.bc', peak memory usage prior to this change is 149MB and after is 143MB so the savings are around 2.5% of peak. Looking at some passes which allocate many Instructions and Values, parseIR drops from 54.25MB to 52.21MB while the Inliner calls to Instruction::clone() drops from 28.20MB to 27.05MB. Reviewed by Duncan Exon Smith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239623 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AsmWriter.cpp | ||
AttributeImpl.h | ||
Attributes.cpp | ||
AutoUpgrade.cpp | ||
BasicBlock.cpp | ||
CMakeLists.txt | ||
Comdat.cpp | ||
ConstantFold.cpp | ||
ConstantFold.h | ||
ConstantRange.cpp | ||
Constants.cpp | ||
ConstantsContext.h | ||
Core.cpp | ||
DataLayout.cpp | ||
DebugInfo.cpp | ||
DebugInfoMetadata.cpp | ||
DebugLoc.cpp | ||
DiagnosticInfo.cpp | ||
DiagnosticPrinter.cpp | ||
DIBuilder.cpp | ||
Dominators.cpp | ||
Function.cpp | ||
GCOV.cpp | ||
Globals.cpp | ||
GVMaterializer.cpp | ||
InlineAsm.cpp | ||
Instruction.cpp | ||
Instructions.cpp | ||
IntrinsicInst.cpp | ||
IRBuilder.cpp | ||
IRPrintingPasses.cpp | ||
LegacyPassManager.cpp | ||
LLVMBuild.txt | ||
LLVMContext.cpp | ||
LLVMContextImpl.cpp | ||
LLVMContextImpl.h | ||
Makefile | ||
Mangler.cpp | ||
MDBuilder.cpp | ||
Metadata.cpp | ||
MetadataImpl.h | ||
MetadataTracking.cpp | ||
Module.cpp | ||
module.modulemap | ||
Operator.cpp | ||
Pass.cpp | ||
PassManager.cpp | ||
PassRegistry.cpp | ||
Statepoint.cpp | ||
SymbolTableListTraitsImpl.h | ||
Type.cpp | ||
TypeFinder.cpp | ||
Use.cpp | ||
User.cpp | ||
Value.cpp | ||
ValueSymbolTable.cpp | ||
ValueTypes.cpp | ||
Verifier.cpp |