[GMR] Switch the function info we store for every function to be a much
authorChandler Carruth <chandlerc@gmail.com>
Thu, 23 Jul 2015 07:50:52 +0000 (07:50 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 23 Jul 2015 07:50:52 +0000 (07:50 +0000)
commitcaabac7978887b5492d9b42537292c22cc188ea9
treed41821f80f17dc4a034ab6ac8c098cbe0953ffd2
parentcb8fe113a34cf0d4ac7ae63d9280992aa66b076b
[GMR] Switch the function info we store for every function to be a much
more dense datastructure. We actually only have 3 bits of information
and an often-null pointer here. This fits very nicely into a
pointer-size value in the DenseMap from Function -> Info. Then we take
one more pointer hop to get to a secondary DenseMap from GlobalValue ->
ModRefInfo when we actually have precise info for particular globals.

This is more code than I would really like to do this packing, but it
ended up reasonably cleanly laid out. It should ensure we don't hit
scaling limitations with more widespread use of GMR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242991 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/GlobalsModRef.cpp