Advertisement
illwieckz

llvm print bitcode file

Nov 2nd, 2022 (edited)
1,719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.28 KB | None | 0 0
  1. diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
  2. index 12c6b3f49c43..82869141a451 100644
  3. --- a/clang/lib/CodeGen/CodeGenAction.cpp
  4. +++ b/clang/lib/CodeGen/CodeGenAction.cpp
  5. @@ -1009,6 +1009,8 @@ GetOutputStream(CompilerInstance &CI, StringRef InFile, BackendAction Action) {
  6.    llvm_unreachable("Invalid action!");
  7.  }
  8.  
  9. +#include <cstdio>
  10. +
  11.  std::unique_ptr<ASTConsumer>
  12.  CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
  13.    BackendAction BA = static_cast<BackendAction>(Act);
  14. @@ -1025,6 +1027,7 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
  15.    if (LinkModules.empty())
  16.      for (const CodeGenOptions::BitcodeFileToLink &F :
  17.           CI.getCodeGenOpts().LinkBitcodeFiles) {
  18. +      printf("Loading bitcode: %s\n", F.Filename.c_str());
  19.        auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename);
  20.        if (!BCBuf) {
  21.          CI.getDiagnostics().Report(diag::err_cannot_open_file)
  22.  
  23. diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp
  24. index a7eccb67e6df..5f71461552ce 100644
  25. --- a/llvm/lib/Support/TargetParser.cpp
  26. +++ b/llvm/lib/Support/TargetParser.cpp
  27. @@ -122,6 +122,8 @@ constexpr GPUInfo AMDGCNGPUs[] = {
  28.    {{"gfx1103"},   {"gfx1103"}, GK_GFX1103, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32},
  29.  };
  30.  
  31. +#include <cstdio>
  32. +
  33.  const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
  34.    GPUInfo Search = { {""}, {""}, AK, AMDGPU::FEATURE_NONE };
  35.  
  36. @@ -132,6 +134,8 @@ const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
  37.  
  38.    if (I == Table.end())
  39.      return nullptr;
  40. +
  41. +  printf("Getting arch entry: %s, %s\n", I->Name.str().c_str(), I->CanonicalName.str().c_str());
  42.    return I;
  43.  }
  44.  
  45. ---
  46.  
  47. [LuxCore] [2.635] Configuring 2 CPU render threads
  48. [LuxRays] [2.635] [OpenCL device::AMD Radeon R9 390 Series (hawaii, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] QBVH max. stack size: 24
  49. [LuxRays] [2.635] [OpenCL device::AMD Radeon R9 390 Series (hawaii, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] OpenCL image support is not available
  50. [LuxRays] [2.635] [OpenCL device::AMD Radeon R9 390 Series (hawaii, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] QBVH buffer size: 3873Kbytes
  51. [LuxRays] [2.636] [OpenCL device::AMD Radeon R9 390 Series (hawaii, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] QuadTriangle buffer size: 12112Kbytes
  52. Getting arch entry: gfx701, gfx701
  53. Getting arch entry: gfx701, gfx701
  54. Getting arch entry: gfx701, gfx701
  55. Getting arch entry: gfx701, gfx701
  56. Getting arch entry: gfx701, gfx701
  57. Getting arch entry: gfx701, gfx701
  58. Getting arch entry: gfx701, gfx701
  59. Getting arch entry: gfx701, gfx701
  60. Getting arch entry: gfx701, gfx701
  61. Getting arch entry: gfx701, gfx701
  62. Getting arch entry: gfx701, gfx701
  63. Loading bitcode: install/share/clc/hawaii-amdgcn-mesa-mesa3d.bc
  64. Getting arch entry: gfx701, gfx701
  65. Getting arch entry: gfx701, gfx701
  66. Getting arch entry: gfx701, gfx701
  67. Getting arch entry: gfx701, gfx701
  68. [LuxRays] [2.895] [OpenCL device::AMD Radeon HD 8500 series (oland, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] QBVH max. stack size: 24
  69. [LuxRays] [2.895] [OpenCL device::AMD Radeon HD 8500 series (oland, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] OpenCL image support is not available
  70. [LuxRays] [2.895] [OpenCL device::AMD Radeon HD 8500 series (oland, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] QBVH buffer size: 3873Kbytes
  71. [LuxRays] [2.895] [OpenCL device::AMD Radeon HD 8500 series (oland, LLVM 16.0.0, DRM 3.42, 5.15.0-50-generic)Intersect] QuadTriangle buffer size: 12112Kbytes
  72. Getting arch entry: gfx602, gfx602
  73. Getting arch entry: gfx602, gfx602
  74. Getting arch entry: gfx602, gfx602
  75. Getting arch entry: gfx602, gfx602
  76. Getting arch entry: gfx602, gfx602
  77. Getting arch entry: gfx602, gfx602
  78. Getting arch entry: gfx602, gfx602
  79. Getting arch entry: gfx602, gfx602
  80. Getting arch entry: gfx602, gfx602
  81. Getting arch entry: gfx602, gfx602
  82. Getting arch entry: gfx602, gfx602
  83. Loading bitcode: install/share/clc/oland-amdgcn-mesa-mesa3d.bc
  84. Getting arch entry: gfx602, gfx602
  85. Getting arch entry: gfx602, gfx602
  86. Getting arch entry: gfx602, gfx602
  87. Getting arch entry: gfx602, gfx602
  88. [LuxCore] [3.170] [PathOCLRenderEngine] OpenCL task count: 524288
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement