[llvm] Introduce DIExpression::foldConstantMath() (PR #71718)
Shubham Sandeep Rastogi via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 12:27:37 PST 2023
================
@@ -3045,7 +3045,10 @@ class DIExpression : public MDNode {
std::pair<DIExpression *, const ConstantInt *>
constantFold(const ConstantInt *CI);
- DIExpression *constantFold();
+ /// Try to shorten an expression with constand math operations that can be
+ /// evaulated at compile time. Returns a new expression on success, or the old
+ /// expression if there is nothing to be reduced.
+ DIExpression *foldConstantMath();
----------------
rastogishubham wrote:
This is a small error in how I set up the PRs, the name should be `foldConstantMath` because I dont want it to be confused for `DIExpression:constantFold()`
They do different things
https://github.com/llvm/llvm-project/pull/71718
More information about the llvm-commits
mailing list