[llvm] [compiler-rt] [clang-tools-extra] [clang] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 18:07:35 PST 2023
================
@@ -334,6 +335,15 @@ template<> struct simplify_type<User::const_op_iterator> {
}
};
+template <> struct GraphTraits<User *> {
----------------
wenju-he wrote:
> For the specific problem here, I'd consider expanding all constant expressions in the function upfront, and then not having to deal with it.
is it right that I can use convertUsersOfConstantsToInstructions to expand constantexp to instructions? However, convertUsersOfConstantsToInstructions changes other functions as well. An option to add an addition function parameter to convertUsersOfConstantsToInstructions to ensure only constexpr users in the function is expanded. @nikic WDYT of this option?
convertUsersOfConstantsToInstructions is also doing a DFS on user of User.
https://github.com/llvm/llvm-project/pull/70611
More information about the llvm-commits
mailing list