Removed code duplication in ThreadCmpOverSelect and broke it
into several smaller functions for reusing them.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Sure - adding others who might have feedback is always a good thing. My review queue is longer than I'd like, but I'm hoping to take a look within a day or two.
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
156 | Here SimplifiedCmp should stay, because composed comparison can be simplified to something other than true or false, so we should return it. |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
156 | Oh, okay :) |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
156 | (maybe you can add a code comment too) |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
158 | btw, do you plan to use this helper functions in a future patch? For now, I dont think we really need them in this patch. |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
158 |
Yes
Well, I believe it makes the code a little bit cleaner anyway. :) |
llvm/lib/Analysis/InstructionSimplify.cpp | ||
---|---|---|
144 | Should the type of the last arg be Constant? | |
147 | Agree - there's no context for what we're doing at this point. IIUC, the original pattern is: And we're checking if this simplifies: What happens after that is complicated...it might help to add an example? |
Should the type of the last arg be Constant?
Constant *TrueOrFalse