[all-commits] [llvm/llvm-project] 16f3d6: [X86] Move the feature dependency handling in X86T...

topperc via All-commits all-commits at lists.llvm.org
Mon Jul 6 23:15:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 16f3d698f2afbbea43e0c3df81df6f2a640ce806
      https://github.com/llvm/llvm-project/commit/16f3d698f2afbbea43e0c3df81df6f2a640ce806
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-07-06 (Mon, 06 Jul 2020)

  Changed paths:
    M clang/lib/Basic/Targets/X86.cpp
    M clang/lib/Basic/Targets/X86.h
    M llvm/include/llvm/Support/X86TargetParser.def
    M llvm/include/llvm/Support/X86TargetParser.h
    M llvm/lib/Support/X86TargetParser.cpp

  Log Message:
  -----------
  [X86] Move the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

Previously we had to specify the forward and backwards feature dependencies separately which was error prone. And as dependencies have gotten more complex it was hard to be sure the transitive dependencies were handled correctly. The way it was written was also not super readable.

This patch replaces everything with a table that lists what features a feature is dependent on directly. Then we can recursively walk through the table to find the transitive dependencies. This is largely based on how we handle subtarget features in the MC layer from the tablegen descriptions.

Differential Revision: https://reviews.llvm.org/D83273




More information about the All-commits mailing list