[PATCH] D41832: LLParser: do not verify LLVM module

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 09:37:24 PST 2018


arsenm added a comment.

In https://reviews.llvm.org/D41832#988124, @aprantl wrote:

> I think I need some more context here. Is it accurate description that you want to be able to have LLParser accept malformed/underspecified address spaces on allocas? Why do you want to do this? Is this for writing testcases only? Both llc and opt already take an option to disable the verifier for the purpose of writing testcases. Why does this not work for you?


The problem is tools like llc/opt can set the triple/datalayout from the command line. The parser is only capable of validating based on whatever IR is in the parsed module, so there is an inconsistency in what is considered valid IR until the datalayout is set. The verifier needs to be run as a separate step from the parsing, so clients would need to be responsible for running the verifier after it's set the datalayout. This is an issue for any datalayout dependent properties checked by the verifier, which as far as I can tell today is the alloca address space, and non-integral pointer address spaces.


https://reviews.llvm.org/D41832





More information about the llvm-commits mailing list