[PATCH] D11969: Avoid using of DataLayout::getPointerSize() without address space argument in DWARF info generation

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 12 23:26:20 PDT 2017


kzhuravl added a comment.

In https://reviews.llvm.org/D11969#224197, @rampitec wrote:

> > In https://reviews.llvm.org/D11969#223472, @joker.eph wrote:
> > 
> >> - The DataLayout does not defined anything about which address space the code resides in
>
> I have checked with our engineer doing debug info, and it he confirmed these uses are not related to code addresses, but generally to variable addresses. In fact in our case all code addresses are redirected, so we should not even hit it. Then a bigger type holding pointers is an inefficiency, but not a bug.
>
> I.e. it looks like the name "CodePointerSize" is not correct, a "PointerSize" makes more sense. Maybe a "getLargestPointerSize()" and a "LargestPointerSize" would be better here.
>  It can even be calculated from the DataLayout itself.


We need to emit correct size for code. I think @mehdi_amini's suggestions are on point. See https://reviews.llvm.org/D30879.


Repository:
  rL LLVM

https://reviews.llvm.org/D11969





More information about the llvm-commits mailing list