[llvm-commits] [llvm] r147825 - /llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jan 9 18:44:53 PST 2012


On Jan 9, 2012, at 6:10 PM, Chandler Carruth wrote:

> On Mon, Jan 9, 2012 at 5:34 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> As always, test cases for this stuff are insane.
> 
> This is starting to worry me. How will we ever catch regressions? It seems like there has to be a way to write test cases for this kind of stuff, even if it means digging out and exposing more of the innards... Maybe this is a place where unit tests could actually work? I haven't looked at it at all, I'm just looking for a way to write non-insane test cases for this (clearly tricky) part of the backend....

The particular issue is exposed when an instruction is at a function offset == 2 (mod 4), and it references an 8-byte aligned constant pool entry, and there is at least 4k of basic block both before and after the instruction.

While it may be practical to write a unit test for that particular case, it seems like a dead end for most other cases. A codegen pass depends on a lot of data structures being in place, and generating MI IR programmatically is horrible.

As we discussed before, the best solution is to feed serialized MI IR directly into the pass. It's just a small matter of engineering.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120109/ce1eb49d/attachment.html>


More information about the llvm-commits mailing list