Fix some more spelling issues (#3393)
This commit is contained in:
@ -3966,7 +3966,7 @@ aot_compile_wasm(AOTCompContext *comp_ctx)
|
||||
orc_main_dylib = LLVMOrcLLLazyJITGetMainJITDylib(comp_ctx->orc_jit);
|
||||
if (!orc_main_dylib) {
|
||||
aot_set_last_error(
|
||||
"failed to get orc orc_jit main dynmaic library");
|
||||
"failed to get orc orc_jit main dynamic library");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -4191,7 +4191,7 @@ aot_emit_object_file(AOTCompContext *comp_ctx, char *file_name)
|
||||
/*
|
||||
* move the temporary .su file to the specified location.
|
||||
*
|
||||
* Note: the former is automatimally inferred from the output
|
||||
* Note: the former is automatically inferred from the output
|
||||
* filename (file_name here) by clang.
|
||||
*
|
||||
* Note: the latter might be user-specified.
|
||||
@ -4247,7 +4247,7 @@ aot_emit_object_file(AOTCompContext *comp_ctx, char *file_name)
|
||||
#endif /* end of !(defined(_WIN32) || defined(_WIN32_)) */
|
||||
|
||||
if (!strncmp(LLVMGetTargetName(target), "arc", 3))
|
||||
/* Emit to assmelby file instead for arc target
|
||||
/* Emit to assembly file instead for arc target
|
||||
as it cannot emit to object file */
|
||||
file_type = LLVMAssemblyFile;
|
||||
|
||||
|
||||
@ -2125,7 +2125,7 @@ aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
|
||||
if (!(table_size_const =
|
||||
LLVMBuildBitCast(comp_ctx->builder, table_size_const,
|
||||
INT32_PTR_TYPE, "cur_siuze_i32p"))) {
|
||||
INT32_PTR_TYPE, "cur_size_i32p"))) {
|
||||
HANDLE_FAILURE("LLVMBuildBitCast");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -569,7 +569,7 @@ aot_compile_op_struct_new(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
|
||||
SET_BUILDER_POS(check_struct_obj_succ);
|
||||
|
||||
/* For WASM_OP_STRUCT_NEW, init filed with poped value */
|
||||
/* For WASM_OP_STRUCT_NEW, init field with poped value */
|
||||
if (!init_with_default
|
||||
&& !struct_new_canon_init_fields(comp_ctx, func_ctx, type_index,
|
||||
struct_obj)) {
|
||||
|
||||
@ -145,7 +145,7 @@ aot_check_memory_overflow(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
* Note: not throw the integer-overflow-exception here since it must
|
||||
* have been thrown when converting float to integer before
|
||||
*/
|
||||
/* return addres directly if constant offset and inside memory space */
|
||||
/* return address directly if constant offset and inside memory space */
|
||||
if (LLVMIsEfficientConstInt(addr)) {
|
||||
uint64 mem_offset =
|
||||
(uint64)LLVMConstIntGetZExtValue(addr) + (uint64)offset;
|
||||
@ -1410,7 +1410,7 @@ aot_compile_op_atomic_cmpxchg(AOTCompContext *comp_ctx,
|
||||
LLVMSetVolatile(result, true);
|
||||
|
||||
/* CmpXchg return {i32, i1} structure,
|
||||
we need to extrack the previous_value from the structure */
|
||||
we need to extract the previous_value from the structure */
|
||||
if (!(result = LLVMBuildExtractValue(comp_ctx->builder, result, 0,
|
||||
"previous_value"))) {
|
||||
goto fail;
|
||||
|
||||
@ -554,7 +554,7 @@ compile_int_div(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Check divied by zero */
|
||||
/* Check divided by zero */
|
||||
LLVM_BUILD_ICMP(LLVMIntEQ, right, is_i32 ? I32_ZERO : I64_ZERO,
|
||||
cmp_div_zero, "cmp_div_zero");
|
||||
ADD_BASIC_BLOCK(check_div_zero_succ, "check_div_zero_success");
|
||||
|
||||
@ -147,7 +147,7 @@ aot_check_table_access(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
}
|
||||
|
||||
if (!(tbl_sz = LLVMBuildBitCast(comp_ctx->builder, tbl_sz, INT32_PTR_TYPE,
|
||||
"cur_siuze_i32p"))) {
|
||||
"cur_size_i32p"))) {
|
||||
HANDLE_FAILURE("LLVMBuildBitCast");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -2418,7 +2418,7 @@ orc_jit_create(AOTCompContext *comp_ctx)
|
||||
}
|
||||
|
||||
if (comp_ctx->enable_stack_bound_check || comp_ctx->enable_stack_estimation)
|
||||
LLVMOrcLLJITBuilderSetCompileFuncitonCreatorWithStackSizesCallback(
|
||||
LLVMOrcLLJITBuilderSetCompileFunctionCreatorWithStackSizesCallback(
|
||||
builder, jit_stack_size_callback, comp_ctx);
|
||||
|
||||
err = LLVMOrcJITTargetMachineBuilderDetectHost(&jtmb);
|
||||
|
||||
@ -374,7 +374,7 @@ typedef struct AOTCompContext {
|
||||
char target_arch[16];
|
||||
unsigned pointer_size;
|
||||
|
||||
/* Hardware intrinsic compability flags */
|
||||
/* Hardware intrinsic compatibility flags */
|
||||
uint64 flags[8];
|
||||
|
||||
/* required by JIT */
|
||||
@ -441,7 +441,7 @@ typedef struct AOTCompContext {
|
||||
/* Use profile file collected by LLVM PGO */
|
||||
char *use_prof_file;
|
||||
|
||||
/* Enable to use segument register as the base addr
|
||||
/* Enable to use segment register as the base addr
|
||||
of linear memory for load/store operations */
|
||||
bool enable_segue_i32_load;
|
||||
bool enable_segue_i64_load;
|
||||
|
||||
@ -203,7 +203,7 @@ PartitionFunction(GlobalValueSet Requested)
|
||||
* if the jit wrapper (which has "_wrapper" suffix in
|
||||
* the name) is requested, compile others in the group too.
|
||||
* otherwise, only compile the requested one.
|
||||
* (and possibly the correspondig wrapped function,
|
||||
* (and possibly the corresponding wrapped function,
|
||||
* which has AOT_FUNC_INTERNAL_PREFIX.)
|
||||
*/
|
||||
wrapper = strstr(gvname + prefix_len, "_wrapper");
|
||||
|
||||
@ -72,7 +72,7 @@ LLVMOrcObjectTransformLayerRef
|
||||
LLVMOrcLLLazyJITGetObjTransformLayer(LLVMOrcLLLazyJITRef J);
|
||||
|
||||
void
|
||||
LLVMOrcLLJITBuilderSetCompileFuncitonCreatorWithStackSizesCallback(
|
||||
LLVMOrcLLJITBuilderSetCompileFunctionCreatorWithStackSizesCallback(
|
||||
LLVMOrcLLLazyJITBuilderRef Builder,
|
||||
void (*cb)(void *, const char *, size_t, size_t), void *cb_data);
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(llvm::orc::LLLazyJITBuilder,
|
||||
LLVMOrcLLLazyJITBuilderRef)
|
||||
|
||||
void
|
||||
LLVMOrcLLJITBuilderSetCompileFuncitonCreatorWithStackSizesCallback(
|
||||
LLVMOrcLLJITBuilderSetCompileFunctionCreatorWithStackSizesCallback(
|
||||
LLVMOrcLLLazyJITBuilderRef Builder,
|
||||
void (*cb)(void *, const char *, size_t, size_t), void *cb_data)
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@ typedef struct dwarf_extractor {
|
||||
|
||||
#define TO_HANDLE(extractor) (dwarf_extractor_handle_t)(extractor)
|
||||
|
||||
#define TO_EXTACTOR(handle) (dwarf_extractor *)(handle)
|
||||
#define TO_EXTRACTOR(handle) (dwarf_extractor *)(handle)
|
||||
|
||||
static bool is_debugger_initialized;
|
||||
|
||||
@ -103,7 +103,7 @@ fail3:
|
||||
void
|
||||
destroy_dwarf_extractor(dwarf_extractor_handle_t handle)
|
||||
{
|
||||
dwarf_extractor *extractor = TO_EXTACTOR(handle);
|
||||
dwarf_extractor *extractor = TO_EXTRACTOR(handle);
|
||||
if (!extractor)
|
||||
return;
|
||||
extractor->debugger.DeleteTarget(extractor->target);
|
||||
@ -122,7 +122,7 @@ dwarf_gen_file_info(const AOTCompContext *comp_ctx)
|
||||
const char *file_name;
|
||||
const char *dir_name;
|
||||
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return NULL;
|
||||
|
||||
units_number = extractor->module.GetNumCompileUnits();
|
||||
@ -198,7 +198,7 @@ dwarf_gen_comp_unit_info(const AOTCompContext *comp_ctx)
|
||||
int units_number;
|
||||
LLVMMetadataRef comp_unit = NULL;
|
||||
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return NULL;
|
||||
|
||||
units_number = extractor->module.GetNumCompileUnits();
|
||||
@ -312,12 +312,12 @@ lldb_function_to_function_dbi(const AOTCompContext *comp_ctx,
|
||||
case eLanguageTypeC17:
|
||||
break;
|
||||
default:
|
||||
LOG_WARNING("func %s has unsuppoted language_type 0x%x",
|
||||
LOG_WARNING("func %s has unsupported language_type 0x%x",
|
||||
function_name, (int)language_type);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return NULL;
|
||||
|
||||
LLVMDIBuilderRef DIB = comp_ctx->debug_builder;
|
||||
@ -389,7 +389,7 @@ lldb_function_to_function_dbi(const AOTCompContext *comp_ctx,
|
||||
function.GetBlock().GetVariables(extractor->target, true, false, false);
|
||||
if (num_function_args != variable_list.GetSize()) {
|
||||
LOG_ERROR(
|
||||
"function args number dismatch!:value number=%d, function args=%d",
|
||||
"function args number mismatch!:value number=%d, function args=%d",
|
||||
variable_list.GetSize(), num_function_args);
|
||||
}
|
||||
|
||||
@ -399,13 +399,13 @@ lldb_function_to_function_dbi(const AOTCompContext *comp_ctx,
|
||||
// TODO:change to void * or WasmExenv * ?
|
||||
LLVMMetadataRef voidtype =
|
||||
LLVMDIBuilderCreateBasicType(DIB, "void", 4, 0, 0, LLVMDIFlagZero);
|
||||
LLVMMetadataRef voidpionter =
|
||||
LLVMMetadataRef voidpointer =
|
||||
LLVMDIBuilderCreatePointerType(DIB, voidtype, 64, 0, 0, "void *", 6);
|
||||
|
||||
LLVMMetadataRef ParamVar = LLVMDIBuilderCreateParameterVariable(
|
||||
DIB, FunctionMetadata, "exenv", 5, 1,
|
||||
File, // starts form 1, and 1 is exenv,
|
||||
line_entry.GetLine(), voidpionter, true, LLVMDIFlagZero);
|
||||
line_entry.GetLine(), voidpointer, true, LLVMDIFlagZero);
|
||||
LLVMValueRef Param = LLVMGetParam(func_ctx->func, 0);
|
||||
LLVMBasicBlockRef block_curr = LLVMGetEntryBasicBlock(func_ctx->func);
|
||||
LLVMDIBuilderInsertDbgValueAtEnd(DIB, Param, ParamVar, ParamExpression,
|
||||
@ -447,13 +447,13 @@ dwarf_gen_func_info(const AOTCompContext *comp_ctx,
|
||||
uint64_t vm_offset;
|
||||
AOTFunc *func = func_ctx->aot_func;
|
||||
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return NULL;
|
||||
|
||||
// A code address in DWARF for WebAssembly is the offset of an
|
||||
// instruction relative within the Code section of the WebAssembly file.
|
||||
// For this reason Section::GetFileAddress() must return zero for the
|
||||
// Code section. (refert to ObjectFileWasm.cpp)
|
||||
// Code section. (refer to ObjectFileWasm.cpp)
|
||||
vm_offset = func->code - comp_ctx->comp_data->wasm_module->buf_code;
|
||||
|
||||
auto sbaddr = extractor->target.ResolveFileAddress(vm_offset);
|
||||
@ -479,13 +479,13 @@ dwarf_get_func_name(const AOTCompContext *comp_ctx,
|
||||
|
||||
name[0] = '\0';
|
||||
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return;
|
||||
|
||||
// A code address in DWARF for WebAssembly is the offset of an
|
||||
// instruction relative within the Code section of the WebAssembly file.
|
||||
// For this reason Section::GetFileAddress() must return zero for the
|
||||
// Code section. (refert to ObjectFileWasm.cpp)
|
||||
// Code section. (refer to ObjectFileWasm.cpp)
|
||||
vm_offset = func->code - comp_ctx->comp_data->wasm_module->buf_code;
|
||||
|
||||
auto sbaddr = extractor->target.ResolveFileAddress(vm_offset);
|
||||
@ -509,7 +509,7 @@ dwarf_gen_location(const AOTCompContext *comp_ctx,
|
||||
|
||||
if (func_ctx->debug_func == NULL)
|
||||
return NULL;
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return NULL;
|
||||
|
||||
auto sbaddr = extractor->target.ResolveFileAddress(vm_offset);
|
||||
@ -550,13 +550,13 @@ dwarf_gen_func_ret_location(const AOTCompContext *comp_ctx,
|
||||
AOTFunc *func = func_ctx->aot_func;
|
||||
LLVMMetadataRef location_info = NULL;
|
||||
|
||||
if (!(extractor = TO_EXTACTOR(comp_ctx->comp_data->extractor)))
|
||||
if (!(extractor = TO_EXTRACTOR(comp_ctx->comp_data->extractor)))
|
||||
return NULL;
|
||||
|
||||
// A code address in DWARF for WebAssembly is the offset of an
|
||||
// instruction relative within the Code section of the WebAssembly file.
|
||||
// For this reason Section::GetFileAddress() must return zero for the
|
||||
// Code section. (refert to ObjectFileWasm.cpp)
|
||||
// Code section. (refer to ObjectFileWasm.cpp)
|
||||
vm_offset = (func->code + func->code_size - 1)
|
||||
- comp_ctx->comp_data->wasm_module->buf_code;
|
||||
location_info = dwarf_gen_location(comp_ctx, func_ctx, vm_offset);
|
||||
|
||||
@ -85,7 +85,7 @@ aot_compile_simd_swizzle_x86(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx)
|
||||
|
||||
if (!(condition = LLVMBuildICmp(comp_ctx->builder, LLVMIntUGE, mask,
|
||||
max_lanes, "compare_with_16"))) {
|
||||
HANDLE_FAILURE("LLVMBuldICmp");
|
||||
HANDLE_FAILURE("LLVMBuildICmp");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ aot_compile_simd_replace(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return simd_bitcast_and_push_v128(comp_ctx, func_ctx, result, "reesult");
|
||||
return simd_bitcast_and_push_v128(comp_ctx, func_ctx, result, "result");
|
||||
|
||||
fail:
|
||||
return false;
|
||||
|
||||
@ -45,7 +45,7 @@ simd_build_bitmask(const AOTCompContext *comp_ctx,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* fill every bit in a lange with its sign bit */
|
||||
/* fill every bit in a lane with its sign bit */
|
||||
if (!(ashr_distance = simd_build_splat_const_integer_vector(
|
||||
comp_ctx, element_type[itype], lane_bits[itype] - 1,
|
||||
lanes[itype]))) {
|
||||
|
||||
@ -86,8 +86,8 @@ fail:
|
||||
}
|
||||
|
||||
static bool
|
||||
interger_vector_compare(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
IntCond cond, LLVMTypeRef vector_type)
|
||||
integer_vector_compare(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
IntCond cond, LLVMTypeRef vector_type)
|
||||
{
|
||||
LLVMValueRef vec1, vec2, result;
|
||||
LLVMIntPredicate int_pred;
|
||||
@ -138,28 +138,28 @@ bool
|
||||
aot_compile_simd_i8x16_compare(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, IntCond cond)
|
||||
{
|
||||
return interger_vector_compare(comp_ctx, func_ctx, cond, V128_i8x16_TYPE);
|
||||
return integer_vector_compare(comp_ctx, func_ctx, cond, V128_i8x16_TYPE);
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i16x8_compare(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, IntCond cond)
|
||||
{
|
||||
return interger_vector_compare(comp_ctx, func_ctx, cond, V128_i16x8_TYPE);
|
||||
return integer_vector_compare(comp_ctx, func_ctx, cond, V128_i16x8_TYPE);
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i32x4_compare(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, IntCond cond)
|
||||
{
|
||||
return interger_vector_compare(comp_ctx, func_ctx, cond, V128_i32x4_TYPE);
|
||||
return integer_vector_compare(comp_ctx, func_ctx, cond, V128_i32x4_TYPE);
|
||||
}
|
||||
|
||||
bool
|
||||
aot_compile_simd_i64x2_compare(AOTCompContext *comp_ctx,
|
||||
AOTFuncContext *func_ctx, IntCond cond)
|
||||
{
|
||||
return interger_vector_compare(comp_ctx, func_ctx, cond, V128_i64x2_TYPE);
|
||||
return integer_vector_compare(comp_ctx, func_ctx, cond, V128_i64x2_TYPE);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
static bool
|
||||
simd_integer_narrow_x86(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
LLVMTypeRef in_vector_type, LLVMTypeRef out_vector_type,
|
||||
const char *instrinsic)
|
||||
const char *intrinsic)
|
||||
{
|
||||
LLVMValueRef vector1, vector2, result;
|
||||
LLVMTypeRef param_types[2] = { in_vector_type, in_vector_type };
|
||||
@ -24,7 +24,7 @@ simd_integer_narrow_x86(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(result = aot_call_llvm_intrinsic(comp_ctx, func_ctx, instrinsic,
|
||||
if (!(result = aot_call_llvm_intrinsic(comp_ctx, func_ctx, intrinsic,
|
||||
out_vector_type, param_types, 2,
|
||||
vector1, vector2))) {
|
||||
HANDLE_FAILURE("LLVMBuildCall");
|
||||
@ -659,7 +659,7 @@ aot_compile_simd_i16x8_q15mulr_sat(AOTCompContext *comp_ctx,
|
||||
|
||||
if (!(result = LLVMBuildTrunc(comp_ctx->builder, result, V128_i16x8_TYPE,
|
||||
"down_to_v8i16"))) {
|
||||
HANDLE_FAILURE("LLVMBuidlTrunc");
|
||||
HANDLE_FAILURE("LLVMBuildTrunc");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user