[all-commits] [llvm/llvm-project] 2b8ad6: [WebAssembly] Don't depend on the flags set by han...

topperc via All-commits all-commits at lists.llvm.org
Wed Aug 12 11:44:25 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b8ad6b6040833f4f8702721ebaa7749e5c23e60
      https://github.com/llvm/llvm-project/commit/2b8ad6b6040833f4f8702721ebaa7749e5c23e60
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M clang/lib/Basic/Targets/WebAssembly.cpp
    M clang/lib/Basic/Targets/WebAssembly.h

  Log Message:
  -----------
  [WebAssembly] Don't depend on the flags set by handleTargetFeatures in initFeatureMap.

Properly set "simd128" in the feature map when "unimplemented-simd128"
is requested.

initFeatureMap is used to create the feature vector used by
handleTargetFeatures. There are later calls to initFeatureMap in
CodeGen that were using these flags to recreate the map. But the
original feature vector should be passed to those calls. So that
should be enough to rebuild the map.

The only issue seemed to be that simd128 was not enabled in the
map by the first call to initFeatureMap. Using the SIMDLevel set
by handleTargetFeatures in the later calls allowed simd128 to be
set in the later versions of the map.

To fix this I've added an override of setFeatureEnabled that
will update the map the first time with the correct simd dependency.

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




More information about the All-commits mailing list