[PATCH] D30689: [ConstantFolding] Small fix to prevent constant folding having to repeatedly scan operands.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 03:43:43 PDT 2017


dmgreen added a comment.

Sorry for the delay, I was obtaining commit access and then busy with a few other things.

Adding a unittest is an interesting idea. I'm not sure if it would be a lot better though, as it would be testing a fairly minor implementation detail of the Constant Folding interface. The results of the constant folding should be the same, it will just be recursively called a lot less. This test case also has the advantage of making sure nothing else causes the same kind of execution time blow-up.

Unless you have any objections, I'll commit this later today. Let me know.
Dave


https://reviews.llvm.org/D30689





More information about the llvm-commits mailing list