webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Macros | Typedefs | Functions | Variables
gcc-loops.cpp File Reference
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <iostream>
#include <vector>
#include <numeric>

Classes

struct  A
 
class  Timer< TimerFiredClass >
 

Macros

#define N   1024
 
#define M   32
 
#define K   4
 
#define ALIGNED16   __attribute__((aligned(16)))
 
#define BENCH(NAME, RUN_LINE, ITER, DIGEST_LINE)
 

Typedefs

typedef int aint __attribute__((__aligned__(16))) = (double)0.
 

Functions

 __attribute__ ((noinline)) void example1()
 
 for (i=0;i< n;i++)
 
 while (n--)
 
 for (i=n-1;i >=0;i--) a+
 
void init_memory (void *start, void *end)
 
void init_memory_float (float *start, float *end)
 
unsigned digest_memory (void *start, void *end)
 
int main (int argc, char *argv[])
 

Variables

unsigned short usa [N]
 
short sa [N]
 
short sb [N]
 
short sc [N]
 
unsigned int ua [N]
 
int ia [NALIGNED16
 
unsigned int ub [N]
 
unsigned int uc [N]
 
float fa [N]
 
float fb [N]
 
float da [N]
 
float db [N]
 
float dc [N]
 
float dd [N]
 
int dj [N]
 
struct A s
 
int x
 
aint *__restrict__ p
 
aint *__restrict__ aint *__restrict q
 
short *__restrict__ short *__restrict__ int *__restrict__ ia
 
short *__restrict__ short *__restrict__ int *__restrict__ int *__restrict__ ib
 
short *__restrict__ short *__restrict__ int *__restrict__ int *__restrict__ int *__restrict__ ic
 
int ** B
 
int int * out
 
int ** coeff
 
int n
 
 b [0] = a
 
unsigned int * dst
 
short y
 

Macro Definition Documentation

◆ ALIGNED16

#define ALIGNED16   __attribute__((aligned(16)))

◆ BENCH

#define BENCH (   NAME,
  RUN_LINE,
  ITER,
  DIGEST_LINE 
)
Value:
{\
RUN_LINE;\
Timer atimer(NAME, print_times);\
for (int i=0; i < (ITER); ++i) RUN_LINE;\
unsigned r = DIGEST_LINE;\
results.push_back(r);\
}
for i
Definition: complexityMeasures.m:24
GLboolean r
Definition: gl2ext.h:306

◆ K

#define K   4

◆ M

#define M   32

◆ N

#define N   1024

This test contains some of the loops from the GCC vectrorizer example page [1]. Dorit Nuzman who developed the gcc vectorizer said that we can use them in our test suite.

[1] - http://gcc.gnu.org/projects/tree-ssa/vectorization.html

Typedef Documentation

◆ __attribute__

__attribute__ = (double)0.

Function Documentation

◆ __attribute__()

__attribute__ ( (noinline)  )

◆ digest_memory()

unsigned digest_memory ( void start,
void end 
)

◆ for() [1/2]

for ( )

◆ for() [2/2]

for ( i  = n-1;i >=0;i--)

◆ init_memory()

void init_memory ( void start,
void end 
)

◆ init_memory_float()

void init_memory_float ( float *  start,
float *  end 
)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ while()

while ( n--  )

Variable Documentation

◆ ALIGNED16

int d [N*2] ALIGNED16

◆ B

int** B

◆ b

b[0] = a

◆ coeff

int** coeff

◆ da

float da[N]

◆ db

float db[N]

◆ dc

float dc[N]

◆ dd

float dd[N]

◆ dj

int dj[N]

◆ dst

unsigned int* dst
Initial value:
{
int i
for i
Definition: complexityMeasures.m:24

◆ fa

float fa[N]

◆ fb

float fb[N]

◆ ia

short *__restrict__ short *__restrict__ int *__restrict__ ia

◆ ib

short *__restrict__ short *__restrict__ int *__restrict__ int *__restrict__ ib

◆ ic

short *__restrict__ short *__restrict__ int *__restrict__ int *__restrict__ int *__restrict__ ic
Initial value:
{
int i
for i
Definition: complexityMeasures.m:24

◆ n

int n
Initial value:
{
int i, a = 0
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
for i
Definition: complexityMeasures.m:24

◆ out

int int * out
Initial value:
{
int i,j
for i
Definition: complexityMeasures.m:24
for for j
Definition: complexityMeasures.m:25

◆ p

aint* __restrict__ p

◆ q

aint* __restrict__ aint* __restrict q

◆ s

struct A s

◆ sa

short sa[N]

◆ sb

short *__restrict__ sb

◆ sc

short *__restrict__ short *__restrict__ sc

◆ ua

unsigned int ua[N]

◆ ub

unsigned int ub[N]

◆ uc

unsigned int uc[N]

◆ usa

unsigned short usa[N]

◆ x

int x
Initial value:
{
int i
for i
Definition: complexityMeasures.m:24

◆ y

short y
Initial value:
{
int i
for i
Definition: complexityMeasures.m:24