This is in preparation for a patch which requires use of
a function analysis, which I'm not sure we can get in
a module pass.
Details
Details
- Reviewers
- None
- Group Reviewers
Restricted Project
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks good to me, I just added few cosmetical remarks.
| llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp | ||
|---|---|---|
| 135 | Here too. | |
| 181 | You could replace the double getParent() by a single call to getFunction() | |
| 237 | I think you can avoid the switch if you used the return value of expandMemIntrinsic and makeLIDRangeMetadata. for (Function::iterator I = F.begin(), E = F.end(); I != E;) {
BasicBlock *BB = &*I++;
for (BasicBlock::iterator J = BB->begin(), JE = BB->end(); J != JE;) {
IntrinsicInst *Intrin = dyn_cast<IntrinsicInst>(&*J++);
if (!Intrin)
continue;
if (expandMemIntrinsic(Intrin, TTI)) {
BB = Intrin->getParent();
JE = BB->end();
Intrin->eraseFromParent();
Changed = true;
continue;
}
Changed |= ST.makeLIDRangeMetadata(Intrin);
}
}However, that would also mark the range for the amdgcn_workitem_id_xyz intrinsics and I'm not sure if that's expected. | |
Here too.