[LLVMdev] ISRs for PIC16 [was [llvm]r79631 ...]
Sanjiv Gupta
sanjiv.gupta at microchip.com
Mon Aug 24 09:50:40 PDT 2009
Bringing it up again.
- Sanjiv
Sanjiv Gupta wrote:
> Chris Lattner wrote:
>
>> We should discuss this on llvmdev, I think it came up before but there
>> was no conclusive plan that was proposed.
>>
> The approach that we thought for PIC16 can be described in a
> single line as below.
>
> "Keep the functions called from ISR and main separate by cloning the
> shared ones".
>
>
>> In short, I think that this sort of thing should be modeled as an
>> attribute on function definitions, not declarations. I don't
>> understand why you need to clone entire call graphs, but this is best
>> discussed on llvmdev.
>>
> It isn't cloning the entire call graph. It's cloning only the shared
> ones as mentioned above.
>
> The information that a function is ISR is encoded in the section string
> for the lack of a better attribute.
>
> Plus we also wanted to encode some information to inform codegen about
> whether we are codegenerating an interrupt line function. Again the
> section string is used to encode the same. Probably annotations might be
> a better place but that does not work currently (and also, accessing
> them slower). This information is required so that the codegen can emit
> calls to appropriate intrinsics.
>
> So, IMO, the approach is simple, but probably the implementation wasn't
> clean.
>
> Ideas welcome.
>
More information about the llvm-dev
mailing list