8000 [SYCL] Fix sycl-post-link to work when a spec const is referenced twice. by kbobrovs · Pull Request #1524 · intel/llvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[SYCL] Fix sycl-post-link to work when a spec const is referenced twice. #1524

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

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

kbobrovs
Copy link
Contributor

Signed-off-by: Konstantin S Bobrovsky konstantin.s.bobrovsky@intel.com

@kbobrovs kbobrovs requested a review from Fznamznon April 15, 2020 03:27
@kbobrovs kbobrovs requested a review from bader as a code owner April 15, 2020 03:27
Value *V = CI->getArgOperand(ArgNo)->stripPointerCasts();

if (auto *L = dyn_cast<LoadInst>(V)) {
// Must be a
// vvvvvvvvvvvvvvvvvvvv
// @.str = private unnamed_addr constant[18 x i8]
// c"_ZTS11MyBoolConst\00", align 1
// @.str = private unnamed_addr constant[10 x i8] c"SpecConst\00", align 1
Copy link
Contributor

Choose a reason for hiding this comment

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

This change makes the following comment with LLVM IR invalid for types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@@ -427,6 +428,9 @@ int main(int argc, char **argv) {
// Register required analysis
MAM.registerPass([&] { return PassInstrumentationAnalysis(); });
RunSpecConst.addPass(SCP);
if (!DoSplit)
// This pass deletes unreachable globals. Code splitter runs it later.
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if we add a test with spec constants handling and split both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This does not really apply to this fix. But this is important missing test case - agree, so I'll add a test.

Signed-off-by: Konstantin S Bobrovsky <konstantin.s.bobrovsky@intel.com>
Copy link
Contributor
@Fznamznon Fznamznon left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@bader bader merged commit ce020c9 into intel:sycl Apr 16, 2020
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Apr 21, 2020
…c_abi_checks

* origin/sycl:
  [SYCL][Driver] Enforce unique filenames when -save-temps is used (intel#1545)
  [SYCL] [xmethods] Allow replacing xmethod script (intel#1532)
  [SYCL] Add tests for inline asm feature (intel#1444)
  [SYCL][Doc] Add device_specific_kernel_queries extension. (intel#1540)
  [SYCL][USM] Remove unused header and unnecessary includes (intel#1537)
  Fix check-llvm dependencies (intel#1547)
  [SYCL] Add __SYCL_EXPORT to declaration of contextSetExtendedDeleter (intel#1531)
  [SYCL][Doc] Add static local memory query extension. (intel#1539)
  [SYCL][Doc] Add sycl_bitcast extension (intel#1541)
  [SYCL][NFC] Temporarily disable sporadically failing test (intel#1533)
  [SYCL][NFC] Adjust codeowners for sycl directory (intel#1529)
  [SYCL] Fix processing of spec consts referenced twice (intel#1524)
  [SYCL] Use correct macro name in export.hpp (intel#1527)
  [Driver][NFC] Fix -help information for -Xs options (intel#1530)
  [SYCL][Doc] Add Graph Scheduler design documentation (intel#1457)
  [SYCL] Add diagnostics for long double in device code (intel#1512)
  [SYCL] Add a mutex to state-modifying program functions (intel#1204)
  [SYCL][Test] Add Devicelib tests (intel#1256)
  [SYCL] Refactor semantic checks for variable types (intel#1513)
dwoodwor-intel pushed a commit to dwoodwor-intel/llvm that referenced this pull request Jul 8, 2022
* Implement support for @llvm.sadd.sat intrinsic.
* Rename LowerSaddWithOverflow to LowerSaddIntrinsics.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@0af7e64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0