[PATCH] D24896: [safestack] Require TargetMachine to be provided.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 14:55:57 PDT 2016


pcc added a comment.

> It looks like the explicit triples are being used in the tests in the non-arch-specific directory simply to force the tests to be run for both x86-64 and i386 targets. This is great for x86, but it means that these tests aren't run at all against other targets, even when another target is the default for the build. That seems bad.
> 
> I would be inclined to remove the explicit triple from these tests and look for another way to exercise the 32-bit x86 targets. A quick and dirty way to do this would be to duplicate the tests as they are now in the X86 directory and leave a version without an explicit triple in the non-arch directory. That's not a good long-term solution but I'm not sure what other options are available. There must be other tests that have this same dilemma though.

Ultimately we do want these tests to run against as many targets as possible, but I think the best way to do that is with a test with multiple RUN lines with different triples, rather than depending on the host triple. The latter seems like a good way to have missing test coverage depending on which platform you happen to be running on.

Moving the existing tests to X86 is a good first step because we don't currently have any tests that target more than one architecture. As we accumulate such tests (either by changing the tests in X86 or by adding new tests) we can move them up one directory.

> Is it possible that a much smaller set of tests could verify whatever i386-specific behavior needs to be tested?

That may certainly be true, but it's orthogonal to fixing our present build issue.


Repository:
  rL LLVM

https://reviews.llvm.org/D24896





More information about the llvm-commits mailing list