Skip to content

Commit

Permalink
Fix cpp static check (2) update.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojbao committed Mar 22, 2024
1 parent fe14fbb commit b1f609e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion llpc/lower/llpcSpirvLowerRayQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "llvmraytracing/GpurtContext.h"
#include "lgc/Builder.h"
#include "lgc/GpurtDialect.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"

Expand Down Expand Up @@ -293,8 +294,8 @@ SpirvLowerRayQuery::SpirvLowerRayQuery(bool rayQueryLibrary)
// @param [in/out] module : LLVM module to be run on
// @param [in/out] analysisManager : Analysis manager to use for this transformation
PreservedAnalyses SpirvLowerRayQuery::run(Module &module, ModuleAnalysisManager &analysisManager) {
m_crossModuleInliner.reset();
m_crossModuleInliner = std::make_optional<CrossModuleInliner>();
auto onExit = make_scope_exit([&] { m_crossModuleInliner.reset(); });
LLVM_DEBUG(dbgs() << "Run the pass Spirv-Lower-ray-query\n");
SpirvLower::init(&module);
createGlobalRayQueryObj();
Expand Down
3 changes: 2 additions & 1 deletion llpc/lower/llpcSpirvLowerRayTracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "lgc/LgcRtDialect.h"
#include "lgc/Pipeline.h"
#include "llvm-dialects/Dialect/Visitor.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
Expand Down Expand Up @@ -420,8 +421,8 @@ PreservedAnalyses SpirvLowerRayTracing::run(Module &module, ModuleAnalysisManage
mode.workgroupSizeZ = rtState->threadGroupSizeZ;
lgc::Pipeline::setComputeShaderMode(module, mode);

m_crossModuleInliner.reset();
m_crossModuleInliner = std::make_optional<CrossModuleInliner>();
auto onExit = make_scope_exit([&] { m_crossModuleInliner.reset(); });

// Create empty raygen main module
if (module.empty()) {
Expand Down

0 comments on commit b1f609e

Please sign in to comment.