"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.0/src/libponyc/codegen/gencontrol.h" (1 Nov 2019, 1051 Bytes) of package /linux/misc/ponyc-0.33.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "gencontrol.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef CODEGEN_GENCONTROL_H
    2 #define CODEGEN_GENCONTROL_H
    3 
    4 #include <platform.h>
    5 #include "codegen.h"
    6 
    7 PONY_EXTERN_C_BEGIN
    8 
    9 LLVMValueRef gen_seq(compile_t* c, ast_t* ast);
   10 
   11 LLVMValueRef gen_if(compile_t* c, ast_t* ast);
   12 
   13 LLVMValueRef gen_iftype(compile_t* c, ast_t* ast);
   14 
   15 LLVMValueRef gen_while(compile_t* c, ast_t* ast);
   16 
   17 LLVMValueRef gen_repeat(compile_t* c, ast_t* ast);
   18 
   19 LLVMValueRef gen_recover(compile_t* c, ast_t* ast);
   20 
   21 LLVMValueRef gen_break(compile_t* c, ast_t* ast);
   22 
   23 LLVMValueRef gen_continue(compile_t* c, ast_t* ast);
   24 
   25 LLVMValueRef gen_return(compile_t* c, ast_t* ast);
   26 
   27 LLVMValueRef gen_try(compile_t* c, ast_t* ast);
   28 
   29 LLVMValueRef gen_error(compile_t* c, ast_t* ast);
   30 
   31 void attach_branchweights_metadata(LLVMContextRef ctx, LLVMValueRef branch,
   32    unsigned int weights[], unsigned int count);
   33 
   34 void handle_branch_prediction_default(LLVMContextRef ctx, LLVMValueRef branch,
   35   ast_t* ast);
   36 
   37 // Numbers from Clang's __builtin_expect()
   38 #define PONY_BRANCHWEIGHT_LIKELY 2000
   39 #define PONY_BRANCHWEIGHT_UNLIKELY 1
   40 
   41 PONY_EXTERN_C_END
   42 
   43 #endif