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)
commiteba7f73ff953c4b8d4e26abbc9d4e76142b8fb8c
tree4838b6258e3bbfa686e093526239a2cdfc058a81
parent66bc9080d6d5ef4904f25d70c374a3dc2c218c9f
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

llvm-svn: 230540
llvm/include/llvm/Transforms/IPO/LowerBitSets.h
llvm/lib/Transforms/IPO/LowerBitSets.cpp
llvm/test/Transforms/LowerBitSets/layout.ll
llvm/test/Transforms/LowerBitSets/simple.ll
llvm/test/Transforms/LowerBitSets/single-offset.ll
llvm/unittests/Transforms/IPO/LowerBitSets.cpp