13469715a8a171512cf9b528702e70393f01c6041José Fonseca/************************************************************************** 23469715a8a171512cf9b528702e70393f01c6041José Fonseca * 33469715a8a171512cf9b528702e70393f01c6041José Fonseca * Copyright 2012 VMware, Inc. 43469715a8a171512cf9b528702e70393f01c6041José Fonseca * All Rights Reserved. 53469715a8a171512cf9b528702e70393f01c6041José Fonseca * 63469715a8a171512cf9b528702e70393f01c6041José Fonseca * Permission is hereby granted, free of charge, to any person obtaining a 73469715a8a171512cf9b528702e70393f01c6041José Fonseca * copy of this software and associated documentation files (the 83469715a8a171512cf9b528702e70393f01c6041José Fonseca * "Software"), to deal in the Software without restriction, including 93469715a8a171512cf9b528702e70393f01c6041José Fonseca * without limitation the rights to use, copy, modify, merge, publish, 103469715a8a171512cf9b528702e70393f01c6041José Fonseca * distribute, sub license, and/or sell copies of the Software, and to 113469715a8a171512cf9b528702e70393f01c6041José Fonseca * permit persons to whom the Software is furnished to do so, subject to 123469715a8a171512cf9b528702e70393f01c6041José Fonseca * the following conditions: 133469715a8a171512cf9b528702e70393f01c6041José Fonseca * 143469715a8a171512cf9b528702e70393f01c6041José Fonseca * The above copyright notice and this permission notice (including the 153469715a8a171512cf9b528702e70393f01c6041José Fonseca * next paragraph) shall be included in all copies or substantial portions 163469715a8a171512cf9b528702e70393f01c6041José Fonseca * of the Software. 173469715a8a171512cf9b528702e70393f01c6041José Fonseca * 183469715a8a171512cf9b528702e70393f01c6041José Fonseca * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 193469715a8a171512cf9b528702e70393f01c6041José Fonseca * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 203469715a8a171512cf9b528702e70393f01c6041José Fonseca * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 213469715a8a171512cf9b528702e70393f01c6041José Fonseca * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 223469715a8a171512cf9b528702e70393f01c6041José Fonseca * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 233469715a8a171512cf9b528702e70393f01c6041José Fonseca * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 243469715a8a171512cf9b528702e70393f01c6041José Fonseca * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 253469715a8a171512cf9b528702e70393f01c6041José Fonseca * 263469715a8a171512cf9b528702e70393f01c6041José Fonseca **************************************************************************/ 273469715a8a171512cf9b528702e70393f01c6041José Fonseca 283469715a8a171512cf9b528702e70393f01c6041José Fonseca 293469715a8a171512cf9b528702e70393f01c6041José Fonseca#ifndef LP_BLD_MISC_H 303469715a8a171512cf9b528702e70393f01c6041José Fonseca#define LP_BLD_MISC_H 313469715a8a171512cf9b528702e70393f01c6041José Fonseca 323469715a8a171512cf9b528702e70393f01c6041José Fonseca 333469715a8a171512cf9b528702e70393f01c6041José Fonseca#include "lp_bld.h" 343469715a8a171512cf9b528702e70393f01c6041José Fonseca#include <llvm-c/ExecutionEngine.h> 353469715a8a171512cf9b528702e70393f01c6041José Fonseca 363469715a8a171512cf9b528702e70393f01c6041José Fonseca 373469715a8a171512cf9b528702e70393f01c6041José Fonseca#ifdef __cplusplus 383469715a8a171512cf9b528702e70393f01c6041José Fonsecaextern "C" { 393469715a8a171512cf9b528702e70393f01c6041José Fonseca#endif 403469715a8a171512cf9b528702e70393f01c6041José Fonseca 413469715a8a171512cf9b528702e70393f01c6041José Fonseca 423469715a8a171512cf9b528702e70393f01c6041José Fonseca 433469715a8a171512cf9b528702e70393f01c6041José Fonsecaextern void 443469715a8a171512cf9b528702e70393f01c6041José Fonsecalp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE); 453469715a8a171512cf9b528702e70393f01c6041José Fonseca 463469715a8a171512cf9b528702e70393f01c6041José Fonsecaextern void 473469715a8a171512cf9b528702e70393f01c6041José Fonsecalp_set_target_options(void); 483469715a8a171512cf9b528702e70393f01c6041José Fonseca 493469715a8a171512cf9b528702e70393f01c6041José Fonseca 503469715a8a171512cf9b528702e70393f01c6041José Fonsecaextern void 513469715a8a171512cf9b528702e70393f01c6041José Fonsecalp_func_delete_body(LLVMValueRef func); 523469715a8a171512cf9b528702e70393f01c6041José Fonseca 533469715a8a171512cf9b528702e70393f01c6041José Fonseca 543469715a8a171512cf9b528702e70393f01c6041José Fonsecaextern LLVMValueRef 553469715a8a171512cf9b528702e70393f01c6041José Fonsecalp_build_load_volatile(LLVMBuilderRef B, LLVMValueRef PointerVal, 563469715a8a171512cf9b528702e70393f01c6041José Fonseca const char *Name); 573469715a8a171512cf9b528702e70393f01c6041José Fonseca 583469715a8a171512cf9b528702e70393f01c6041José Fonsecaextern int 593469715a8a171512cf9b528702e70393f01c6041José Fonsecalp_build_create_mcjit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, 603469715a8a171512cf9b528702e70393f01c6041José Fonseca LLVMModuleRef M, 613469715a8a171512cf9b528702e70393f01c6041José Fonseca unsigned OptLevel, 623469715a8a171512cf9b528702e70393f01c6041José Fonseca char **OutError); 633469715a8a171512cf9b528702e70393f01c6041José Fonseca 643469715a8a171512cf9b528702e70393f01c6041José Fonseca 653469715a8a171512cf9b528702e70393f01c6041José Fonseca#ifdef __cplusplus 663469715a8a171512cf9b528702e70393f01c6041José Fonseca} 673469715a8a171512cf9b528702e70393f01c6041José Fonseca#endif 683469715a8a171512cf9b528702e70393f01c6041José Fonseca 693469715a8a171512cf9b528702e70393f01c6041José Fonseca 703469715a8a171512cf9b528702e70393f01c6041José Fonseca#endif /* !LP_BLD_MISC_H */ 71