From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Christopher Li <sparse@chrisli.org>,
Dibyendu Majumdar <mobile@majumdar.org.uk>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [RFC PATCH 3/4] rename 'simple_{var,access}' by promatable_...'
Date: Fri, 18 Aug 2017 00:35:57 +0200 [thread overview]
Message-ID: <20170817223558.21258-4-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170817223558.21258-1-luc.vanoostenryck@gmail.com>
---
linearize.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/linearize.c b/linearize.c
index 63c896fc7..485d8eeec 100644
--- a/linearize.c
+++ b/linearize.c
@@ -955,7 +955,7 @@ static int linearize_address_gen(struct entrypoint *ep,
/*
* Is it possible and desirable for this to be promoted to a pseudo?
*/
-static inline int is_simple_type(struct symbol *type)
+static inline int is_promotable(struct symbol *type)
{
if (type->type == SYM_NODE)
type = type->ctype.base_type;
@@ -979,7 +979,7 @@ static inline int is_simple_type(struct symbol *type)
}
#define MOD_NONREG (MOD_STATIC|MOD_NONLOCAL|MOD_ADDRESSABLE|MOD_VOLATILE)
-static inline struct symbol *simple_access(struct access_data *ad)
+static inline struct symbol *promotable_access(struct access_data *ad)
{
pseudo_t addr = ad->address;
struct symbol *sym;
@@ -989,7 +989,7 @@ static inline struct symbol *simple_access(struct access_data *ad)
sym = addr->sym;
if (sym->ctype.modifiers & MOD_NONREG)
return NULL;
- if (!is_simple_type(sym))
+ if (!is_promotable(sym))
return NULL;
return sym;
}
@@ -1003,7 +1003,7 @@ static pseudo_t add_load(struct entrypoint *ep, struct access_data *ad)
if (!bb)
return VOID;
- if ((var = simple_access(ad))) {
+ if ((var = promotable_access(ad))) {
new = load_var(bb, var);
return new;
}
@@ -1027,7 +1027,7 @@ static void add_store(struct entrypoint *ep, struct access_data *ad, pseudo_t va
if (!bb)
return;
- if ((var = simple_access(ad))) {
+ if ((var = promotable_access(ad))) {
store_var(bb, var, value);
return;
}
--
2.14.0
next prev parent reply other threads:[~2017-08-17 22:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 22:35 [RFC PATCH 0/4] simple, registrable, promotable & friends Luc Van Oostenryck
2017-08-17 22:35 ` [RFC PATCH 2/4] fold is_simple_var() into simple_access() Luc Van Oostenryck
2017-08-17 22:35 ` Luc Van Oostenryck [this message]
2017-08-17 22:35 ` [RFC PATCH 4/4] fix promotion of struct & union Luc Van Oostenryck
2017-08-19 11:28 ` [RFC PATCH 0/4] simple, registrable, promotable & friends Christopher Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170817223558.21258-4-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=mobile@majumdar.org.uk \
--cc=sparse@chrisli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).