[llvm] [InlineCost] Allow simplifying to non-Constant values (PR #145083)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 20 12:00:49 PDT 2025
================
@@ -525,11 +526,33 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
InlineResult analyze();
- std::optional<Constant *> getSimplifiedValue(Instruction *I) {
- auto It = SimplifiedValues.find(I);
- if (It != SimplifiedValues.end())
- return It->second;
- return std::nullopt;
+ // Lookup simplified Value. May return a value owned by the caller.
----------------
nikic wrote:
```suggestion
/// Lookup simplified Value. May return a value owned by the caller.
```
https://github.com/llvm/llvm-project/pull/145083
More information about the llvm-commits
mailing list