[llvm] [Bolt][PVS] Fix passing incorrect argument as default to isStoreUsed (PR #118040)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 16:36:21 PST 2024
https://github.com/AlexErofeev created https://github.com/llvm/llvm-project/pull/118040
Fixes first issue out listed in #116944
Given number of times this method is called, maybe it would make sense to force specifying this parameters explicitly?
>From 12051664b649a8c83703a617c3f6408b128f538e Mon Sep 17 00:00:00 2001
From: Aleksandr Erofeev <a.p.erofeev at gmail.com>
Date: Fri, 29 Nov 2024 00:31:11 +0000
Subject: [PATCH] Fix passing incorrect argument as default to isStoreUsed
---
bolt/lib/Passes/ShrinkWrapping.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bolt/lib/Passes/ShrinkWrapping.cpp b/bolt/lib/Passes/ShrinkWrapping.cpp
index 176321c58dc903..bc4e7e6e386a0e 100644
--- a/bolt/lib/Passes/ShrinkWrapping.cpp
+++ b/bolt/lib/Passes/ShrinkWrapping.cpp
@@ -78,8 +78,8 @@ void CalleeSavedAnalysis::analyzeSaves() {
// probably dealing with a parameter passed in a stack -- do not mess
// with it
if (SRU.isStoreUsed(*FIE,
- Prev ? SRU.expr_begin(*Prev) : SRU.expr_begin(BB)),
- /*IncludeLocalAccesses=*/false) {
+ Prev ? SRU.expr_begin(*Prev) : SRU.expr_begin(BB),
+ /*IncludeLocalAccesses=*/false)) {
BlacklistedRegs.set(FIE->RegOrImm);
CalleeSaved.reset(FIE->RegOrImm);
Prev = &Inst;
More information about the llvm-commits
mailing list