[PATCH] D40250: [OpenMP] Consistently use cubin extension for nvlink

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 13:42:54 PST 2017


Hahnfeld added inline comments.


================
Comment at: lib/Driver/ToolChains/Clang.cpp:5341-5344
+    if (const auto *OA = dyn_cast<OffloadAction>(JA.getInputs()[I])) {
+      OA->doOnEachDependence(
+          [&](Action *, const ToolChain *TC, const char *) { CurTC = TC; });
+    }
----------------
tra wrote:
> Can we ever have more than one dependence? If not, perhaps add an assert.
> Otherwise, can dependencies have different toolchains? 
> If so, which one do we really want?
> 
> 
> 
No, there should only be one for inputs to the bundler. I've added the assert and all tests pass.


================
Comment at: lib/Driver/ToolChains/Cuda.h:144
 
+  virtual std::string getInputFilename(const InputInfo &Input) const override;
+
----------------
tra wrote:
> `virtual` is redundant here.
(I've also changed this for `getAuxTriple` above.)


https://reviews.llvm.org/D40250





More information about the cfe-commits mailing list