Skip to content

This patch reverts the fix added in #85218 in favour of a better approach #88118

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

Closed
wants to merge 1 commit into from

Conversation

TIFitis
Copy link
Member

@TIFitis TIFitis commented Apr 9, 2024

This patch reverts the fix added in #85218 in favour of a better approach.

@llvmbot llvmbot added flang:openmp clang:openmp OpenMP related changes to Clang labels Apr 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 9, 2024

@llvm/pr-subscribers-flang-openmp

Author: Akash Banerjee (TIFitis)

Changes

This patch reverts the fix added in #85218 in favour of a better approach.


Full diff: https://github.com/llvm/llvm-project/pull/88118.diff

1 Files Affected:

  • (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (+1-4)
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 7fd8474c2ec890..6b5446182a772f 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -4886,11 +4886,8 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData(
     return InsertPointTy();
 
   // Disable TargetData CodeGen on Device pass.
-  if (Config.IsTargetDevice.value_or(false)) {
-    if (BodyGenCB)
-      Builder.restoreIP(BodyGenCB(Builder.saveIP(), BodyGenTy::NoPriv));
+  if (Config.IsTargetDevice.value_or(false))
     return Builder.saveIP();
-  }
 
   Builder.restoreIP(CodeGenIP);
   bool IsStandAlone = !BodyGenCB;

@TIFitis
Copy link
Member Author

TIFitis commented Apr 9, 2024

@jdoerfert @skatrak I believe @jsjodin is working on a patch which is a more general approach for codegen of target constructs nested within host operations. Once that patch is upstream, I'll merge this to get rid of the placeholder fix we have.

Does that sound reasonable?

@skatrak
Copy link
Member

skatrak commented Apr 9, 2024

Sounds good to me. Did #85239 not completely cover this case?

@TIFitis TIFitis closed this Jul 17, 2024
@TIFitis TIFitis deleted the revert_target_data branch July 17, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:openmp OpenMP related changes to Clang flang:openmp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants