[Openmp-commits] [PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

Matt Arsenault via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 7 14:12:56 PDT 2023


arsenm added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17143-17145
+  llvm::LoadInst *LD;
+  Constant *Offset, *Offset1;
+  Value *DP, *DP1;
----------------
Move down to define and initialize


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:17163-17165
+    BasicBlock *NewABI = CGF.createBasicBlock("amdgcn.abi.cov5", TheFunction);
+    BasicBlock *OldABI = CGF.createBasicBlock("amdgcn.abi.cov4", nullptr);
+    BasicBlock *End = CGF.createBasicBlock("amdgcn.abi.end", nullptr);
----------------
You could write all of this in terms of selects and avoid introducing all these blocks


================
Comment at: clang/lib/CodeGen/Targets/AMDGPU.cpp:358
+    CodeGen::CodeGenModule &CGM) const {
+  if (!CGM.getTriple().isAMDGCN())
+    return;
----------------
Don't need this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139730/new/

https://reviews.llvm.org/D139730



More information about the Openmp-commits mailing list