James_Clayton at scee.net
2012-Aug-17 15:28 UTC
[LLVMdev] MSCV linker and OperandInfo constants
Hello all, I've managed to trace an awkward bug down to the MSVC linker incorrectly merging llvm::OperandInfo constants between various backend targets I was linking in to my compiler executable. The bug manifested itself by replacing the operand data structures for target A with the data structures for target B. I have managed to work around this issue by moving the operand definitions from the llvm namespace to a sub-target namespace (i.e. llvm::OperandInfo5 -> llvm::X86::OperandInfo5) My work around changes the InstrInfoEmitter::run() function in TableGen/InstrInfoEmitter.cpp . A patch (from llvm 3.0 - it doesn't appear much has changed) can be found here: http://pastebin.com/pHmu1V63 The whole modified function can be found here: http://pastebin.com/GN4Hh7BC This is a simple scoping change, there should be no change in application behaviour. This is the first time I've made any patches to llvm - please let me know if you'd like any more information. Kind regards, James Clayton Sony Computer Entertainment Europe Limited ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster at scee.net This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** P Please consider the environment before printing this e-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120817/6b276d23/attachment.html>
James_Clayton at scee.net writes: [snip]> This is the first time I've made any patches to llvm - please let me know > if you'd like any more information.Please consider submitting your patch to llvm-commits mailing list, which is the correct place for reviewing patches. Inline the patch in your message, don't post links. OTOH, you may be interested on the LLVM coding standards, although such small shouldn't be a problem: http://llvm.org/docs/CodingStandards.html [BTW, anyone knows where is the document that used to explain how to contribute to LLVM? (preparing and submitting patches, etc). The new document structure with its intermediate pages is a step backwards IMAO. The monolithic index is more convenient. After all, we have not so many documents.]
On Fri, Aug 17, 2012 at 10:29 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:> James_Clayton at scee.net writes: > > [snip] > >> This is the first time I've made any patches to llvm - please let me know >> if you'd like any more information. > > Please consider submitting your patch to llvm-commits mailing list, > which is the correct place for reviewing patches. Inline the patch in > your message, don't post links. > > OTOH, you may be interested on the LLVM coding standards, although such > small shouldn't be a problem: > > http://llvm.org/docs/CodingStandards.html > > > [BTW, anyone knows where is the document that used to explain how to > contribute to LLVM? (preparing and submitting patches, etc). The new > document structure with its intermediate pages is a step backwards > IMAO. The monolithic index is more convenient. After all, we have not so > many documents.]http://llvm.org/docs/DeveloperPolicy.html . -Eli