http://llvm.org/bugs/show_bug.cgi?id=20124
Bug ID: 20124
Summary: EVT instances refer indirectly to a specific
LLVMContext
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
This report is based on a request at llvmdev at
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074145.html
This is about an observation that the EVT's cached and returned from
SDNode::getValueTypeList(EVT VT)
are keyed by the llvm::Type pointer which in turn refer to a LLVMContext.
But that, if you use several LLVMContext instances over the lifetime of
a program, this EVT map seems to accumulate new entries for each new
LLVMContext
that is used.
The memory is correctly freed on destruction of managed singletons, but until
then it is kept around. This matches in effect the behavior of a memory leak,
even if being finally freed at the end and by that not being a memory leak in
it's strong sense.
I cannot talk about llvm's internal structure, but given the comments in the
above mentioned mailing list thread this reference chain seems to be unwanted
for
other reasons also.
Thanks in advance
Mathias
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs