Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
4f942779
Commit
4f942779
authored
Sep 23, 2014
by
Renlin Li
Committed by
Marcus Shawcroft
Sep 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AArch64] Enable shrink wrapping.
From-SVN: r215508
parent
de72c50f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
3 deletions
+50
-3
gcc/ChangeLog
+7
-0
gcc/config/aarch64/aarch64-protos.h
+1
-0
gcc/config/aarch64/aarch64.c
+20
-0
gcc/config/aarch64/aarch64.md
+13
-0
gcc/testsuite/ChangeLog
+6
-0
gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
+1
-1
gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
+1
-1
gcc/testsuite/gcc.dg/pr10474.c
+1
-1
No files found.
gcc/ChangeLog
View file @
4f942779
2014
-
09
-
23
Renlin
Li
<
renlin
.
li
@
arm
.
com
>
*
config
/
aarch64
/
aarch64
.
md
(
return
):
New
.
(
simple_return
):
Likewise
.
*
config
/
aarch64
/
aarch64
.
c
(
aarch64_use_return_insn_p
):
New
.
*
config
/
aarch64
/
aarch64
-
protos
.
h
(
aarch64_use_return_insn_p
):
New
.
2014
-
09
-
23
Wilco
Dijkstra
<
wdijkstr
@
arm
.
com
>
2014
-
09
-
23
Wilco
Dijkstra
<
wdijkstr
@
arm
.
com
>
*
common
/
config
/
aarch64
/
aarch64
-
common
.
c
:
*
common
/
config
/
aarch64
/
aarch64
-
common
.
c
:
gcc/config/aarch64/aarch64-protos.h
View file @
4f942779
...
@@ -213,6 +213,7 @@ bool aarch64_simd_valid_immediate (rtx, enum machine_mode, bool,
...
@@ -213,6 +213,7 @@ bool aarch64_simd_valid_immediate (rtx, enum machine_mode, bool,
struct
simd_immediate_info
*
);
struct
simd_immediate_info
*
);
bool
aarch64_symbolic_address_p
(
rtx
);
bool
aarch64_symbolic_address_p
(
rtx
);
bool
aarch64_uimm12_shift
(
HOST_WIDE_INT
);
bool
aarch64_uimm12_shift
(
HOST_WIDE_INT
);
bool
aarch64_use_return_insn_p
(
void
);
const
char
*
aarch64_output_casesi
(
rtx
*
);
const
char
*
aarch64_output_casesi
(
rtx
*
);
const
char
*
aarch64_rewrite_selected_cpu
(
const
char
*
name
);
const
char
*
aarch64_rewrite_selected_cpu
(
const
char
*
name
);
...
...
gcc/config/aarch64/aarch64.c
View file @
4f942779
...
@@ -2340,6 +2340,26 @@ aarch64_expand_prologue (void)
...
@@ -2340,6 +2340,26 @@ aarch64_expand_prologue (void)
}
}
}
}
/* Return TRUE if we can use a simple_return insn.
This function checks whether the callee saved stack is empty, which
means no restore actions are need. The pro_and_epilogue will use
this to check whether shrink-wrapping opt is feasible. */
bool
aarch64_use_return_insn_p
(
void
)
{
if
(
!
reload_completed
)
return
false
;
if
(
crtl
->
profile
)
return
false
;
aarch64_layout_frame
();
return
cfun
->
machine
->
frame
.
frame_size
==
0
;
}
/* Generate the epilogue instructions for returning from a function. */
/* Generate the epilogue instructions for returning from a function. */
void
void
aarch64_expand_epilogue
(
bool
for_sibcall
)
aarch64_expand_epilogue
(
bool
for_sibcall
)
...
...
gcc/config/aarch64/aarch64.md
View file @
4f942779
...
@@ -360,6 +360,19 @@
...
@@ -360,6 +360,19 @@
[
(set_attr "type" "branch")
]
[
(set_attr "type" "branch")
]
)
)
(define_expand "return"
[
(simple_return)
]
"aarch64_use_return_insn_p ()"
""
)
(define_insn "simple_return"
[
(simple_return)
]
""
"ret"
[
(set_attr "type" "branch")
]
)
(define_insn "eh_return"
(define_insn "eh_return"
[
(unspec_volatile [(match_operand:DI 0 "register_operand" "r")
]
[
(unspec_volatile [(match_operand:DI 0 "register_operand" "r")
]
UNSPECV_EH_RETURN)]
UNSPECV_EH_RETURN)]
...
...
gcc/testsuite/ChangeLog
View file @
4f942779
2014
-
09
-
24
Renlin
Li
<
renlin
.
li
@
arm
.
com
>
*
gcc
.
dg
/
ira
-
shrinkwrap
-
prep
-
1.
c
:
Enable
aarch64
.
*
gcc
.
dg
/
ira
-
shrinkwrap
-
prep
-
2.
c
:
Likewise
.
*
gcc
.
dg
/
pr10474
.
c
:
Likewise
.
2014
-
09
-
20
Mark
Wielaard
<
mjw
@
redhat
.
com
>
2014
-
09
-
20
Mark
Wielaard
<
mjw
@
redhat
.
com
>
*
gcc
.
dg
/
guality
/
const
-
volatile
.
c
(
i
):
Mark
as
used
.
*
gcc
.
dg
/
guality
/
const
-
volatile
.
c
(
i
):
Mark
as
used
.
...
...
gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
View file @
4f942779
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } ||
arm_nothumb
} } } } */
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } ||
{ arm_nothumb || { aarch64*-*-* && lp64 } }
} } } } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
long
__attribute__
((
noinline
,
noclone
))
long
__attribute__
((
noinline
,
noclone
))
...
...
gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
View file @
4f942779
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } ||
arm_nothumb
} } } } */
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } ||
{ arm_nothumb || { aarch64*-*-* && lp64 } }
} } } } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue -fno-use-caller-save" } */
long
__attribute__
((
noinline
,
noclone
))
long
__attribute__
((
noinline
,
noclone
))
...
...
gcc/testsuite/gcc.dg/pr10474.c
View file @
4f942779
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } ||
arm_nothumb
} } } } */
/* { dg-do compile { target { { x86_64-*-* && lp64 } || { { powerpc*-*-* && lp64 } ||
{ arm_nothumb || { aarch64*-*-* && lp64 } }
} } } } */
/* { dg-options "-O3 -fdump-rtl-pro_and_epilogue" } */
/* { dg-options "-O3 -fdump-rtl-pro_and_epilogue" } */
void
f
(
int
*
i
)
void
f
(
int
*
i
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment