[PATCH] D30651: [InlineCost, -Oz] Don't take into account the penalty of a fast call of frequently used functions
Evgeny Astigeevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 09:07:11 PDT 2017
eastig added a comment.
I checked if the GEPs from the provided IR are free on x86. No, they are not:
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movl %edx, -20(%rbp)
.LBB0_1: # =>This Inner Loop Header: Depth=1
movl -20(%rbp), %eax
movl %eax, %ecx
addl $-1, %ecx
movl %ecx, -20(%rbp)
cmpl $0, %eax
je .LBB0_3
# BB#2: # in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movq %rax, %rcx
addq $1, %rcx
movq %rcx, -16(%rbp)
movb (%rax), %dl
movq -8(%rbp), %rax
movq %rax, %rcx
addq $1, %rcx
movq %rcx, -8(%rbp)
movb %dl, (%rax)
jmp .LBB0_1
.LBB0_3:
MOVQ + ADDQ are generated for them. I am writing a patch.
https://reviews.llvm.org/D30651
More information about the llvm-commits
mailing list