[llvm] [llvm][SimplifyLibCalls] Add option 'AllowMemcmpToBcmpTransform' (PR #82304)
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 06:54:20 PST 2024
gchatelet wrote:
Late comment but I agree that this should be dealt with the target triple approach. I had a patch (lost in phabricator) that was adding support for llvm-libc to llvm, once it's there we can customize the availability of `bcmp` in `TargetLoweringBase::InitLibcalls` as we already do for some functions / environments:
https://github.com/llvm/llvm-project/blob/83feb846482f0100cb29d460d3d8de2690fc32ad/llvm/lib/CodeGen/TargetLoweringBase.cpp#L125-L126
That said, devil's in the details and the "pick and choose" nature of llvm-libc in overlay mode may blur the lines between "I'm using llvm-libc" and "I'm partially using it". We can probably make this explicit in the environment's naming scheme though.
https://github.com/llvm/llvm-project/pull/82304
More information about the llvm-commits
mailing list