aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2024-09-02 09:56:56 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2024-09-02 09:56:56 +0100
commit2865719efb16e9f199b332fcf06d69c98928738e (patch)
tree890b80db9d4954ac24a7d42fb4386896766f91e4
parenta4b6c6ab0ba04a4fa409608a860067770317d0de (diff)
downloadgcc-2865719efb16e9f199b332fcf06d69c98928738e.zip
gcc-2865719efb16e9f199b332fcf06d69c98928738e.tar.gz
gcc-2865719efb16e9f199b332fcf06d69c98928738e.tar.bz2
Rename gimple_asm_input_p to gimple_asm_basic_p
Following on from the earlier tree rename, this patch renames gimple_asm_input_p to gimple_asm_basic_p, and similarly for related names. gcc/ * doc/gimple.texi (gimple_asm_basic_p): Document. (gimple_asm_set_basic): Likewise. * gimple.h (GF_ASM_INPUT): Rename to... (GF_ASM_BASIC): ...this. (gimple_asm_set_input): Rename to... (gimple_asm_set_basic): ...this. (gimple_asm_input_p): Rename to... (gimple_asm_basic_p): ...this. * cfgexpand.cc (expand_asm_stmt): Update after above renaming. * gimple.cc (gimple_asm_clobbers_memory_p): Likewise. * gimplify.cc (gimplify_asm_expr): Likewise. * ipa-icf-gimple.cc (func_checker::compare_gimple_asm): Likewise. * tree-cfg.cc (stmt_can_terminate_bb_p): Likewise.
-rw-r--r--gcc/cfgexpand.cc2
-rw-r--r--gcc/doc/gimple.texi9
-rw-r--r--gcc/gimple.cc2
-rw-r--r--gcc/gimple.h19
-rw-r--r--gcc/gimplify.cc2
-rw-r--r--gcc/ipa-icf-gimple.cc2
-rw-r--r--gcc/tree-cfg.cc2
7 files changed, 24 insertions, 14 deletions
diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc
index 13f8c08..f32cf1b 100644
--- a/gcc/cfgexpand.cc
+++ b/gcc/cfgexpand.cc
@@ -3121,7 +3121,7 @@ expand_asm_stmt (gasm *stmt)
location_t locus = gimple_location (stmt);
- if (gimple_asm_input_p (stmt))
+ if (gimple_asm_basic_p (stmt))
{
const char *s = gimple_asm_string (stmt);
tree string = build_string (strlen (s), s);
diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi
index 5f241b1..d8aaca2 100644
--- a/gcc/doc/gimple.texi
+++ b/gcc/doc/gimple.texi
@@ -1112,6 +1112,15 @@ Return the string representing the assembly instruction in
@code{GIMPLE_ASM} @code{G}.
@end deftypefn
+@deftypefn {GIMPLE function} bool gimple_asm_basic_p (const gasm *g)
+Return true if @code{G} is a basic asm rather than an extended asm.
+@end deftypefn
+
+@deftypefn {GIMPLE function} void gimple_asm_set_basic (gasm *g, bool basic_p)
+Mark asm statement @code{G} as a basic asm or an extended asm based on
+@code{BASIC_P}.
+@end deftypefn
+
@deftypefn {GIMPLE function} bool gimple_asm_volatile_p (const gasm *g)
Return true if @code{G} is an asm statement marked volatile.
@end deftypefn
diff --git a/gcc/gimple.cc b/gcc/gimple.cc
index a9f968c..6e28cf2 100644
--- a/gcc/gimple.cc
+++ b/gcc/gimple.cc
@@ -2944,7 +2944,7 @@ gimple_asm_clobbers_memory_p (const gasm *stmt)
}
/* Non-empty basic ASM implicitly clobbers memory. */
- if (gimple_asm_input_p (stmt) && strlen (gimple_asm_string (stmt)) != 0)
+ if (gimple_asm_basic_p (stmt) && strlen (gimple_asm_string (stmt)) != 0)
return true;
return false;
diff --git a/gcc/gimple.h b/gcc/gimple.h
index bd315ff..ee986ea 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -135,7 +135,7 @@ enum gimple_rhs_class
Keep this list sorted. */
enum gf_mask {
- GF_ASM_INPUT = 1 << 0,
+ GF_ASM_BASIC = 1 << 0,
GF_ASM_VOLATILE = 1 << 1,
GF_ASM_INLINE = 1 << 2,
GF_CALL_FROM_THUNK = 1 << 0,
@@ -4227,24 +4227,25 @@ gimple_asm_set_inline (gasm *asm_stmt, bool inline_p)
}
-/* If INPUT_P is true, mark asm ASM_STMT as an ASM_INPUT. */
+/* Mark whether asm ASM_STMT is a basic asm or an extended asm, based on
+ BASIC_P. */
inline void
-gimple_asm_set_input (gasm *asm_stmt, bool input_p)
+gimple_asm_set_basic (gasm *asm_stmt, bool basic_p)
{
- if (input_p)
- asm_stmt->subcode |= GF_ASM_INPUT;
+ if (basic_p)
+ asm_stmt->subcode |= GF_ASM_BASIC;
else
- asm_stmt->subcode &= ~GF_ASM_INPUT;
+ asm_stmt->subcode &= ~GF_ASM_BASIC;
}
-/* Return true if asm ASM_STMT is an ASM_INPUT. */
+/* Return true if asm ASM_STMT is a basic asm rather than an extended asm. */
inline bool
-gimple_asm_input_p (const gasm *asm_stmt)
+gimple_asm_basic_p (const gasm *asm_stmt)
{
- return (asm_stmt->subcode & GF_ASM_INPUT) != 0;
+ return (asm_stmt->subcode & GF_ASM_BASIC) != 0;
}
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index f0edb4f..9300138 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -7352,7 +7352,7 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
ASM_VOLATILE_P (expr)
|| noutputs == 0
|| labels);
- gimple_asm_set_input (stmt, ASM_BASIC_P (expr));
+ gimple_asm_set_basic (stmt, ASM_BASIC_P (expr));
gimple_asm_set_inline (stmt, ASM_INLINE_P (expr));
gimplify_seq_add_stmt (pre_p, stmt);
diff --git a/gcc/ipa-icf-gimple.cc b/gcc/ipa-icf-gimple.cc
index 4c3174b..31f6cdb 100644
--- a/gcc/ipa-icf-gimple.cc
+++ b/gcc/ipa-icf-gimple.cc
@@ -986,7 +986,7 @@ func_checker::compare_gimple_asm (const gasm *g1, const gasm *g2)
if (gimple_asm_volatile_p (g1) != gimple_asm_volatile_p (g2))
return false;
- if (gimple_asm_input_p (g1) != gimple_asm_input_p (g2))
+ if (gimple_asm_basic_p (g1) != gimple_asm_basic_p (g2))
return false;
if (gimple_asm_inline_p (g1) != gimple_asm_inline_p (g2))
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index e6fd129..fcb488d 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -8887,7 +8887,7 @@ stmt_can_terminate_bb_p (gimple *t)
}
if (gasm *asm_stmt = dyn_cast <gasm *> (t))
- if (gimple_asm_volatile_p (asm_stmt) || gimple_asm_input_p (asm_stmt))
+ if (gimple_asm_volatile_p (asm_stmt) || gimple_asm_basic_p (asm_stmt))
return true;
return false;