2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: shrink-wrapping separate components
8 .. _shrink-wrapping-separate-components:
10 Shrink-wrapping separate components
11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 The prologue may perform a variety of target dependent tasks such as
14 saving callee-saved registers, saving the return address, aligning the
15 stack, creating a stack frame, initializing the PIC register, setting
16 up the static chain, etc.
18 On some targets some of these tasks may be independent of others and
19 thus may be shrink-wrapped separately. These independent tasks are
20 referred to as components and are handled generically by the target
21 independent parts of GCC.
23 Using the following hooks those prologue or epilogue components can be
24 shrink-wrapped separately, so that the initialization (and possibly
25 teardown) those components do is not done as frequently on execution
26 paths where this would unnecessary.
28 What exactly those components are is up to the target code; the generic
29 code treats them abstractly, as a bit in an ``sbitmap``. These
30 ``sbitmap`` s are allocated by the ``shrink_wrap.get_separate_components``
31 and ``shrink_wrap.components_for_bb`` hooks, and deallocated by the
34 .. include:: ../tm.rst.in
35 :start-after: [TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS]
36 :end-before: [TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS]
39 .. include:: ../tm.rst.in
40 :start-after: [TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB]
41 :end-before: [TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB]
44 .. include:: ../tm.rst.in
45 :start-after: [TARGET_SHRINK_WRAP_DISQUALIFY_COMPONENTS]
46 :end-before: [TARGET_SHRINK_WRAP_DISQUALIFY_COMPONENTS]
49 .. include:: ../tm.rst.in
50 :start-after: [TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS]
51 :end-before: [TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS]
54 .. include:: ../tm.rst.in
55 :start-after: [TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS]
56 :end-before: [TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS]
59 .. include:: ../tm.rst.in
60 :start-after: [TARGET_SHRINK_WRAP_SET_HANDLED_COMPONENTS]
61 :end-before: [TARGET_SHRINK_WRAP_SET_HANDLED_COMPONENTS]