public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000.
@ 2023-02-23  9:29 Lulu Cheng
  2023-02-27  1:27 ` [pushed][PATCH " Lulu Cheng
  0 siblings, 1 reply; 2+ messages in thread
From: Lulu Cheng @ 2023-02-23  9:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: xry111, i, xuchenghua, Lulu Cheng

The PCH mechanism first tries to map the .gch file to the virtual memory
space pointed to by TRY_EMPTY_VM_SPACE during the compilation process.

The original value of TRY_EMPTY_VM_SPACE macro is 0x8000000000,
but like la464 only has 40 bits of virtual address space, this value
just exceeds the address range.

If we want to support chips with less than 40 bits virtual addresses,
then the value of this macro needs to be set small. I think setting
this value small will increase the probability of virtual address
mapping failure. And the purpose of pch is to make compilation faster,
but I think we rarely compile on embedded systems. So this situation
may not be within our consideration.

So change the value of this macro to 0x1000000000.

gcc/ChangeLog:

	* config/host-linux.cc (TRY_EMPTY_VM_SPACE): Modify the value of
	the macro to 0x1000000000.
---
 gcc/config/host-linux.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/host-linux.cc b/gcc/config/host-linux.cc
index a891651a7b6..d1aa7ab28ca 100644
--- a/gcc/config/host-linux.cc
+++ b/gcc/config/host-linux.cc
@@ -99,7 +99,7 @@
 #elif defined(__riscv) && defined (__LP64__)
 # define TRY_EMPTY_VM_SPACE	0x1000000000
 #elif defined(__loongarch__) && defined(__LP64__)
-# define TRY_EMPTY_VM_SPACE	0x8000000000
+# define TRY_EMPTY_VM_SPACE	0x1000000000
 #else
 # define TRY_EMPTY_VM_SPACE	0
 #endif
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pushed][PATCH v2] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000.
  2023-02-23  9:29 [PATCH v2] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000 Lulu Cheng
@ 2023-02-27  1:27 ` Lulu Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Lulu Cheng @ 2023-02-27  1:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: xry111, i, xuchenghua

Pushed to r13-6353.

在 2023/2/23 下午5:29, Lulu Cheng 写道:
> The PCH mechanism first tries to map the .gch file to the virtual memory
> space pointed to by TRY_EMPTY_VM_SPACE during the compilation process.
>
> The original value of TRY_EMPTY_VM_SPACE macro is 0x8000000000,
> but like la464 only has 40 bits of virtual address space, this value
> just exceeds the address range.
>
> If we want to support chips with less than 40 bits virtual addresses,
> then the value of this macro needs to be set small. I think setting
> this value small will increase the probability of virtual address
> mapping failure. And the purpose of pch is to make compilation faster,
> but I think we rarely compile on embedded systems. So this situation
> may not be within our consideration.
>
> So change the value of this macro to 0x1000000000.
>
> gcc/ChangeLog:
>
> 	* config/host-linux.cc (TRY_EMPTY_VM_SPACE): Modify the value of
> 	the macro to 0x1000000000.
> ---
>   gcc/config/host-linux.cc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/host-linux.cc b/gcc/config/host-linux.cc
> index a891651a7b6..d1aa7ab28ca 100644
> --- a/gcc/config/host-linux.cc
> +++ b/gcc/config/host-linux.cc
> @@ -99,7 +99,7 @@
>   #elif defined(__riscv) && defined (__LP64__)
>   # define TRY_EMPTY_VM_SPACE	0x1000000000
>   #elif defined(__loongarch__) && defined(__LP64__)
> -# define TRY_EMPTY_VM_SPACE	0x8000000000
> +# define TRY_EMPTY_VM_SPACE	0x1000000000
>   #else
>   # define TRY_EMPTY_VM_SPACE	0
>   #endif


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-27  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23  9:29 [PATCH v2] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000 Lulu Cheng
2023-02-27  1:27 ` [pushed][PATCH " Lulu Cheng

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 read-only IMAP folder(s) and NNTP newsgroup(s).