-
Notifications
You must be signed in to change notification settings - Fork 787
[WIP][SYCL] Make sycl-post-link process split modules sequentially, simplify. #5001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Split module extraction is now done sequentially, not keeping all modules resulting from split alive in RAM. - Post link actions are separated into clear parts simplifying the logic - Initial support for keeping SYCL and ESIMD code in the same module, needed for invoke_simd. - Add convenience constructor to SimpleTable. Signed-off-by: Konstantin S Bobrovsky <[email protected]>
TableFiles TblFiles; | ||
if (!M) | ||
return TblFiles; | ||
struct IrPropSymFilenameTripple { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct IrPropSymFilenameTripple { | |
struct IrPropSymFilenameTriple { |
if (DoSymGen) { | ||
ColumnTitles.push_back(COL_SYM); | ||
} | ||
std::unique_ptr<util::SimpleTable> Table = std::make_unique<util::SimpleTable>(ColumnTitles); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::unique_ptr<util::SimpleTable> Table = std::make_unique<util::SimpleTable>(ColumnTitles); | |
auto Table = std::make_unique<util::SimpleTable>(ColumnTitles); |
const Function *F1 = dyn_cast_or_null<Function>(VMap[F]); | ||
assert(F1 && "clone error"); | ||
return F1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const Function *F1 = dyn_cast_or_null<Function>(VMap[F]); | |
assert(F1 && "clone error"); | |
return F1; | |
return cast<Function>(VMap[F]); |
|
||
std::unique_ptr<Module> M = nullptr; | ||
std::vector<const Function*> EntryPoints; | ||
std::string Name = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that this field is not used now.
std::pair<IRModuleDesc, IRModuleDesc> SyclEsimdModules = splitSyclEsimd(M1); | ||
IRModuleDesc &MSycl = SyclEsimdModules.first; | ||
IRModuleDesc &MEsimd = SyclEsimdModules.second; | ||
SmallVector<IRModuleDesc, 2> MMs; | ||
|
||
if (MSycl.M.get()) { | ||
MMs.emplace_back(std::move(SyclEsimdModules.first)); | ||
} | ||
if (MEsimd.M.get()) { | ||
MMs.emplace_back(std::move(SyclEsimdModules.second)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::pair<IRModuleDesc, IRModuleDesc> SyclEsimdModules = splitSyclEsimd(M1); | |
IRModuleDesc &MSycl = SyclEsimdModules.first; | |
IRModuleDesc &MEsimd = SyclEsimdModules.second; | |
SmallVector<IRModuleDesc, 2> MMs; | |
if (MSycl.M.get()) { | |
MMs.emplace_back(std::move(SyclEsimdModules.first)); | |
} | |
if (MEsimd.M.get()) { | |
MMs.emplace_back(std::move(SyclEsimdModules.second)); | |
} | |
SmallVector<IRModuleDesc, 2> MMs = splitSyclEsimd(M1); | |
Modified = (MMs.size() > 1); |
; CHECK-PROP2-NOT: [SYCL/specialization constants] | ||
; CHECK-PROP2-NOT: [SYCL/specialization constants default values] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
; CHECK-PROP2-NOT: [SYCL/specialization constants] | |
; CHECK-PROP2-NOT: [SYCL/specialization constants default values] | |
; CHECK-PROP2-NOT: [SYCL/specialization constants |
@mlychkov - thanks for the review. Per our today's discussion, I will wait for your two PRs - the cosmetic one and the one which will process split modules one-by-one (which might borrow some code from this patch). After that I will rebase this patch and continue the review/merge process. |
@kbobrovs Both PRs have been merged. You may rebase and continue work under this patch. |
Replaced with #6160 |
modules resulting from split alive in RAM.
for invoke_simd.
Signed-off-by: Konstantin S Bobrovsky [email protected]