Devirtualize and pack MCFragment to reduce memory usage.
authorPete Cooper <peter_cooper@apple.com>
Wed, 17 Jun 2015 22:01:28 +0000 (22:01 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 17 Jun 2015 22:01:28 +0000 (22:01 +0000)
commitc821cef8828c2491dec7ee6e1b6cc11c084ad45e
treed3b1bf9eca837719b15f862e0e2717b7113888a0
parent4278cac3c496c04409832f8577d7e3381fa0c3e3
Devirtualize and pack MCFragment to reduce memory usage.

MCFragment didn't really need vtables.  The majority of virtual methods were just getters and setters.

This removes the vtables and uses dispatch on the kind to do things like delete which needs to
get the appropriate class.

This reduces memory on the verify use list order test case by about 2MB out of 800MB.

Reviewed by Rafael EspĂ­ndola

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239952 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCAssembler.h
include/llvm/MC/MCELFStreamer.h
include/llvm/MC/MCSection.h
lib/MC/MCAssembler.cpp
lib/MC/MCELFStreamer.cpp