[llvm] r336178 - [ADT] Disable the single callback optimization on Windows.

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 13:05:56 PDT 2018


On 7/3/2018 1:19 AM, Chandler Carruth via llvm-commits wrote:
> Author: chandlerc
> Date: Tue Jul  3 01:19:10 2018
> New Revision: 336178
>
> URL: http://llvm.org/viewvc/llvm-project?rev=336178&view=rev
> Log:
> [ADT] Disable the single callback optimization on Windows.
>
> It appears that the function pointer we use there isn't reliably 4-byte
> aligned. I have no idea why or how we could correct this, so for now we
> just regress the Windows performance some.

I don't know why you'd expect functions to be aligned; x86 doesn't 
require any alignment. clang usually prefers to align functions to 16 
bytes because the instruction decoder fetches 16 bytes at a time, but it 
won't align the entry point at all at -Oz.  And even on platforms where 
functions are aligned, function pointers might not be aligned; for 
example, ARM uses the bottom bit for interworking.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-commits mailing list