[all-commits] [llvm/llvm-project] 46edc0: [LoongArch] Adjust LA64 data layout by using n32:6...

hev via All-commits all-commits at lists.llvm.org
Wed Jun 5 23:06:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46edc02eaac81bfdace3e1f906751cad114790da
      https://github.com/llvm/llvm-project/commit/46edc02eaac81bfdace3e1f906751cad114790da
  Author: hev <wangrui at loongson.cn>
  Date:   2024-06-06 (Thu, 06 Jun 2024)

  Changed paths:
    M clang/lib/Basic/Targets/LoongArch.h
    M llvm/docs/ReleaseNotes.rst
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
    M llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp

  Log Message:
  -----------
  [LoongArch] Adjust LA64 data layout by using n32:64 in layout string (#93814)

Although i32 type is illegal in the backend, LA64 has pretty good
support for i32 types by using W instructions.

By adding n32 to the DataLayout string, middle end optimizations will
consider i32 to be a native type. One known effect of this is enabling
LoopStrengthReduce on loops with i32 induction variables. This can be
beneficial because C/C++ code often has loops with i32 induction
variables due to the use of `int` or `unsigned int`.

If this patch exposes performance issues, those are better addressed by
tuning LSR or other passes.



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