[cfe-dev] Can I establish a relation between a SCoP in LLVM-IR and the corresponding line number in C-code?

Tobias Grosser tobias at grosser.es
Tue Jan 17 07:21:15 PST 2012


On 01/17/2012 04:19 PM, Pieter Custers wrote:
>
> On 17 jan 2012, at 16:02, Sven Verdoolaege wrote:
>
>> On Tue, Jan 17, 2012 at 03:19:03PM +0100, Pieter Custers wrote:
>>> 1) pet would be okay to use, but then I loose the ability to
>>> transform loops in a canonical form (now I use a LLVM pass for that).
>>> Right?
>>
>> No. pet tries very hard not to canonicalize loops in order
>> to maintain a direct relationship between the original loop
>> variables and the elements of the iteration domains, but sometimes
>> it is forced to do so anyway. If you really need your loops to
>> be in some canonical form, then it shouldn't be too hard
>> to add an option to pet to always canonicalize.
>
> Well, its not that I really need them in a canonical form. This is
> needed for Polly to output information in a polyhedral form. What I need
> is polyhedral information about loops/loop-nests in the source code to
> analyze them. The analyzed information must stay in relation to the
> source code as this information is input to a tool that does a
> source2source compilation on the source-code. Can I use *pet* for this?

Sure. If you want to do source2source, pet is probably the tool you want 
to use.

Tobi



More information about the cfe-dev mailing list