Hello,>From VTune profiler, we notice that function MDNodeOperand::deleted, called from destructor ~llvmContextImpl, consumes ~18% (0.67 sec) of the total compilation time (3.7sec). This llvm module has ~400 metadata. Is this destruction time unexpectedly high or just expected? Or we should avoid to use this amount of metadata in the first place. Any thoughts or suggestions?Thanks, Wei
it would be better if u can post the llvm module her if it's not too large? -Xin On Wednesday, July 15, 2015, Pan, Wei <wei.pan at intel.com> wrote:> Hello, > > From VTune profiler, we notice that function MDNodeOperand::deleted, > called from destructor ~llvmContextImpl, consumes ~18% (0.67 sec) of the > total compilation time (3.7sec). This llvm module has ~400 metadata. Is > this destruction time unexpectedly high or just expected? Or we should > avoid to use this amount of metadata in the first place. Any thoughts or > suggestions? > > Thanks, > Wei > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu <javascript:;> http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150715/fe5b0139/attachment.html>
> On 2015-Jul-15, at 14:49, Pan, Wei <wei.pan at intel.com> wrote: > > Hello, > > From VTune profiler, we notice that function MDNodeOperand::deleted, called from destructor ~llvmContextImpl, consumes ~18% (0.67 sec) of the total compilation time (3.7sec). This llvm module has ~400 metadata. Is this destruction time unexpectedly high or just expected? Or we should avoid to use this amount of metadata in the first place. Any thoughts or suggestions?I'm not surprised by this. The Metadata hierarchy generally was stuck with some inefficient API prior to 3.6. Note that the class no longer exists in ToT. You might want to check out the 3.6 release notes to see how Metadata changed; it should be a fair bit more efficient. It's been tuned for memory usage so far (not yet compile time), but I've noticed compile time improvements as well. If you can reproduce such a bottleneck in LLVMContextImpl teardown on ToT, please file a PR and CC me and I'll look into it.