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
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:
This is what it printed on the console:
Skipped missing target: 'lib/Transforms/IPO/ExtractFunction.cpp'
- 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 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
wave1-include.diff (32.3 KB)
wave1-lib.diff (176 KB)
wave1-rest.diff (17.9 KB)