Hello, I'm adding a new function attribute in clang and llvm for a backend I'm writing that treats prolog and epilogue code in a special way inside interrupt handlers, similar to what naked does. One way I've seen to do this is to add a new attribute type in Attributes.h, however to me it feels bad to add a target dependent attribute into this place which is very target independent. So what's the best way to do this or is there an api to handle this kind of issues? Thanks for the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120304/65c0e13d/attachment.html>
On Sun, Mar 4, 2012 at 9:07 PM, Borja Ferrer <borja.ferav at gmail.com> wrote:> I'm adding a new function attribute in clang and llvm for a backend I'm > writing that treats prolog and epilogue code in a special way inside > interrupt handlers, similar to what naked does. One way I've seen to do this > is to add a new attribute type in Attributes.h, however to me it feels bad > to add a target dependent attribute into this place which is very target > independent. So what's the best way to do this or is there an api to handle > this kind of issues?FWIW, GCC has something similar. In LLVM IR, interrupt handlers could be considered either a function attribute or a calling convention. I don't have a particular preference. If using a CC, I'd suggest making it be target neutral like fastcc. deep
Apparently Analagous Threads
- [LLVMdev] Issue with Machine Verifier and earlyclobber
- [LLVMdev] LLVM ERROR: ran out of registers during register allocation
- [LLVMdev] Reserving registers that depend on spilled code
- [LLVMdev] Issue with Machine Verifier and earlyclobber
- [LLVMdev] LLVM ERROR: ran out of registers during register allocation