[llvm] f01b62a - [GlobalISel] Fix warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 10:24:13 PST 2024
Author: Kazu Hirata
Date: 2024-12-13T10:24:06-08:00
New Revision: f01b62ad4881e61dc5d84e1faa984917ac43453c
URL: https://github.com/llvm/llvm-project/commit/f01b62ad4881e61dc5d84e1faa984917ac43453c
DIFF: https://github.com/llvm/llvm-project/commit/f01b62ad4881e61dc5d84e1faa984917ac43453c.diff
LOG: [GlobalISel] Fix warnings
This patch fixes:
llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp:167:21: error:
unused variable 'DL' [-Werror,-Wunused-variable]
llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp:320:15: error: unused
variable 'DL' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp
llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp
index 09815e85ea859b..0896038f2d150a 100644
--- a/llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelperCasts.cpp
@@ -164,7 +164,6 @@ bool CombinerHelper::matchTruncateOfExt(const MachineInstr &Root,
bool CombinerHelper::isCastFree(unsigned Opcode, LLT ToTy, LLT FromTy) const {
const TargetLowering &TLI = getTargetLowering();
- const DataLayout &DL = getDataLayout();
LLVMContext &Ctx = getContext();
switch (Opcode) {
diff --git a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
index 08d30db0ca8987..4557b3fbed611e 100644
--- a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
@@ -317,7 +317,6 @@ bool LoadStoreOpt::mergeStores(SmallVectorImpl<GStore *> &StoresToMerge) {
assert(MRI->getType(StoreMI->getValueReg()) == OrigTy);
#endif
- const auto &DL = MF->getFunction().getDataLayout();
bool AnyMerged = false;
do {
unsigned NumPow2 = llvm::bit_floor(StoresToMerge.size());
More information about the llvm-commits
mailing list