[LLVMdev] PATCH: Use size reduction -- wave1
Gabor Greif
gabor at mac.com
Wed Mar 26 15:16:03 PDT 2008
Hi all,
here comes the patch for the first wave of Use class size reduction.
I have split it into 3 files, corresponding to
- header changes
- implementation changes
- applications
This at the moment does not contain the description how the
size of the Use class will be reduced from 16 to 12 bytes,
I am going to send that in a separate patch.
This wave primarily consists of changes that are needed
to allocate objects with a variable number of embedded <Use>s.
Where the number of <Use>s is constant in the lifetime of an object,
I preferred to keep the 'new Instr(...)' syntax. Otherwise I have
introduced static 'Create(...)' methods, which are used instead of the
'new Instr(...)' construct. These replace the constructors and the
constructors become private/protected. The arguments of the 'Create'
methods are identical to the corresponding constructors.
Essentially at the moment all introduced 'operator new's end up calling
'::operator new(size_t)', so there should be no functionality change
at all.
This will change in subsequent waves.
At the moment of writing this my trunk working copy is at r48837,
I have used this command to do the merge:
svn merge http://llvm.org/svn/llvm-project/llvm/branches/ggreif/use-
diet at 48564 http://llvm.org/svn/llvm-project/llvm/branches/ggreif/use-
diet .
This is what it printed on the console:
U include/llvm/BasicBlock.h
U include/llvm/GlobalVariable.h
U include/llvm/Support/LLVMBuilder.h
U include/llvm/Instructions.h
U include/llvm/GlobalAlias.h
U include/llvm/Constants.h
U include/llvm/User.h
U include/llvm/InstrTypes.h
U include/llvm/Function.h
U tools/bugpoint/CrashDebugger.cpp
U tools/bugpoint/Miscompilation.cpp
U lib/Analysis/ScalarEvolutionExpander.cpp
U lib/CodeGen/ShadowStackCollector.cpp
U lib/CodeGen/IntrinsicLowering.cpp
U lib/Linker/LinkModules.cpp
U lib/Target/X86/X86TargetAsmInfo.cpp
U lib/Bitcode/Reader/BitcodeReader.cpp
U lib/ExecutionEngine/JIT/JIT.cpp
U lib/VMCore/Instructions.cpp
U lib/VMCore/Constants.cpp
U lib/VMCore/AutoUpgrade.cpp
U lib/VMCore/Function.cpp
U lib/VMCore/Module.cpp
U lib/VMCore/Core.cpp
U lib/VMCore/BasicBlock.cpp
U lib/AsmParser/llvmAsmParser.y
U lib/AsmParser/llvmAsmParser.cpp.cvs
U lib/AsmParser/llvmAsmParser.h.cvs
U lib/AsmParser/llvmAsmParser.y.cvs
U lib/Transforms/Utils/LowerInvoke.cpp
U lib/Transforms/Utils/LCSSA.cpp
U lib/Transforms/Utils/CodeExtractor.cpp
U lib/Transforms/Utils/CloneModule.cpp
U lib/Transforms/Utils/CloneFunction.cpp
U lib/Transforms/Utils/BreakCriticalEdges.cpp
U lib/Transforms/Utils/LowerSwitch.cpp
U lib/Transforms/Utils/SimplifyCFG.cpp
U lib/Transforms/Utils/BasicBlockUtils.cpp
U lib/Transforms/Utils/LowerAllocations.cpp
U lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
U lib/Transforms/Utils/InlineFunction.cpp
U lib/Transforms/Utils/LoopSimplify.cpp
U lib/Transforms/Utils/PromoteMemoryToRegister.cpp
U lib/Transforms/Utils/Local.cpp
U lib/Transforms/Instrumentation/RSProfiling.cpp
U lib/Transforms/Instrumentation/ProfilingUtils.cpp
U lib/Transforms/Scalar/LoopUnswitch.cpp
U lib/Transforms/Scalar/IndVarSimplify.cpp
U lib/Transforms/Scalar/GVNPRE.cpp
U lib/Transforms/Scalar/InstructionCombining.cpp
U lib/Transforms/Scalar/SimplifyCFG.cpp
U lib/Transforms/Scalar/TailRecursionElimination.cpp
U lib/Transforms/Scalar/LoopIndexSplit.cpp
U lib/Transforms/Scalar/LoopStrengthReduce.cpp
U lib/Transforms/Scalar/GCSE.cpp
U lib/Transforms/Scalar/ScalarReplAggregates.cpp
U lib/Transforms/Scalar/SCCP.cpp
U lib/Transforms/Scalar/LoopRotation.cpp
U lib/Transforms/Scalar/GVN.cpp
U lib/Transforms/Scalar/ADCE.cpp
U lib/Transforms/IPO/IndMemRemoval.cpp
U lib/Transforms/IPO/SimplifyLibCalls.cpp
U lib/Transforms/IPO/PruneEH.cpp
U lib/Transforms/IPO/StructRetPromotion.cpp
U lib/Transforms/IPO/ExtractGV.cpp
U lib/Transforms/IPO/LowerSetJmp.cpp
Skipped missing target: 'lib/Transforms/IPO/ExtractFunction.cpp'
U lib/Transforms/IPO/GlobalOpt.cpp
U lib/Transforms/IPO/DeadArgumentElimination.cpp
U lib/Transforms/IPO/ArgumentPromotion.cpp
U lib/Transforms/IPO/RaiseAllocations.cpp
U examples/BrainF/BrainF.cpp
U examples/BrainF/BrainFDriver.cpp
U examples/ParallelJIT/ParallelJIT.cpp
U examples/HowToUseJIT/HowToUseJIT.cpp
U examples/ModuleMaker/ModuleMaker.cpp
U examples/Fibonacci/fibonacci.cpp
Notes:
- I shall take the *.cvs files out of the patch.
- lib/Transforms/IPO/ExtractFunction.cpp seems to have been deleted
from trunk
- GVN.cpp had a compile error due to changes --> I had to manually
change the file
emacs +1224 lib/Transforms/Scalar/GVN.cpp
emacs +1231 lib/Transforms/Scalar/GVN.cpp
- the patch is pretty dull, mostly mechanical changes
- r48837 + this patch builds and the tests run without errors
- I have omitted Create-ifying llvm-upgrade, as it is not on trunk
any more
- Some statistics:
ggreif$ svn diff include > wave1-include.diff
ggreif$ svn diff lib > wave1-lib.diff
ggreif$ svn diff examples tools > wave1-rest.diff
ggreif$ wc *.diff
798 3883 33028 wave1-include.diff
3894 16494 179719 wave1-lib.diff
441 1769 18291 wave1-rest.diff
5133 22146 231038 total
- I cared about
o Tab-freeness
o correct re-indentation
- I did not (yet) care about the 80-column regime
- the explanation of my wave nomenclature is here:
svn cat http(s)://llvm.org/svn/llvm-project/llvm/branches/ggreif/
README
Cheers,
Gabor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wave1-include.diff
Type: application/octet-stream
Size: 33028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080326/4170df6b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wave1-lib.diff
Type: application/octet-stream
Size: 179719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080326/4170df6b/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wave1-rest.diff
Type: application/octet-stream
Size: 18291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080326/4170df6b/attachment-0002.obj>
-------------- next part --------------
More information about the llvm-dev
mailing list