[llvm-commits] [PATCH] PR889: devirtualize Value::printCustom

Jay Foad jay.foad at gmail.com
Mon Nov 14 01:45:14 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=889

As a small step towards the goal of PR889 "Eliminate Virtual Methods
In VMCore To Make Value Objects Smaller", this patch eliminates the
virtual method Value::printCustom.

As I mentioned in the PR, this is complicated because we don't want to
introduce a library dependency from AsmWriter (which is in LLVMCore)
to PseudoSourceValue (which is in LLVMCodeGen). The approach I took is
to refactor PseudoSourceValue a bit so that the printCustom method is
trivial, and can be moved out of the .cpp file and into an inline
function in the .h file.

Dan, I've CC'ed you because it looks like you introduced both
PseudoSourceValue and the printCustom mechanism.

Tested with "make check". OK to commit?

Thanks,
Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: psv.diff
Type: text/x-patch
Size: 10124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111114/c0e86292/attachment.bin>


More information about the llvm-commits mailing list