[GlobalOpt] Use more specific type (NFC)
authorNikita Popov <npopov@redhat.com>
Thu, 2 Mar 2023 10:45:27 +0000 (11:45 +0100)
committerNikita Popov <npopov@redhat.com>
Thu, 2 Mar 2023 10:45:27 +0000 (11:45 +0100)
SRA always works on GlobalVariables.

llvm/lib/Transforms/IPO/GlobalOpt.cpp

index 25dc748..d1e4203 100644 (file)
@@ -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) {