[PATCH] D85806: [WebAssembly] Don't depend on the flags set by handleTargetFeatures in initFeatureMap.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 20:43:17 PDT 2020


craig.topper created this revision.
craig.topper added a reviewer: tlively.
Herald added subscribers: jfb, sunfish, jgravelle-google, sbc100, dschuff.
Herald added a project: clang.
craig.topper requested review of this revision.
Herald added a subscriber: aheejin.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85806

Files:
  clang/lib/Basic/Targets/WebAssembly.cpp
  clang/lib/Basic/Targets/WebAssembly.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85806.284960.patch
Type: text/x-patch
Size: 3780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200812/6aa5b732/attachment.bin>


More information about the cfe-commits mailing list