fhahn added a comment.

In https://reviews.llvm.org/D24644#792262, @mehdi_amini wrote:

> In https://reviews.llvm.org/D24644#792168, @fhahn wrote:
>
> > I'd like to fix PR22999 and was wondering if you think adding a 
> > function-section attribute to the IR would be a viable solution?
> >
> > When doing LTO, we could add the same function-section to each function in 
> > a module in the IRLinker. @mehdi_amini did you think something like that 
> > when suggesting using attributes?
>
>
> Not sure how this would work? How do you codegen half of the functions with 
> function-section but not all? How is the backend supposed to behave if it 
> starts with a function that isn't decorated with this attribute, then move to 
> one that is, and finally proceed with one that isn't?


hm yes I guess we would have to group the functions by their function-section 
attribute, which isn't such a good idea probably.

@echristo you mentioned that the compiler maybe could determine if we should 
use function-sections during codegen, but it does not seem possible to 
determine the size of the code section before emitting all functions, at which 
point it is already too late. Maybe I am missing something?


Repository:
  rL LLVM

https://reviews.llvm.org/D24644



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to