Displaying 2 results from an estimated 2 matches for "restrict_arg".
Did you mean:
restrict_args
2019 Jan 15
4
Aggressive optimization opportunity
Hi,
There are some compilers with a aggressive optimization which restricts
function pointer parameters. Let's say opt restrict_args. When
restrict_args is turned on, compiler will treat all function pointer
parameters as restrict one.
int foo(int * a) + restrict_args opt
equals to:
int foo(int * restrict a)
Here is a complete example:
source code:
extern int num;
int foo(int * a)
{
(*a) = 10;
num++;
(*a)++;
retu...
2019 Jan 15
3
Aggressive optimization opportunity
...lt;czhengsz at cn.ibm.com>; llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] Aggressive optimization opportunity
On 1/15/19 6:07 AM, Zheng CZ Chen via llvm-dev wrote:
Hi,
There are some compilers with a aggressive optimization which restricts function pointer parameters. Let's say opt restrict_args. When restrict_args is turned on, compiler will treat all function pointer parameters as restrict one.
I certainly understand the use case, in a general sense. In my experience, these options are used with (fairly old) pre-C99 code bases (and specifically C, not C++), which follow something aki...