[llvm] Correctly set pointer bit for aggregate values in SelectionDAGBuilder to fix CCIfPtr (PR #70554)
Camil Staps via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 01:47:35 PST 2024
================
@@ -75,20 +75,23 @@ void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty,
SmallVectorImpl<uint64_t> *FixedOffsets,
uint64_t StartingOffset);
-/// Variant of ComputeValueVTs that also produces the memory VTs.
+/// Variant of ComputeValueVTs that also produces the memory VTs and VT types.
----------------
camilstaps wrote:
@arsenm thank you. I realize this is an old PR – because we were fine working with an LLVM fork, it had less priority to get this merged.
I believe I have addressed your comments. It is possible to return `Type*`s instead of `EVT`s. For this purpose I have added `ComputeValueTypes()`. If you have time I would appreciate advice on what to do with `ComputeValueVTs()`:
1. Remove `ComputeValueVTs()` and rewrite each call site to use `ComputeValueTypes()`. This will be cumbersome as there are many use cases that do not need the extra information and would then need to get the `EVT` from the `Type*`.
2. Do nothing and accept code duplication between `ComputeValueVTs()` and `ComputeValueTypes()`.
3. Rewrite `ComputeValueVTs()` in terms of `ComputeValueTypes()`: iterate over the `Type*`s to get `EVT`s. Reduces duplication, but requires an extra iteration over the result.
I would lean to option 2, but I don't know the general philosophy followed in this code base.
https://github.com/llvm/llvm-project/pull/70554
More information about the llvm-commits
mailing list