[llvm] [GVN] Look through select/phi when determining underlying object (PR #99509)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 23:46:02 PDT 2024
================
@@ -736,6 +736,10 @@ inline Value *getUnderlyingObject(Value *V, unsigned MaxLookup = 6) {
return const_cast<Value *>(getUnderlyingObject(VConst, MaxLookup));
}
+/// Like getUnderlyingObject(), but will try harder to find a single underlying
+/// object. In particular, this function also looks through selects and phis.
+const Value *getUnderlyingObjectAggressive(const Value *V);
----------------
nikic wrote:
No, we should not expose unnecessary options. If we have reason to have different levels of aggressiveness for different callers in the future, we will add the option at the time. Until then, cutoffs should be centrally controlled.
https://github.com/llvm/llvm-project/pull/99509
More information about the llvm-commits
mailing list