par2serial-cc / src /codegen.h
clarenceleo's picture
Add codegen.h header
e8904dd verified
Raw
History Blame Contribute Delete
922 Bytes
/*
* par2serial-cc: codegen.h - C code generator
* Generates optimized serial C with SIMD intrinsics
*/
#ifndef P2S_CODEGEN_H
#define P2S_CODEGEN_H
#include "optimize.h"
/* ── Code Generation Options ─────────────────────────────── */
typedef struct {
SIMDTarget simd;
OptLevel opt_level;
bool emit_comments; /* include optimization annotations */
bool emit_openmp; /* include OpenMP pragmas as fallback */
bool emit_restrict; /* use restrict pointers */
bool use_aligned; /* use aligned load/store when possible */
} CodeGenOpts;
/* ── Code Generator API ──────────────────────────────────── */
char *codegen_module(IRModule *mod, ASTNode *ast, CodeGenOpts *opts, Arena *arena);
#endif /* P2S_CODEGEN_H */