<div dir="ltr">Hello,<div>I decided to implement some of <a href="http://llvm.org/OpenProjects.html#compaction" target="_blank">code compaction</a> passes. To start, I chose basic block factoring out, suggested in <a href="http://users.elis.ugent.be/~brdsutte/research/publications/2000TOPLASdebray.pdf" target="_blank">article</a> (Section 3.3). Unlike the article, I implemented procedural abstraction for basic blocks on LLVM-IR level (probably it was not the best choice) and faced a problem: Is there any efficient way to determine, what size will instruction take in some particular architecture?</div><div>Reference to the pass: <a href="https://github.com/skapix/codeCompaction" target="_blank">https://github.com/<wbr>skapix/codeCompaction</a></div><div>It is my first project, connected to LLVM infrastructure, I would appreciate any help.</div></div>