Revision c3861f5c7371fea2fc5d20404a7f77c927bbd61b authored by Shuhei Kadowaki on 14 August 2021, 12:49:21 UTC, committed by Shuhei Kadowaki on 23 August 2021, 15:09:13 UTC
Built on top of #41882, this PR sorts out the constant-prop' interface yet more, particularly generalizes `force_const_prop` to `const_prop_config` so that it can turn on and off each heuristic. The main motivation here is, in #41882, we want to force const-prop' on `setproperty` even when its return type is already `Const` for the sake of succeeding inlining, by skipping all the `const_prop_xxx_heuristic` checks. But I still found we want to apply `const_prop_entry_heuristic` to `getproperty`, because if we already know very accurate result for a `getproperty` call, usually there is really no motivation for constant-prop', e.g.: ```julia struct FZero end Base.getproperty(::FZero, ::Symbol) = 0.0 getproperty(FZero(), :val) # const-prop' doesn't need to happen here ``` Now `force_const_prop(...) -> force::Bool` is refactored to `const_prop_config(...) -> config::UInt8`, which can turn on and off each heuristic based on the value of `config`. I also included another refactoring that inlines `const_prop_rettype_heuristic` into `const_prop_argument_heuristic`, because they really seem tightly coupled.
1 parent e1e4986
julia.expmap
{
global:
__asan*;
__tsan*;
pthread*;
__stack_chk_guard;
asprintf;
bitvector_*;
ev_break;
get_exename;
getlocalip;
int32hash;
int64hash;
int64to32hash;
ios_*;
iswprint;
jl_*;
rec_backtrace;
julia_*;
libsupport_init;
localtime_r;
memhash;
memhash32;
memhash32_seed;
memhash_seed;
restore_arg_area_loc;
restore_signals;
rl_clear_input;
save_arg_area_loc;
u8_*;
uv_*;
add_library_mapping;
utf8proc_*;
jlbacktrace;
jlbacktracet;
julia_type_to_llvm;
_IO_stdin_used;
__ZN4llvm23createLowerSimdLoopPassEv;
LLVMExtra*;
/* freebsd */
environ;
__progname;
/* compiler run-time intrinsics */
__gnu_h2f_ieee;
__extendhfsf2;
__gnu_f2h_ieee;
__truncdfhf2;
local:
*;
};
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...