-
Notifications
You must be signed in to change notification settings - Fork 0
Fix LLVM debug info #57
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
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.
It's quite similar to what I had in mind :), but I think we are reinventing some parts MLIR already provides.
mlir/lib/Linker/LinkerInterface.cpp
Outdated
struct ModuleScope { | ||
std::optional<SymbolTable::UseRange> symbolUses; | ||
|
||
ModuleScope(ModuleOp module) : symbolUses(*SymbolTable::getSymbolUses(module)) {} | ||
}; |
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.
I would try to replace this with the SymbolUserMap which does something very similar, but provides some utility capabilities.
|
||
std::shared_ptr<IRMapping> mapping; | ||
OpBuilder builder; | ||
SymbolTable symbolTable; |
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.
This would probably have to be replaced with SymbolTableCollection (because for some reason the SymbolUserMap requires that)… Maybe shared in a similar way as the IRMapping
, since it holds multiple SymbolTables?
It can be used to build (and then hold) the symbol tables on demand
mlir/lib/Linker/LinkerInterface.cpp
Outdated
ModuleScope(ModuleOp module) : symbolUses(*SymbolTable::getSymbolUses(module)) {} | ||
}; | ||
|
||
static LogicalResult renameRemappedUsersOf(Operation *op, const ModuleScope &scope, StringAttr newName, |
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.
I'm not 100 % sure, but maybe most of this can be handled by replaceAllUsesWith
from the SymbolUserMap
91f53d8
to
edb21cd
Compare
@Jezurko I tried using SymbolTableCollection and SymbolUserMap in the last commit but it broke a bunch of tests :/ |
Hm, that's a pity :/ I will give it a quick look what's happening |
f1bd67b
to
46ca027
Compare
No description provided.