[LLVMdev] ARM support status (GHC/ARM new calling convention)

Jim Grosbach grosbach at apple.com
Thu Jun 16 14:33:20 PDT 2011


On Jun 16, 2011, at 2:09 PM, Karel Gardas wrote:

> On 06/16/11 11:00 PM, John McCall wrote:
>> On Jun 16, 2011, at 1:35 PM, Karel Gardas wrote:
>>> I'm working on implementing GHC specific call convention into LLVM
>>> 2.9. I've chosen LLVM 2.9 as a kind of stable reference point and I
>>> would like to know how mature is ARM code generation chain inside
>>> this release. I've had a hope that perhaps Apple as a main sponsor
>>> of LLVM is using LLVM for their ARM based iOS software development,
>>> but I'm not sure if I'm right at this.
>> 
>> You are right about this.  ARM code generation is quite mature.
> 
> Great to hear that.
> 
>>> Please bear with me, I'm neither LLVM nor GHC nor ARM expert but
>>> this is my own hobby project to start learning at least Haskell and
>>> ARM. My current state of the work is attached in the form of patch
>>> against LLVM 2.9.
>> 
>> I'm not really qualified to judge your patch, but please note that to
>> have it accepted into LLVM you'll need to make it work on ToT.
> 
> OK, I'll move to git then.
> 
>>> Also is there any way how to convince llc to support -debug
>>> argument? I've build debug build, but it looks like -debug is
>>> missing...
>> 
>> What are you trying to do here?  Emit debug info?
> 
> Just to execute printing like:
> #ifndef NDEBUG
>       dbgs() << "Call operand #" << i << " has unhandled type "
>              << EVT(ArgVT).getEVTString();
> #endif

Use the DEBUG() macro. It'll handle this sort of thing for you. Have a look at some of the existing passes for usage examples It interacts with DEBUG_TYPE to selectively handle debug information.

-Jim



More information about the llvm-dev mailing list