[all-commits] [llvm/llvm-project] e9c9ad: [Hexagon] NFC: Reduce the amount of version-specif...

Alexey Karyakin via All-commits all-commits at lists.llvm.org
Fri Jun 27 13:05:49 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9c9adcefed10fa07910aae8f2074aedf7bd8b7e
      https://github.com/llvm/llvm-project/commit/e9c9adcefed10fa07910aae8f2074aedf7bd8b7e
  Author: Alexey Karyakin <akaryaki at quicinc.com>
  Date:   2025-06-27 (Fri, 27 Jun 2025)

  Changed paths:
    M clang/lib/Basic/Targets/Hexagon.cpp
    M clang/lib/Basic/Targets/Hexagon.h
    M llvm/lib/Target/Hexagon/HexagonDepArch.h
    M llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h

  Log Message:
  -----------
  [Hexagon] NFC: Reduce the amount of version-specific code (#145812)

There is a lot of redundant code that needs to be modified when new
Hexagon versions are added. Reduce the amount of this redundancy.

- compute ELF flags and attributes based on version feature names;
- simplify EnableHVX option handling by using arch features instead of
arch version enums;
- simplify completeHVXFeatures() by using features;
- delete several unused or redundant functions and constants:
isCPUValid, getCpu, getHexagonCPUSuffix;
- do not set HexagonArchVersion in initializeSubtargetDependencies, it
is set in ParseSubtargetFeatures;

Signed-off-by: Alexey Karyakin <akaryaki at quicinc.com>



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