Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

How to input llvm IR into aoc?

Hello,

The aoc compiler gets the <input>.cl kernel code and passes to aocl-clang to generate altera's specific LLVM IR.

I would like to know if I can feed (somehow) the LLVM IR (using clang -x cl -s -emit-llvm input.cl -o output.ll) inside the aoc compiler ?

I see that the aoc compiler uses the aocl-opt and etc as tool for its chain, but I don't know wich flags should I use. Furthermore, I do not know if aocl-clang frontend does anything to the IR different from the standard clang (what I think it is a company secret).

My interest in doing this (feed my clang IR into aoc) is because I'm writing a LLVM optimization pass which results I would like to use to create an FPGA accelerator.

Thank you

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    How do you hack the aoc compilation flow ? I think aocl is a different command chain from aoc.