[cfe-dev] Clang tests with new pass manager

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 20 14:36:31 PST 2019


On Mon, Feb 18, 2019 at 9:47 PM Chandler Carruth <chandlerc at gmail.com>
wrote:

> I think it would be a shame to lose the ability to run opt and clang -S
>> -emit-llvm for a target without compiling in the target's code generator.
>>
>
> Currently, identical inputs and command line options to `opt` and `clang`
> will produce *different outputs* based on whether a target happened to be
> compiled in at build time. That seems worse to me than producing an error?
>

Doesn't that really only matter if a full pass pipeline gets built, i.e.
opt/clang -O2? Most well-behaved clang and opt tests use
-disable-llvm-passes or `opt -pass=mypass`, and they don't require a
TargetMachine to run. Perhaps we could diagnose an error if the
TargetMachine would be used to build the pipeline. Basically, move the null
check and error to the point of usage.

I feel like this gives us some incremental value of being able to disable
some backends for build time or code size reasons while still being able to
run IR generation and transformation tests that happen to use that triple.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190220/6294cf45/attachment.html>


More information about the cfe-dev mailing list