[all-commits] [llvm/llvm-project] c640ba: [SimplifyLibCalls] Add initial support for non-8-b...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Sat Oct 26 18:35:29 PDT 2024


  Branch: refs/heads/users/s-barannikov/byte/7-simplify-lib-calls
  Home:   https://github.com/llvm/llvm-project
  Commit: c640baf7c091c9142983c2785ded7ba8ce3cbe46
      https://github.com/llvm/llvm-project/commit/c640baf7c091c9142983c2785ded7ba8ce3cbe46
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2024-10-27 (Sun, 27 Oct 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/ValueTracking.h
    M llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/fputs-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/fwrite-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/memchr-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/memcmp-b32.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/memcpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/memcpy_chk-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/mempcpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/memrchr-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/memset-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/stpcpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/stpcpy_chk-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/stpncpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strcat-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strchr-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strcmp-b32.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strcpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strcpy_chk-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strlcpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strlen-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strncat-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strncmp-b32.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strncpy-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strndup-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/strnlen-b16.ll
    A llvm/test/Transforms/InstCombine/SimplifyLibCalls/wcslen-b16.ll
    M llvm/test/Transforms/InstCombine/bcmp-1.ll
    M llvm/test/Transforms/InstCombine/memcmp-1.ll
    M llvm/test/Transforms/InstCombine/strncmp-1.ll

  Log Message:
  -----------
  [SimplifyLibCalls] Add initial support for non-8-bit bytes

The patch makes CharWidth argument of `getStringLength` mandatory
and ensures the correct values are passed in most cases.
This is *not* a complete support for unusual byte widths in
SimplifyLibCalls since `getConstantStringInfo` returns false for those.
The code guarded by `getConstantStringInfo` returning true is unchanged
because the changes are currently not testable.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list