[PatternMatch] Refactor `m_SpecificInt` to avoid constructing APInt. NFC. (#86259)
This patch passes APInt by const reference in m_SpecificInt instead of by value. Specifically, it refactors `m_SpecificInt(uint64_t V)` to avoid APInt construction and dangling reference. I believe it is safe to pass the APInt by const reference into `m_SpecificInt` even if it is a temporary. See also https://en.cppreference.com/w/cpp/language/lifetime > All temporary objects are destroyed as the last step in evaluating the [full-expression](https://en.cppreference.com/w/cpp/language/expressions#Full-expressions) that (lexically) contains the point where they were created Compile-time impact: https://llvm-compile-time-tracker.com/compare.php?from=d1f182c895728d89c5c3d198b133e212a5d9d4a3&to=7edf459b95ab2be33b70ec67faf87b3b8cc84f09&stat=instructions:u
parent
3a2c70b3
Please register or sign in to comment