[llvm] 5642ce5 - [GlobalOpt] Drop redundant setExternallyInitialized() call (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 00:43:46 PST 2022
Author: Nikita Popov
Date: 2022-01-12T09:42:58+01:00
New Revision: 5642ce5ac227e35b84b459ef3b04f45b987fe262
URL: https://github.com/llvm/llvm-project/commit/5642ce5ac227e35b84b459ef3b04f45b987fe262
DIFF: https://github.com/llvm/llvm-project/commit/5642ce5ac227e35b84b459ef3b04f45b987fe262.diff
LOG: [GlobalOpt] Drop redundant setExternallyInitialized() call (NFC)
This is part of copyAttributesFrom().
Added:
Modified:
llvm/lib/Transforms/IPO/GlobalOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 4cc00f181f5d..82800a5ba957 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -513,7 +513,6 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV, const DataLayout &DL) {
ElTy, false, GlobalVariable::InternalLinkage, In,
GV->getName() + "." + Twine(ElementIdx), GV->getThreadLocalMode(),
GV->getType()->getAddressSpace());
- NGV->setExternallyInitialized(GV->isExternallyInitialized());
NGV->copyAttributesFrom(GV);
NewGlobals.insert(std::make_pair(ElementIdx, NGV));
More information about the llvm-commits
mailing list