Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-cppcheck-llpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
cppcheck:
name: cppcheck
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-24.04"
steps:
- name: Setup environment
run: |
Expand All @@ -19,5 +19,5 @@ jobs:
git submodule update --init
- name: Run cppcheck
run: |
cppcheck -q -j$(( $(nproc) * 4 )) --error-exitcode=1 --std=c++17 --inline-suppr . -i llpc/tool/amdllpc.cpp \
-I imported/llvm-dialects/include
cppcheck -q -j$(( $(nproc) * 4 )) --error-exitcode=1 --std=c++20 --inline-suppr . \
-I imported/llvm-dialects/include -i imported -i llpc/unittests -i llvmraytracing
4 changes: 2 additions & 2 deletions lgc/builder/MatrixBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ Value *BuilderImpl::CreateMatrixTimesVector(Value *const matrix, Value *const ve
else
result = partialResult;
}

result->setName(instName);
if (result)
result->setName(instName);
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion lgc/patch/LowerInvariantLoads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ PreservedAnalyses LowerInvariantLoads::run(Function &function, FunctionAnalysisM

LLVM_DEBUG(dbgs() << (clearInvariants ? "Removing invariant load flags"
: "Attempting aggressive invariant load optimization")
<< "\n";);
<< "\n");

// This mirrors AMDGPUAliasAnalysis
static const unsigned aliasMatrix[] = {
Expand Down
10 changes: 6 additions & 4 deletions llpc/context/llpcCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2459,9 +2459,10 @@ Result Compiler::BuildGraphicsPipeline(const GraphicsPipelineBuildInfo *pipeline

if (!cacheAccessor || !cacheAccessor->isInCache()) {
LLPC_OUTS("Cache miss for graphics pipeline.\n");
GraphicsContext graphicsContext(m_gfxIp, m_apiName, pipelineInfo, &pipelineHash, &cacheHash);
result = buildGraphicsPipelineInternal(&graphicsContext, shaderInfo, buildUsingRelocatableElf, &candidateElf,
GraphicsContext *graphicsContext = new GraphicsContext(m_gfxIp, m_apiName, pipelineInfo, &pipelineHash, &cacheHash);
result = buildGraphicsPipelineInternal(graphicsContext, shaderInfo, buildUsingRelocatableElf, &candidateElf,
pipelineOut->stageCacheAccesses);
delete graphicsContext;

if (result == Result::Success) {
elfBin.codeSize = candidateElf.size();
Expand Down Expand Up @@ -2588,9 +2589,10 @@ Result Compiler::BuildComputePipeline(const ComputePipelineBuildInfo *pipelineIn
ElfPackage candidateElf;
if (!cacheAccessor || !cacheAccessor->isInCache()) {
LLPC_OUTS("Cache miss for compute pipeline.\n");
ComputeContext computeContext(m_gfxIp, m_apiName, pipelineInfo, &pipelineHash, &cacheHash);
result = buildComputePipelineInternal(&computeContext, pipelineInfo, buildUsingRelocatableElf, &candidateElf,
ComputeContext *computeContext = new ComputeContext(m_gfxIp, m_apiName, pipelineInfo, &pipelineHash, &cacheHash);
result = buildComputePipelineInternal(computeContext, pipelineInfo, buildUsingRelocatableElf, &candidateElf,
&pipelineOut->stageCacheAccess);
delete computeContext;

if (cacheAccessor && pipelineOut->pipelineCacheAccess == CacheAccessInfo::CacheNotChecked)
pipelineOut->pipelineCacheAccess = CacheAccessInfo::CacheMiss;
Expand Down
Loading