[PATCH] Fix hardcoded stack probe space

David Majnemer david.majnemer at gmail.com
Wed Dec 24 23:22:27 PST 2014


In http://reviews.llvm.org/D6684#104236, @AndrewH wrote:

> > What happens if we do LTO?
>
>
> Well, if nothing else is specified, it will take the default stack probe size; that means that the behavior with LTO is as it was before.


Sure, but MSVC also supports LTO (under the name LTCG).  I'd imagine that they have some sort of behavior when a function with probe size X gets inlined into a function with probe size Y.  My guess would be that they'd just take the max of the two functions.

> 

> 

> > Don't we need to record the probe size on the function?

> 

> 

> Great suggestion! That might be useful.

> 

> > It wouldn't make sense to make it a command line flag if we supported this on a per function basis.

> 

> 

> I think that the stack alignment is also tracked on a per function basis, and there is still a command line flag for overriding that.

> 

> My aim is currently to get MSVC's /Gs into LLVM, and I cannot see how one could do that without a command line flag.


Well, we need a command line flag at the clang level.  I don't see why we would need one at the LLVM level because clang can translate the /Gs value into a function attribute.

> I will look how the stack alignment is specified when using LTO and will report back if that is also useful in this case.





REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6684

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list