[PATCH] D12946: Avoid pointer truncation by InstCombine with IntToPtr combining

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 18:25:16 PDT 2015


rampitec added a comment.

BTW, even a single code address space is not a good solution. It might serve immediate need, but not good enough as a general abstraction.
Back in 286 times there were far and near functions and code pointers. So several code address spaces might be needed for some implementations.
Maybe instead of making new code address spaces, it would make sense to be able map code to a particular address space as a separate field of data layout, and have a way of providing several such mappings.
That will change the whole way of querying pointer size across the compiler though. Generally it will be impossible to ask for a pointer size given an address space, only given a type.

Stas


Repository:
  rL LLVM

http://reviews.llvm.org/D12946





More information about the llvm-commits mailing list