[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread Nikita Popov via cfe-commits
nikic wrote: > Hi @nikic I read this RFC > https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699 > and it seems it reqires multiple patches to implement it. I am wondering if > you have a link or page which contains all related PRs (or future PRs) ? I > want to track its

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread Nikita Popov via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread Arthur Eubanks via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread MengXuan Cai via cfe-commits
Narutoworld wrote: Hi @nikic I read this RFC https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699 and it seems it reqires multiple patches to implement it. I am wondering if you have a link or page which contains all related PRs (or future PRs) ? I want to track its

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-23 Thread Nikita Popov via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-function-specialization Author: Nikita Popov (nikic) Changes This patch canonicalizes constant expression GEPs to use i8 source element type, aka ptradd. This is the