[llvm] 0ecef88 - [GlobalOpt] Use more specific type (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 02:56:03 PST 2023
Author: Nikita Popov
Date: 2023-03-02T11:45:27+01:00
New Revision: 0ecef88cb167dbd19023a932e7abac09059c3e4e
URL: https://github.com/llvm/llvm-project/commit/0ecef88cb167dbd19023a932e7abac09059c3e4e
DIFF: https://github.com/llvm/llvm-project/commit/0ecef88cb167dbd19023a932e7abac09059c3e4e.diff
LOG: [GlobalOpt] Use more specific type (NFC)
SRA always works on GlobalVariables.
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 25dc748991c3..d1e4203ec80b 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -349,7 +349,7 @@ struct GlobalPart {
/// Look at all uses of the global and determine which (offset, type) pairs it
/// can be split into.
static bool collectSRATypes(DenseMap<uint64_t, GlobalPart> &Parts,
- GlobalValue *GV, const DataLayout &DL) {
+ GlobalVariable *GV, const DataLayout &DL) {
SmallVector<Use *, 16> Worklist;
SmallPtrSet<Use *, 16> Visited;
auto AppendUses = [&](Value *V) {
More information about the llvm-commits
mailing list