[PATCH v2] tidy the MCJIT tests now applyPermissions will invalidate cache

David Tweed david.tweed at arm.com
Tue May 14 08:59:42 PDT 2013


Hi,

 

| I'm totally with you on this!  And I agree with that being documented. I
just think that calling finalizeObject() is the more canonical way of doing
this, even if applyPermissions() also works - and the tests should do the
canonical thing unless there is

|good reason not to.

 

|I do like the idea of adding more regression tests that cover even the
non-canonical ways of doing things just so we can have a way of finding out
if they break. But the generic tests should still do the canonical thing
since they are not meant to cover the |more exotic behaviors. 


Attached is a patch which modifies the existing tests (but doesn't add any
new ones) to use finalizeObject() where possible. In testing on an ARM
pandaboard I found that the multiple_functions test reliably segfaults if I
used finalizeObject there. It also changes the name of the method from
applyPermissions() to updateMemoryAttributes(), which I'd be happy with in
another codebase but since "attribute" is a specific, different thing in
LLVM I'm not sure it's a change for the better. My thesaurus didn't throw up
any other likely candidates.

 

Any comments, or feedback from anyone testing on other architectures where
this breaks the tests, is very welcome.

 

Cheers,

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130514/b5ca4162/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcjit.diff
Type: application/octet-stream
Size: 13682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130514/b5ca4162/attachment.obj>


More information about the llvm-commits mailing list