OSDN Git Service

GlobalStatus: Don't walk use-lists of ConstantData
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 24 Sep 2016 02:30:11 +0000 (02:30 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 24 Sep 2016 02:30:11 +0000 (02:30 +0000)
commitc1ce9acb644de2cbc743b8756629b70419c34c8e
treeb648b6f614ccb1605cfaa45e8a4df3de4f64a97c
parente2e54904b734dfb130584a030acd4b2c632402d6
GlobalStatus: Don't walk use-lists of ConstantData

Return early from llvm::isSafeToDestroyConstant() whenever the value
`isa<ConstantData>()`.  These constants are shared across the
LLVMContext.  We never really want to delete them here, and walking
their use-lists can be very expensive.

(This is motivated by an eventual goal of removing use-lists entirely
from ConstantData.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282320 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/GlobalStatus.cpp