LowerBitSets: Align referenced globals.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Feb 2015 20:42:41 +0000 (20:42 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Feb 2015 20:42:41 +0000 (20:42 +0000)
commitd63e5ad9c5a14cc8dea5c82c91bea9f9ccf631f2
treec0ea7c27a1bbb3acc6ef178c19457f24811f85ea
parent814efef67f2ee0245efce0cbfa52e70ca8498ba6
LowerBitSets: Align referenced globals.

This change aligns globals to the next highest power of 2 bytes, up to a
maximum of 128. This makes it more likely that we will be able to compress
bit sets with a greater alignment. In many more cases, we can now take
advantage of a new optimization also introduced in this patch that removes
bit set checks if the bit set is all ones.

The 128 byte maximum was found to provide the best tradeoff between instruction
overhead and data overhead in a recent build of Chromium. It allows us to
remove ~2.4MB of instructions at the cost of ~250KB of data.

Differential Revision: http://reviews.llvm.org/D7873

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230540 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/IPO/LowerBitSets.h
lib/Transforms/IPO/LowerBitSets.cpp
test/Transforms/LowerBitSets/layout.ll
test/Transforms/LowerBitSets/simple.ll
test/Transforms/LowerBitSets/single-offset.ll
unittests/Transforms/IPO/LowerBitSets.cpp