summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-03 20:17:45 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-03 20:17:45 +0000
commitc6065e3a25560e683ed0e752181e167f96576a1a (patch)
tree47b254d168c2fcb54915b1bd81f9ac63d7db66ba /llvm/lib/Target/X86/X86ISelLowering.cpp
parent151ae32dba245f1052e99a7f40757bdb867f24dd (diff)
downloadbcm5719-llvm-c6065e3a25560e683ed0e752181e167f96576a1a.tar.gz
bcm5719-llvm-c6065e3a25560e683ed0e752181e167f96576a1a.zip
ValueMapper: Avoid recursion in mapSimplifiedMetadata, NFC
The main change is to delay materializing GlobalValue initializers from Mapper::mapValue until Mapper::~Mapper. This effectively removes all recursion from mapSimplifiedMetadata, as promised in r265270. mapSimplifiedMetadata calls mapValue for ConstantAsMetadata nodes to find the mapped constant, and now it shouldn't be possible for mapValue to indirectly re-invoke mapMetadata. I'll add an assertion to that effect in a follow-up (separated so that the assertion can easily be reverted independently, if it comes to that). This a step toward a broader goal: converting Mapper::mapMetadataImpl from a recursive to an iterative algorithm. When a BlockAddress points at a BasicBlock inside an unmaterialized function body, we need to delay it until the function body is materialized in Mapper::~Mapper. This commit creates a temporary BasicBlock and returns a new BlockAddress, then RAUWs the BasicBlock once it is known. This situation should be extremely rare since a BlockAddress is usually used from within the function it's referencing (and BlockAddress itself is rare). There should be no observable functionality change. llvm-svn: 265273
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud