Skip to content
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

Add switches for more general altjit and cross-target commands #45605

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

BruceForstall
Copy link
Member

Add -mch_arch to specify which architecture to use when downloading
MCH files from Azure Storage. The idea is that you can specify to
download, say, arm64 MCH files and then run them on x64 by also
specifying an arm64 cross-targeting JIT. Defaults to -target_arch
(which itself defaults to the host architecture).

Add -jit to allow specifying the JIT name to use. Do this instead of
-altjit.

Change -altjit to --altjit. It no longer takes a JIT name; use -jit
instead for that purpose. Now, --altjit just sets the altjit
variables.

Add -target_arch and -target_os to specify the cross-target of the JIT.
The -target_arch, in particular, is used to pass the -target argument
to SuperPMI, which it needs to know which disassembler to use.

So, for example, to run SuperPMI asm diffs with a Windows arm64 cross-JIT
on Windows x64, you might use:

py superpmi.py asmdiffs -jit clrjit_win_arm64_x64.dll -target_arch arm64

Unfortunately, these cross-JIT scenarios have other problems right now,
but this scripting is a start.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 4, 2020
@BruceForstall
Copy link
Member Author

@dotnet/jit-contrib

Add `-mch_arch` to specify which architecture to use when downloading
MCH files from Azure Storage. The idea is that you can specify to
download, say, arm64 MCH files and then run them on x64 by also
specifying an arm64 cross-targeting JIT. Defaults to `-target_arch`
(which itself defaults to the host architecture).

Add `-jit` to allow specifying the JIT name to use. Do this instead of
`-altjit`.

Change `-altjit` to `--altjit`. It no longer takes a JIT name; use `-jit`
instead for that purpose. Now, `--altjit` just sets the altjit
variables.

Add `-target_arch` and `-target_os` to specify the cross-target of the JIT.
The `-target_arch`, in particular, is used to pass the `-target` argument
to SuperPMI, which it needs to know which disassembler to use.

So, for example, to run SuperPMI asm diffs with a Windows arm64 cross-JIT
on Windows x64, you might use:
```
py superpmi.py asmdiffs -jit clrjit_win_arm64_x64.dll -target_arch arm64
```

Unfortunately, these cross-JIT scenarios have other problems right now,
but this scripting is a start.
@BruceForstall BruceForstall force-pushed the MoreGeneralSpmiTargeting branch from ce7f0f2 to f4bf624 Compare December 10, 2020 01:37
@BruceForstall
Copy link
Member Author

ping. Can someone sign off?

Copy link
Contributor

@sandreenko sandreenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question in which scenarios do we need --altjit after this change?

@BruceForstall
Copy link
Member Author

one question in which scenarios do we need --altjit after this change?

I believe you need it if you are running against a non-native collection, e.g., running clrjit_win_arm_x86.dll (x86 hosted arm32-targeting cross-JIT) against an x86 collection MCH file. But I'm still not 100% clear on if even that needs the altjit variables set.

@BruceForstall BruceForstall merged commit 03059a9 into dotnet:master Dec 10, 2020
@BruceForstall BruceForstall deleted the MoreGeneralSpmiTargeting branch December 10, 2020 02:28
@ghost ghost locked as resolved and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants