search for: removeunusedmdnodes

Displaying 7 results from an estimated 7 matches for "removeunusedmdnodes".

2013 Nov 13
2
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...r example Xalan used 649MB for MDNodes after loading and linking, but the actual destination module only has 393MB of MDNodes. There are 649-393MB (40% of 649MB) not used. MDNodes belong to the Context, deleting modules will not release the MDNodes. One possible solution is: In LLVMContext, add “removeUnusedMDNodes" function It goes through OwnedModules and check if a MDNode is used by any of the modules, if not remove it. One implementation is to mark a visited MDNode used when traversing the module. After done traversing all modules, we can delete MDNodes in MDNodeSet that are not marked. In LTOCo...
2013 Nov 13
3
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...al >> destination module only has 393MB of MDNodes. There are 649-393MB (40% of >> 649MB) not used. >> >> MDNodes belong to the Context, deleting modules will not release the >> MDNodes. >> >> One possible solution is: >> >> In LLVMContext, add “removeUnusedMDNodes" function >> It goes through OwnedModules and check if a MDNode is used by any of >> the modules, if not remove it. >> One implementation is to mark a visited MDNode used when traversing the >> module. After done traversing all modules, we can delete MDNodes in >...
2013 Nov 13
0
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...er loading and linking, but the actual > destination module only has 393MB of MDNodes. There are 649-393MB (40% of > 649MB) not used. > > MDNodes belong to the Context, deleting modules will not release the > MDNodes. > > One possible solution is: > > In LLVMContext, add “removeUnusedMDNodes" function > It goes through OwnedModules and check if a MDNode is used by any of the > modules, if not remove it. > One implementation is to mark a visited MDNode used when traversing the > module. After done traversing all modules, we can delete MDNodes in > MDNodeSet that...
2013 Nov 13
0
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...nly has 393MB of MDNodes. There are 649-393MB (40% of >>> 649MB) not used. >>> >>> MDNodes belong to the Context, deleting modules will not release the >>> MDNodes. >>> >>> One possible solution is: >>> >>> In LLVMContext, add “removeUnusedMDNodes" function >>> It goes through OwnedModules and check if a MDNode is used by any of >>> the modules, if not remove it. >>> One implementation is to mark a visited MDNode used when traversing >>> the module. After done traversing all modules, we can delete...
2013 Nov 13
2
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...are 649-393MB (40% of >>>> 649MB) not used. >>>> >>>> MDNodes belong to the Context, deleting modules will not release the >>>> MDNodes. >>>> >>>> One possible solution is: >>>> >>>> In LLVMContext, add “removeUnusedMDNodes" function >>>> It goes through OwnedModules and check if a MDNode is used by any of >>>> the modules, if not remove it. >>>> One implementation is to mark a visited MDNode used when traversing >>>> the module. After done traversing all module...
2013 Nov 13
2
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...v 12, 2013, at 4:59 PM, Chandler Carruth <chandlerc at google.com> wrote: > Other options are: > 1> Using a different LLVMContext for the destination module, but it didn’t work out since Linker was not designed to work with different LLVMContexts for source vs destination. > 2> removeUnusedMDNodes checks if a MDNode is used in a different way (i.e use_empty() && !hasValueHandler()), but it does not remove MDNodes that form cycles. > > 3) Make the MDNode be owned by the module that uses it? > > MDNode is shared among modules so multiple modules can use it, if we specif...
2013 Nov 13
0
[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)
...> > wrote: > > Other options are: >>>> 1> Using a different LLVMContext for the destination module, but it >>>> didn’t work out since Linker was not designed to work with different >>>> LLVMContexts for source vs destination. >>>> 2> removeUnusedMDNodes checks if a MDNode is used in a different way >>>> (i.e use_empty() && !hasValueHandler()), but it does not remove MDNodes >>>> that form cycles. >>>> >>> >>> 3) Make the MDNode be owned by the module that uses it? >>> >>...