[PATCH] D50524: [Hexagon] Replace fatal error with remark in HexagonISelLowering

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 10 14:02:46 PDT 2018


kparzysz added a comment.

I understand your point, which I believe is that the user can always sneak in some invalid code using valid instructions, which then some pass will transform into an invalid instruction.  This is actually motivated by such a case (an assert cause by user program).  The problem is that the assert also helped find compiler bugs, so in that sense it served its purpose.  This patch is meant to address the problem in the user code before it gets to that pass, or essentially to filter out user problems before they can no longer be differentiated from internal compiler errors. It isn't intended to catch all possible forms of invalid input, but I believe it covers the only way that the user's program can trigger that particular assertion.

The point about internal vs. external assembler was that if we accept and propagate invalid instructions down the transformation sequence, the integrated assembler will eventually need to generate some code (since it shouldn't report errors). When generating the textual assembly, a wrong instruction can easily be printed, but then the external assembler would pick it up.  Patching up invalid instructions in the assembly printer is a bit much, besides, this was really a hypothetical situation (for the purpose of illustrating my point).


Repository:
  rL LLVM

https://reviews.llvm.org/D50524





More information about the llvm-commits mailing list