-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Replace hand-maintained CPU tables with cpufeatures library #61292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gbaraldi
wants to merge
13
commits into
master
Choose a base branch
from
gb/cpufeatures
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,229
−112
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7d4e5fb
processor: replace hand-maintained CPU tables with cpufeatures library
gbaraldi ae945bb
processor: update cpufeatures calls to new C++ namespace tp API
gbaraldi ea821a4
deps: use JCXXFLAGS for cpufeatures build
gbaraldi 70a6976
processor: suppress unused function warning for add_feature_mask_u32
gbaraldi 03138dd
src: add cpufeatures to ANALYSIS_DEPS for clang analyzer
gbaraldi ac9596e
processor: static_assert cpufeatures tables match Julia's LLVM version
gbaraldi 0afec2b
cpuid: cross-arch ISA queries, feature name mapping, and tests
gbaraldi 061c454
processor: remove KNL/KNM clone_all special case
gbaraldi d69537c
deps: pin cpufeatures to be944ef (fixes CONTEXTIDREL2, big.LITTLE, al…
gbaraldi e8ae92e
deps: update cpufeatures pin to 8f645bb
gbaraldi 13dcb34
deps: update cpufeatures to 5ab3764 (full hash)
gbaraldi 67673f1
cpuid: add feature_names(arch, cpu) and comprehensive tests
gbaraldi d2834a4
deps: update cpufeatures to 10a480b, install all headers
gbaraldi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| ## CPUFEATURES - standalone CPU feature detection library ## | ||
| include $(SRCDIR)/cpufeatures.version | ||
|
|
||
| CPUFEATURES_SRC_DIR := $(BUILDDIR)/cpufeatures-$(CPUFEATURES_VER) | ||
|
|
||
| $(SRCCACHE)/cpufeatures-$(CPUFEATURES_VER).tar.gz: | $(SRCCACHE) | ||
| $(JLDOWNLOAD) $@ $(CPUFEATURES_TAR_URL) | ||
| touch -c $@ | ||
|
|
||
| $(CPUFEATURES_SRC_DIR)/source-extracted: $(SRCCACHE)/cpufeatures-$(CPUFEATURES_VER).tar.gz | ||
| rm -rf $(dir $@) | ||
| mkdir -p $(dir $@) | ||
| $(TAR) -C $(dir $@) --strip-components 1 -xf $< | ||
| echo 1 > $@ | ||
|
|
||
| checksum-cpufeatures: $(SRCCACHE)/cpufeatures-$(CPUFEATURES_VER).tar.gz | ||
| $(JLCHECKSUM) $< | ||
|
|
||
| $(CPUFEATURES_SRC_DIR)/build-compiled: $(CPUFEATURES_SRC_DIR)/source-extracted | ||
| $(MAKE) -C $(CPUFEATURES_SRC_DIR) lib \ | ||
| CXX="$(CXX)" \ | ||
| CXXFLAGS="$(JCXXFLAGS) -O2" \ | ||
| ARCH=$(ARCH) | ||
| echo 1 > $@ | ||
|
|
||
| define CPUFEATURES_INSTALL | ||
| mkdir -p $2/$$(build_includedir)/cpufeatures | ||
| mkdir -p $2/$$(build_libdir) | ||
| cp $1/include/*.h $2/$$(build_includedir)/cpufeatures/ | ||
| cp $1/generated/target_tables_*.h $2/$$(build_includedir)/cpufeatures/ | ||
| cp $1/build/libtarget_parsing.a $2/$$(build_libdir)/ | ||
| endef | ||
| $(eval $(call staged-install, \ | ||
| cpufeatures,cpufeatures-$(CPUFEATURES_VER), \ | ||
| CPUFEATURES_INSTALL,,,,)) | ||
|
|
||
| clean-cpufeatures: | ||
| -rm -f $(CPUFEATURES_SRC_DIR)/build-compiled | ||
|
|
||
| distclean-cpufeatures: | ||
| rm -rf $(SRCCACHE)/cpufeatures*.tar.gz $(CPUFEATURES_SRC_DIR) | ||
|
|
||
| get-cpufeatures: $(SRCCACHE)/cpufeatures-$(CPUFEATURES_VER).tar.gz | ||
| extract-cpufeatures: $(CPUFEATURES_SRC_DIR)/source-extracted | ||
| configure-cpufeatures: extract-cpufeatures | ||
| compile-cpufeatures: $(CPUFEATURES_SRC_DIR)/build-compiled | ||
| fastcheck-cpufeatures: check-cpufeatures | ||
| check-cpufeatures: compile-cpufeatures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # -*- makefile -*- | ||
|
|
||
| ## source build | ||
| CPUFEATURES_VER := 0.2.0 | ||
| CPUFEATURES_GIT_URL := https://github.com/gbaraldi/cpufeatures.git | ||
| CPUFEATURES_TAR_URL := https://github.com/gbaraldi/cpufeatures/archive/10a480bc161b8cca648777069184b9baf03a9410.tar.gz | ||
| CPUFEATURES_SHA := 10a480bc161b8cca648777069184b9baf03a9410 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.