Skip to content

Commit 35701a7

Browse files
committed
Force SvPV_helper to be always inline
(when the compiler cooperates, that is) I compiled toke.s using -O0 and looked at the output. It had a full copy of SvPV_helper in it. But this function is called with various constants that make much of the code dead when constant folded. That was not being done here. This commit changes to force inlining. Looking at a revised toke.s, I saw that SvPV_helper was inserted multiple times in the code, and that each occurrence had significantly fewer instructions than the original. I infer that the compiler did the constant folding and pruned out the dead code.
1 parent 8444d54 commit 35701a7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3374,7 +3374,7 @@ CRdmp |char * |sv_2pvbyte_nolen \
33743374
Adp |char * |sv_2pv_flags |NN SV * const sv \
33753375
|NULLOK STRLEN * const lp \
33763376
|const U32 flags
3377-
Cip |char * |SvPV_helper |NN SV * const sv \
3377+
CIp |char * |SvPV_helper |NN SV * const sv \
33783378
|NN STRLEN * const lp \
33793379
|const U32 flags \
33803380
|const PL_SvPVtype type \

proto.h

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)