[PATCH] D101704: [IR] Introduce the opaque pointer type

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 00:03:53 PDT 2021


pcc accepted this revision.
pcc added a comment.

This looks like a reasonable starting point for switching to opaque pointers in LLVM.

I think the most intuitive next step would be to get things working end-to-end with opaque pointers, starting with simple programs and going from there. As a side effect of that process we will no doubt cause some of the lit tests to start passing with opaque pointers -- as we do so, they can be converted incrementally to use opaque pointers.

Specifically what I would suggest is:

1. Add a command line flag that makes it so that `PointerType::get(Type *, unsigned)` always returns an opaque pointer type.

2. Turn it on and compile hello world with clang -O0. At this point this will almost certainly fail. Fix any issues found that way until hello world compiles and runs.

3. Repeat for hello world at -O2.

4. Once hello world is working, move on to larger programs, e.g. the LLVM test suite. As programs start working, have the test suite pass the flag for those programs to prevent backsliding.

5. In parallel with 2-4, gradually convert the lit tests to use opaque pointers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101704/new/

https://reviews.llvm.org/D101704



More information about the llvm-commits mailing list