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

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 11:44:04 PST 2018


yaxunl added a comment.

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

> Thanks for checking!
>
> Based on this, we could either
>
> - make it the responsibility of the Caller of LLParser to run the Verifier and update those tools to run the Verifier.
> - or pass the override datalayout into LLParser so it can inject it before running the Verifier.
>
>   I personally don't like the idea of relaxing the Verifier / making it verify something that is not what is being fed into the later stages. (Feel free to try and convince me otherwise though :-)


If we don't want to modify Verifier, then the only choice is to add an option to LLParser to allow datalayout to be overridden. Then the verifier will see a valid IR.

By adding the option to LLParser, all the tools automatically get an option to override the datalayout, then minimal change is needed.


https://reviews.llvm.org/D41832





More information about the llvm-commits mailing list