Most targets in LLVM have some set of library calls. ARM has a particularly large set of library calls that need to be initialized along with additional information on the calling convention and predication of the calls. Hexagon too has a significant number of calls that get setup, followed closely by SPARC. The other targets seem to not have as many library calls that need to be setup when the target is being setup. I made a change to the ARM backend to make the library call setup be more table driven, and Renato pointed out that this might be something that might be more useful across the other targets. We could make this more generic and handle it more similar to the vector cost tables if the general consensus is that this is something sufficiently useful on all targets to unify. -- Saleem Abdulrasool compnerd (at) compnerd (dot) org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140518/76773665/attachment.html>
For reference, this is the change: http://llvm.org/viewvc/llvm-project?view=revision&revision=209089 It follows the style that we used in the cost model, and I think it's a good one for the targets that have such a heavily different RT ABI. We could even use some C++11 stuff to declare and set on the same statement. cheers, --renato On 18 May 2014 21:07, Saleem Abdulrasool <compnerd at compnerd.org> wrote:> Most targets in LLVM have some set of library calls. > > ARM has a particularly large set of library calls that need to be > initialized along with additional information on the calling convention and > predication of the calls. Hexagon too has a significant number of calls > that get setup, followed closely by SPARC. The other targets seem to not > have as many library calls that need to be setup when the target is being > setup. > > I made a change to the ARM backend to make the library call setup be more > table driven, and Renato pointed out that this might be something that might > be more useful across the other targets. > > We could make this more generic and handle it more similar to the vector > cost tables if the general consensus is that this is something sufficiently > useful on all targets to unify. > > -- > Saleem Abdulrasool > compnerd (at) compnerd (dot) org
For what it is worth, I found the ARM change to be quiet a nice cleanup. Cheers, Rafael On 18 May 2014 16:07, Saleem Abdulrasool <compnerd at compnerd.org> wrote:> Most targets in LLVM have some set of library calls. > > ARM has a particularly large set of library calls that need to be > initialized along with additional information on the calling convention and > predication of the calls. Hexagon too has a significant number of calls > that get setup, followed closely by SPARC. The other targets seem to not > have as many library calls that need to be setup when the target is being > setup. > > I made a change to the ARM backend to make the library call setup be more > table driven, and Renato pointed out that this might be something that might > be more useful across the other targets. > > We could make this more generic and handle it more similar to the vector > cost tables if the general consensus is that this is something sufficiently > useful on all targets to unify. > > -- > Saleem Abdulrasool > compnerd (at) compnerd (dot) org > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >