[PATCH] D158837: [ConstraintElim] Store conditional facts as (Predicate, Op0, Op1).
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 07:11:57 PDT 2023
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:1415
+ dbgs() << "Processing fact to add to the system: "
+ << CmpInst::getPredicateName(Pred) << " ";
+ A->printAsOperand(dbgs());
----------------
I think you can directly `<< Pred` nowadays.
================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:1418
+ dbgs() << ", ";
+ B->printAsOperand(dbgs());
+ dbgs() << "\n";
----------------
You can pass false to avoid printing the type again.
================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:1461
+ if (A)
+ AddFact(Pred, A, B);
}
----------------
I feel like this code would be simpler/cleaner if you didn't share this AddFact call and just did it in both branches above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158837/new/
https://reviews.llvm.org/D158837
More information about the llvm-commits
mailing list