Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/flang1/flang1exe/symtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ get_ieee_arith_intrin(char *nm)
int
getsymbol(const char *name)
{
return getsym(name, strlen(name));
int sym = getsym(name, strlen(name));
return sym;
}

/** \brief Enter symbol with indicated name into symbol table, initialize
Expand Down
8 changes: 4 additions & 4 deletions tools/flang2/flang2exe/cgmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4301,7 +4301,7 @@ make_stmt(STMT_Type stmt_type, int ilix, bool deletable, SPTR next_bih_label,
int alignment;
INSTR_LIST *Curr_Instr;

DBGTRACEIN2(" type: %s ilix: %d", stmt_names[stmt_type], ilix)
DBGTRACEIN2(" type: %s ilix: %d", stmt_names[stmt_type], ilix);

curr_stmt_type = stmt_type;
if (last_stmt_is_branch && stmt_type != STMT_LABEL) {
Expand Down Expand Up @@ -12267,7 +12267,7 @@ process_sptr_offset(SPTR sptr, ISZ_T off)
}
if ((flg.smp || (XBIT(34, 0x200) || gbl.usekmpc)) &&
(gbl.outlined || ISTASKDUPG(GBL_CURRFUNC))) {
if (sptr == ll_get_shared_arg(gbl.currsub)) {
if (sptr == ll_get_shared_arg(gbl.currsub) && !gbl.is_init_spmd_kernel) {
LLTYPE(sptr) = make_ptr_lltype(make_lltype_from_dtype(DT_INT8));
}
}
Expand Down Expand Up @@ -14063,7 +14063,6 @@ process_formal_arguments(LL_ABI_Info *abi)
/* Other by-value kinds. */
break;
}

/* This op represents the real LLVM argument, not the local variable. */
arg_op = make_operand();
arg_op->ot_type = OT_VAR;
Expand Down Expand Up @@ -14407,7 +14406,8 @@ INLINE void static add_property_struct(char *func_name,
print_token("@");
print_token(func_name);

if (is_SPMD_mode(mode)) {
if (mode >= mode_target_teams_distribute_parallel_for
&& mode <= mode_target_parallel_for_simd) {
print_token("__exec_mode = weak constant i8 2\n");
}
else {
Expand Down
6 changes: 3 additions & 3 deletions tools/flang2/flang2exe/exp_ftn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4147,7 +4147,7 @@ exp_bran(ILM_OP opc, ILM *ilmp, int curilm)
/***************************************************************/

void
exp_misc(ILM_OP opc, ILM *ilmp, int curilm)
exp_misc(ILM_OP opc, ILM *ilmp, int curilm, bool process_expanded)
{
int tmp;
int ilix, listilix;
Expand Down Expand Up @@ -4289,11 +4289,11 @@ exp_misc(ILM_OP opc, ILM *ilmp, int curilm)
break;

case IM_ENDF:
exp_end(ilmp, curilm, true);
exp_end(ilmp, curilm, true, process_expanded);
break;

case IM_END:
exp_end(ilmp, curilm, false);
exp_end(ilmp, curilm, false, process_expanded);
break;

case IM_BYVAL:
Expand Down
2 changes: 1 addition & 1 deletion tools/flang2/flang2exe/exp_ftn.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void exp_bran(ILM_OP opc, ILM *ilmp, int curilm);
/**
\brief ...
*/
void exp_misc(ILM_OP opc, ILM *ilmp, int curilm);
void exp_misc(ILM_OP opc, ILM *ilmp, int curilm, bool process_expanded = false);

/**
\brief ...
Expand Down
12 changes: 7 additions & 5 deletions tools/flang2/flang2exe/exp_rte.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,7 @@ exp_alloca(ILM *ilmp)
static void gen_funcret(finfo_t *);

void
exp_end(ILM *ilmp, int curilm, bool is_func)
exp_end(ILM *ilmp, int curilm, bool is_func, bool process_expanded)
{
int tmp;
int op1;
Expand All @@ -2158,10 +2158,12 @@ exp_end(ILM *ilmp, int curilm, bool is_func)
int ilix;
if (flg.omptarget && !is_func) {
if (XBIT(232, 0x40) && gbl.ompaccel_intarget && !OMPACCFUNCDEVG(gbl.currsub) /*is_gpu_output_file() */ ) {
ilix = ll_make_kmpc_target_deinit(
ompaccel_tinfo_get(gbl.currsub)->mode);
iltb.callfg = 1;
chk_block(ilix);
OMP_TARGET_MODE mode = ompaccel_tinfo_get(gbl.currsub)->mode;
if (!is_SPMD_mode(mode) && !process_expanded) {
ilix = ll_make_kmpc_target_deinit(mode);
iltb.callfg = 1;
chk_block(ilix);
}
}
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion tools/flang2/flang2exe/exp_rte.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void exp_cgoto(ILM *ilmp, int curilm);
/**
\brief ...
*/
void exp_end(ILM *ilmp, int curilm, bool is_func);
void exp_end(ILM *ilmp, int curilm, bool is_func, bool process_expanded = false);

/**
\brief ...
Expand Down
Loading