[llvm] Improvements to RS4GC BDV Algorithm (PR #69795)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 07:37:35 PDT 2023
================
@@ -1012,8 +1012,44 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache,
}
#endif
- // Handle all instructions that have a vector BDV, but the instruction itself
- // is of scalar type.
+ // Even though we have identified a concrete base (or a conflict) for all live
+ // pointers at this point, there are cases where the base is of an
+ // incompatible type compared to the original instruction. We conservatively
+ // mark those as conflicts to ensure that corresponding BDVs will be generated
+ // in the next steps
+
+ // this is a rather explicit check for all cases where we should mark the
+ // state as a conflict to force the latter stages of the algorithm to emit
+ // the BDVs. Note that the IE and EE instruction check is not fully subsumed
+ // by the vector<->scalar check at the end, this is due to the BDV algorithm
+ // being ignorant of BDV types at this junction
+ // TODO: in many cases the instructions emited for the conflicting states
+ // will be identical to the I itself (if the I's operate on their BDVs
+ // themselves). We should expoit this, but can't do it here since it would
+ // break the invariant about the BDVs not being known to be a base.
+ // TODO: the code also does not handle constants at all - the algithm relies
----------------
annamthomas wrote:
```suggestion
// TODO: the code also does not handle constants at all - the algorithm relies
```
https://github.com/llvm/llvm-project/pull/69795
More information about the llvm-commits
mailing list