[PATCH] D21853: [Driver][OpenMP] Update actions builder to create unbundling action when necessary.

Hal Finkel via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 13:03:05 PDT 2016


hfinkel added inline comments.

================
Comment at: lib/Driver/Driver.cpp:2091
@@ +2090,3 @@
+        InputArg->getOption().getKind() == llvm::opt::Option::InputClass &&
+        !types::isSrcFile(HostAction->getType())) {
+      auto UnbundlingHostAction =
----------------
hfinkel wrote:
> This checks that the file needs to be preprocessed. What does preprocessing have to do with this? I don't imagine that providing a preprocessed source file as input should invoke the unbundler   .
On second thought, this is okay. It does not make sense to have a non-bundled preprocessed source for the input there, as the host and device compilation don't share a common preprocessor state.

We do need to be careful, perhaps, about .s files (which don't need preprocessing as .S files do) -- we should probably assume that all non-bundled .s files are host assembly code.

================
Comment at: test/Driver/openmp-offload.c:274
@@ +273,3 @@
+/// Check separate compilation with offloading - unbundling actions
+// RUN:   touch %t.i
+// RUN:   %clang -### -ccc-print-phases -fopenmp -o %t.out -lsomelib -target powerpc64le-linux -fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu %t.i 2>&1 \
----------------
hfinkel wrote:
> Oh, are you using .i to indicate a bundle instead of a preprocessed file? Don't do that. Please use a different suffix -- the bundler has its own file format.
Never mind; this is okay too.


https://reviews.llvm.org/D21853





More information about the cfe-commits mailing list