[llvm-dev] "[NFC]" Abuse
John McCall via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 17 12:13:16 PDT 2021
On 17 Jun 2021, at 13:15, David Blaikie via llvm-dev wrote:
> Got links to the reviews? Hard to discuss in the abstract.
> But generally, if it is intended to change observable behavior of the LLVM
> program (if you have to modify a lit test, that's not NFC, if one could
> craft a test (that doesn't invoke UB, though that shouldn't be possible
> through the command line interface, etc) that would need to be modified
> when the patch is committed - then it's not NFC).
> But I think it's important that NFC is about intent, not about the reality
> of what the patch ends up doing - so we can't judge an NFC patch by whether
> it causes a regression later - the NFC marker is there to say "I don't
> intend this to cause any observable change, if you observe any change,
> that's a bug" in the same way any patch description is a statement of
> intent and can't be more than that.
Yeah, I expect NFC changes to be purely internal implementation
details. Changing the public interface (even to add a feature)
isn’t NFC; neither is anything that can affect output.
There are a few places where LLVM does track global state that we don’t
normally consider “output”. I think a change that created fewer
llvm::ConstantExpr’s by, say, not generating a bitcast that only gets
stripped/replaced a few cycles later would still count as NFC to me,
since we don’t really consider the set of unused ConstantExprs to
be output. But those are clarifications of the general rule, not
More information about the llvm-dev