[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 Oct 26 15:27:57 PDT 2016


hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Driver/Driver.cpp:2091
+        InputArg->getOption().getKind() == llvm::opt::Option::InputClass &&
+        !types::isSrcFile(HostAction->getType())) {
+      auto UnbundlingHostAction =
----------------
sfantao wrote:
> hfinkel wrote:
> > 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.
> Yes, that is what we do. If the bundler tool detects that the input is not a bundle, it assumes it is host code/bits. In either case, we still generate the unbundling tool as the driver doesn't check the contents of the files.
Please add to the comment above that if the unbundler tool detects that the input is not a bundle, it assumes it is host input.


https://reviews.llvm.org/D21853





More information about the cfe-commits mailing list