[LLVMdev] [llvm-commits] [cfe-commits] [Patch?] Fix handling of ARM homogenous aggregates

Jin Gu Kang jaykang10 at imrc.kist.re.kr
Fri Apr 6 10:42:00 PDT 2012


Hi all,

I think that ABI of LLVM IR level is different from ABI on real architecture
such as ARM or x86. ABI of LLVM IR level doesn't consider about register
usage. It just describes parameters and padding information related to
alignment of parameters. As Anton mentioned, LLVM have expressed ABI
information on bitcode using front-end. If someone wants to maintain information
from high level language like C or C++ on ABI of LLVM IR level, backend must
be modify. In order to change parameter information from high level language
to target specific information, I recommend to modify llvm::TargetLowering::LowerCallTo().
You will be able to make padding information related to target.

Good luck,
Jin-Gu Kang
________________________________________
From: llvm-commits-bounces at cs.uiuc.edu [llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Anton Korobeynikov [anton at korobeynikov.info]
Sent: Friday, April 06, 2012 6:42 PM
To: Tim Northover
Cc: llvm-commits at cs.uiuc.edu; Hägglund H; James Molloy; Patrik at dcs-maillist.cs.uiuc.edu; llvmdev at cs.uiuc.edu
Subject: Re: [llvm-commits] [cfe-commits] [LLVMdev] [Patch?] Fix handling of ARM homogenous aggregates

Tim,

> Opinions, anyone? (Hint hint).
I think here stuff should be thought of from different points. While
providing source type for argument might be beneficial, it might cause
moving the code from frontend to backend. Consider e.g. passing struct
by value including crazy padding inside. The ABI might specify that
padding should be removed and struct is passed field-by-field.

Also, note that in many cases the ABI rules are worded in terms of
source language which might now be preserved during IR generation,
so...

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-dev mailing list