Ejemplo n.º 1
0
Archivo: cseed.c Proyecto: Ced/cseed
void cseed_scop_print_to_c(FILE* output, osl_scop_p scop) {
    CloogState* state;
    CloogOptions* options;
    CloogInput* input;
    struct clast_stmt* clast;

    state = cloog_state_malloc();
    options = cloog_options_malloc(state);
    options->openscop = 1;
    cloog_options_copy_from_osl_scop(scop, options);
    input = cloog_input_from_osl_scop(options->state, scop);
    clast = cloog_clast_create_from_input(input, options);
    clast_pprint(output, clast, 0, options);

    cloog_clast_free(clast);
    options->scop = NULL; // don't free the scop
    cloog_options_free(options);
    cloog_state_free(state); // the input is freed inside
}
Ejemplo n.º 2
0
int main()
{
    CloogState *state;
    CloogInput *input;
    CloogOptions * options ;
    struct clast_stmt *root;

    state = cloog_state_malloc();
    options = cloog_options_malloc(state);
    input = cloog_input_read(stdin, options);

    root = cloog_clast_create_from_input(input, options);
    clast_pprint(stdout, root, 0, options);

    cloog_clast_free(root);
    cloog_options_free(options) ;
    cloog_state_free(state);

    return 0 ;
}
Ejemplo n.º 3
0
Cloog::Cloog(Scop *Scop) : S(Scop) {
  State = cloog_state_malloc();
  buildCloogOptions();
  ClastRoot = cloog_clast_create_from_input(buildCloogInput(), Options);
}