This patch extends the TargetMachine to let targets specify the integer size used by the sjljehprepare pass. This is 64bit for the VE target and otherwise defaults to 32bit for all targets, which was hard-wired before.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
To clarify: this patch is not intended to be committed as-is but gives an overview of the required changes. It's the a patch of a series for the VE backend and includes all the earlier patches.
- Rebased
- NFC (getArch() == .. -- > isVE()).
- Dug through layers of cosmetic commits to find potential reviewers for the SjLjEHPreparePass.
Unit tests: pass. 62043 tests passed, 0 failed and 783 were skipped.
clang-tidy: unknown.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
llvm/lib/CodeGen/TargetPassConfig.cpp | ||
---|---|---|
698–699 | I would expect this to be a target hook of some kind the pass checks, not a pass parameter controlled here. Checking a target triple here is probably not kosher |
llvm/lib/CodeGen/TargetPassConfig.cpp | ||
---|---|---|
698–699 | Ok. How about querying the SjLj data size from TTI (eg TTI::getSjLjDataSize())? |
llvm/lib/CodeGen/TargetPassConfig.cpp | ||
---|---|---|
698–699 | I think this probably belongs in either the TargetMachine or TargetLowering. I don't think things required for correctness should go in TTI |
Unit tests: pass. 62057 tests passed, 0 failed and 784 were skipped.
clang-tidy: unknown.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Unit tests: pass. 62057 tests passed, 0 failed and 784 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
- initialize SjljEHPrepare pass with CodeGen library.
- rebased
- added test (32bit on X86, 64bit on VE).
Thanks for having a look :)
llvm/test/CodeGen/VE/sjlj_except.ll | ||
---|---|---|
2–3 | I was hoping to do that. However, when the pass is created without a target machine (as happens in opt) - it defaults to the standard bit size. Since VE is the only target that actually uses a non-default value, i found no other way to test it than to go all the way to VE codegen. | |
14 | Probably. I'll look into it. |
I would expect this to be a target hook of some kind the pass checks, not a pass parameter controlled here. Checking a target triple here is probably not kosher