On Tue, Jul 6, 2021 at 9:37 AM Hongtao Liu <[email protected]> wrote:
>
> On Tue, Jul 6, 2021 at 7:31 AM Segher Boessenkool
> <[email protected]> wrote:
> >
> > Hi!
> >
> > I ran into this in shrink-wrap.c today.
> >
> > On Thu, Jun 03, 2021 at 02:54:07PM +0800, liuhongt via Gcc-patches wrote:
> > > Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a
> > > fake call, it won't have its own function stack.
> >
> > Could you document somewhere what a "fake call" *is*? Including what
> > that means to RTL, how this is expected to be used, etc.? In rtl.h is
> fake call is used for TARGET_INSN_CALLEE_ABI, i'll add comments for
> #define FAKE_CALL_P(RTX) in rtl.h
Here's the patch I'm going to check in.
Document FAKE_CALL_P in comments.
gcc/ChangeLog:
* rtl.h (FAKE_CALL_P): Add comments for FAKE_CALL_P.
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 5ed0d6dd6fa..9afc60f08d8 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -840,7 +840,13 @@ struct GTY(()) rtvec_def {
#define CALL_P(X) (GET_CODE (X) == CALL_INSN)
/* 1 if RTX is a call_insn for a fake call.
- CALL_INSN use "used" flag to indicate it's a fake call. */
+ CALL_INSN use "used" flag to indicate it's a fake call.
+ Used by the x86 vzeroupper instruction,
+ in order to solve the problem of partial clobber registers,
+ vzeroupper is defined as a call_insn with a special callee_abi,
+ but it is not a real call and therefore has no function stack
+ of its own.
+ NB: FAKE_CALL_P is not handled thoroughly in the RTL. */
#define FAKE_CALL_P(RTX) \
(RTL_FLAG_CHECK1 ("FAKE_CALL_P", (RTX), CALL_INSN)->used)
--
BR,
Hongtao