[PATCH] D49083: [HIP] Register/unregister device fat binary only once

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 19 18:24:17 PDT 2018


rjmccall added inline comments.


================
Comment at: lib/CodeGen/CGCUDANV.cpp:466
+      CtorBuilder.CreateStore(RegisterFatbinCall, GpuBinaryAddr);
+      CtorBuilder.CreateBr(ExitBlock);
+    CtorBuilder.SetInsertPoint(ExitBlock);
----------------
I meant more putting all the code for IfBlock in a brace-statement, that kind of thing.  It's not as important for the earlier stuff because that actually dominates the rest of your code here.


================
Comment at: lib/CodeGen/CGCUDANV.cpp:578
+      DtorBuilder.CreateStore(Zero, GpuBinaryAddr);
+      DtorBuilder.CreateBr(ExitBlock);
+    DtorBuilder.SetInsertPoint(ExitBlock);
----------------
Don't just indent stuff if you're not putting it in a brace-statement.  By "vertical space" I meant putting newlines between the emission of the different blocks.


https://reviews.llvm.org/D49083





More information about the cfe-commits mailing list