[PATCH] D21845: [Driver][OpenMP] Add specialized action builder for OpenMP offloading actions.
Hal Finkel via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 28 12:02:09 PDT 2016
hfinkel added inline comments.
================
Comment at: lib/Driver/Driver.cpp:1836
@@ +1835,3 @@
+ ActionBuilderReturnCode
+ getDeviceDepences(OffloadAction::DeviceDependences &DA, phases::ID CurPhase,
+ phases::ID FinalPhase, PhasesTy &Phases) override {
----------------
Depences - Spelling?
================
Comment at: lib/Driver/Driver.cpp:1854
@@ +1853,3 @@
+
+ // We passed the device action to a host dependence, so we don't need to
+ // do anything else with them.
----------------
to a -> as a
================
Comment at: lib/Driver/Driver.cpp:1879
@@ +1878,3 @@
+ // When generating code for OpenMP we use the host compile phase result as
+ // dependence to the device compile phase so that it can learn what
+ // declaration should be emitted. However, this is not the only use for
----------------
as dependence -> as a dependence (or as the dependence)
================
Comment at: lib/Driver/Driver.cpp:1880
@@ +1879,3 @@
+ // dependence to the device compile phase so that it can learn what
+ // declaration should be emitted. However, this is not the only use for
+ // the host action, so we have prevent it from being collapsed.
----------------
declaration -> declarations
================
Comment at: lib/Driver/Driver.cpp:1881
@@ +1880,3 @@
+ // declaration should be emitted. However, this is not the only use for
+ // the host action, so we have prevent it from being collapsed.
+ if (isa<CompileJobAction>(HostAction)) {
----------------
have prevent -> prevent
================
Comment at: lib/Driver/Driver.cpp:1918
@@ +1917,3 @@
+ // Get the OpenMP toolchains. If we don't get any, the action builder will
+ // know there is nothing to do related with OpenMP offloading.
+ auto OpenMPTCRange = C.getOffloadToolChains<Action::OFK_OpenMP>();
----------------
related with -> related to
================
Comment at: lib/Driver/Driver.cpp:1949
@@ -1837,1 +1948,3 @@
+ SpecializedBuilders.push_back(new OpenMPActionBuilder(C, Args, Inputs));
+
//
----------------
Since we can have both OpenMP offloading and CUDA, please add a test that the phases work correctly for that case (or that we produce an error if that can't currently work correctly).
https://reviews.llvm.org/D21845
More information about the cfe-commits
mailing list