summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-03-08 00:39:51 +0000
committerJustin Bogner <mail@justinbogner.com>2016-03-08 00:39:51 +0000
commit6543a9385f3b22993b313b97a2593f86830d918e (patch)
treeef8ce5d628d7e389ac1db06661b946bbd35bb939 /llvm/lib/CodeGen/MIRParser
parentd655483944a00f0dec07113a0ff8605a7806dc26 (diff)
downloadbcm5719-llvm-6543a9385f3b22993b313b97a2593f86830d918e.tar.gz
bcm5719-llvm-6543a9385f3b22993b313b97a2593f86830d918e.zip
SelectionDAG: Store SDNode operands in an ArrayRecycler
Currently some SDNode operands are malloc'd, some are stored inline in subclasses of SDNode, and some are thrown into a BumpPtrAllocator. This scheme is complex, inconsistent, and makes refactoring SDNodes fairly difficult. Instead, we can allocate all of the operands using an ArrayRecycler that wraps a BumpPtrAllocator. This keeps the cache locality when iterating operands, improves locality when iterating SDNodes without looking at operands, and vastly simplifies the ownership semantics. It also means we stop overallocating SDNodes by 2-3x and will make it simpler to fix the rampant undefined behaviour we have in how we mutate SDNodes from one kind to another (See llvm.org/pr26808). This is NFC other than the changes in memory behaviour, and I ran some LNT tests to make sure this didn't hurt compile time. Not many tests changed: there were a couple of 1-2% regressions reported, but there were more improvements (of up to 4%) than regressions. llvm-svn: 262886
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud