[llvm-commits] [PATCH] update getPointerTo to handle multiple address spaces

Chandler Carruth chandlerc at google.com
Mon Oct 29 13:16:07 PDT 2012


I completely agree with Eli's comments here.

The more of these patches I see, the more the API for address spaces
looks *wrong*. I want to go and fix these APIs first, and I am opposed
to *any* further churn to switch client code until we finish fixing
them.

Some concrete next steps:

1) The type used to "base" a pointer type on must *always* be a
pointer. Please go back and implement my (and Duncan, and others')
suggestion to assert if the type is anything other than a pointer or
vector of pointers. This bit of code review has been neglected for
over a week as churn and chaos develop in the codebase. That is
unacceptable.

2) You should look at integrating the address space and pointer type
creation with IRBuilder the same way that integer type creation is
built into it. We don't have to pass the LLVM Context object around
everywhere as a consequence, and I suspect that a similar simplifying
pattern will emerge where we can set the default address space in the
IRBuilder (or other builder class) and re-use it pervasively rather
than having 0U encoded everywhere (which is still better than random
recursive type references!)

On Fri, Oct 26, 2012 at 3:24 PM, Micah Villmow <villmow at gmail.com> wrote:
> This patch updates getPointerTo to handle multiple address spaces. The original request was here:
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121022/154243.html
>
> http://llvm-reviews.chandlerc.com/D85
>
> Files:
>   lib/Transforms/Vectorize/LoopVectorize.cpp
>   lib/Transforms/Instrumentation/ThreadSanitizer.cpp
>   lib/Transforms/Instrumentation/GCOVProfiling.cpp
>   lib/Transforms/Instrumentation/ProfilingUtils.cpp
>   lib/Transforms/Scalar/SROA.cpp
>   lib/VMCore/Constants.cpp
>   lib/VMCore/Type.cpp
>   lib/VMCore/Verifier.cpp
>   lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>   lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
>   lib/ExecutionEngine/ExecutionEngine.cpp
>   include/llvm/Type.h
>   examples/ExceptionDemo/ExceptionDemo.cpp
>   tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
>   tools/clang/lib/CodeGen/CGObjCMac.cpp
>   tools/clang/lib/CodeGen/CGExprScalar.cpp
>   tools/clang/lib/CodeGen/CGExpr.cpp
>   tools/clang/lib/CodeGen/CGVTables.cpp
>   tools/clang/lib/CodeGen/CGClass.cpp
>   tools/clang/lib/CodeGen/CGBuiltin.cpp
>   tools/clang/lib/CodeGen/CGDecl.cpp
>   tools/clang/lib/CodeGen/CGCXXABI.cpp
>   tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
>   tools/clang/lib/CodeGen/CGException.cpp
>   tools/clang/lib/CodeGen/CGCXX.cpp
>   tools/clang/lib/CodeGen/CGObjC.cpp
>   tools/clang/lib/CodeGen/CodeGenTypes.cpp
>   tools/clang/lib/CodeGen/CodeGenModule.cpp
>   tools/clang/lib/CodeGen/CGExprCXX.cpp
>   tools/clang/lib/CodeGen/CGCall.cpp
>   tools/clang/lib/CodeGen/CGBlocks.cpp
>   tools/clang/lib/CodeGen/CGObjCRuntime.cpp
>   tools/dragonegg/src/Backend.cpp
>   tools/dragonegg/src/TypeConversion.cpp
>   tools/dragonegg/src/ConstantConversion.cpp
>   tools/dragonegg/src/x86/Target.cpp
>   tools/dragonegg/src/Convert.cpp
>   tools/dragonegg/src/DefaultABI.cpp
>   tools/lldb/source/Expression/IRForTarget.cpp
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list