We've fixed the case where this could return an instruction after the given instruction, but also means that we can falsely return a 'unique' def when they could be one coming from the backedge of loop.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
451 | Small nit but you could use Parent here to avoid calling MI->getParent() again. |
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
444 | nit: after some coding style discussion on the list, I believe it is preferred to put brackets there. | |
449 | nit: produces -> producing? | |
453 | If I am not mistaken, looks like we are actually return nullptr here, except for one case. Thus, can we simplify the above to this below? if (Def->getParent() != Parent && Incoming.size() == 1) return Def; return nullptr; |
Comment Actions
Cheers, LGTM
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
445–446 | typos: "with" and "that is does" |
nit: after some coding style discussion on the list, I believe it is preferred to put brackets there.