[PATCH] D63058: [InlineCost] Fix bug 42084: return the first negative result
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 18:08:38 PDT 2019
chandlerc requested changes to this revision.
chandlerc added a comment.
This revision now requires changes to proceed.
I think this is somewhat the wrong approach.
I think we need to widen the interface a bit to return two pieces of information instead of one:
1. The highest cost computed
2. Any inline-blocking construct encountered
And we should phrase #2 as a bitmask so that we can return multiple things in it. One of them can be that we exceeded the threshold, another can be any terminal condition we additionally reached like recursion.
I think this will also make the code more clear as we won't be throwing away any information at any step.
-Chandler
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63058/new/
https://reviews.llvm.org/D63058
More information about the llvm-commits
mailing list