Skip to content

Commit 0164a79

Browse files
jaladreipsigcbot
authored andcommitted
Simplify allocas merging call inst handling
Simplify allocas merging call inst handling
1 parent 7c39bf4 commit 0164a79

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

IGC/AdaptorCommon/RayTracing/MergeAllocas.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,8 @@ AllocationBasedLivenessAnalysis::LivenessData* AllocationBasedLivenessAnalysis::
121121
case Instruction::Call:
122122
{
123123
auto* callI = cast<CallInst>(II);
124-
if (auto* fn = callI->getCalledFunction())
125-
{
126-
if (!fn->getArg(use->getOperandNo())->hasAttribute(llvm::Attribute::NoCapture))
127-
hasNoLifetimeEnd = true;
128-
}
129-
else
130-
{
131-
// TODO: can indirect calls somehow pass nocapture?
124+
if (!callI->doesNotCapture(use->getOperandNo()))
132125
hasNoLifetimeEnd = true;
133-
}
134126
}
135127
break;
136128
default:

0 commit comments

Comments
 (0)