Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Show First 20 Lines • Show All 3,294 Lines • ▼ Show 20 Lines | for (CallBase *CB : MallocCalls) { | ||||
<< ((AllocSize->getZExtValue() != 1) ? " bytes " : " byte ") | << ((AllocSize->getZExtValue() != 1) ? " bytes " : " byte ") | ||||
<< "of shared memory."; | << "of shared memory."; | ||||
}; | }; | ||||
A.emitRemark<OptimizationRemark>(CB, "OMP111", Remark); | A.emitRemark<OptimizationRemark>(CB, "OMP111", Remark); | ||||
MaybeAlign Alignment = CB->getRetAlign(); | MaybeAlign Alignment = CB->getRetAlign(); | ||||
assert(Alignment && | assert(Alignment && | ||||
"HeapToShared on allocation without alignment attribute"); | "HeapToShared on allocation without alignment attribute"); | ||||
SharedMem->setAlignment(MaybeAlign(Alignment)); | SharedMem->setAlignment(*Alignment); | ||||
A.changeAfterManifest(IRPosition::callsite_returned(*CB), *NewBuffer); | A.changeAfterManifest(IRPosition::callsite_returned(*CB), *NewBuffer); | ||||
A.deleteAfterManifest(*CB); | A.deleteAfterManifest(*CB); | ||||
A.deleteAfterManifest(*FreeCalls.front()); | A.deleteAfterManifest(*FreeCalls.front()); | ||||
SharedMemoryUsed += AllocSize->getZExtValue(); | SharedMemoryUsed += AllocSize->getZExtValue(); | ||||
NumBytesMovedToSharedMemory = SharedMemoryUsed; | NumBytesMovedToSharedMemory = SharedMemoryUsed; | ||||
Changed = ChangeStatus::CHANGED; | Changed = ChangeStatus::CHANGED; | ||||
▲ Show 20 Lines • Show All 2,220 Lines • Show Last 20 Lines |