aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@gotplt.org>2021-10-19 09:36:35 +0530
committerSiddhesh Poyarekar <siddhesh@gotplt.org>2021-10-20 08:28:20 +0530
commit9fbb6fa123be81c55e888e5d117e63d05780f0ed (patch)
tree21192de96a3f53dd030f8955723ab079c615fd8c /gcc/tree-ssa-threadupdate.c
parent3c8d8c0be95e99dc0cba7f6fad2429243582119f (diff)
downloadgcc-9fbb6fa123be81c55e888e5d117e63d05780f0ed.zip
gcc-9fbb6fa123be81c55e888e5d117e63d05780f0ed.tar.gz
gcc-9fbb6fa123be81c55e888e5d117e63d05780f0ed.tar.bz2
tree-object-size: Make unknown a computation
Compute the unknown size value as a function of the min/max bit of object_size_type. This transforms into a neat little branchless sequence on x86_64: movl %edi, %eax sarl %eax xorl $1, %eax negl %eax cltq which should be faster than loading the value from memory. A quick unscientific test using `time make check-gcc RUNTESTFLAGS="dg.exp=builtin*"` shaves about half a second off execution time with this. Also simplify implementation of unknown_object_size. gcc/ChangeLog: * tree-object-size.c (unknown): Make into a function. Adjust all uses. (unknown_object_size): Simplify implementation. Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
0 files changed, 0 insertions, 0 deletions