This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Change how the native architecture is determined
ClosedPublic

Authored by john.brawn on Jun 29 2018, 10:43 AM.

Details

Summary

Currently the llvm-exegesis native architecture is determined by comparing the llvm native architecture with X86, so to add a new target would mean adding a new check. Change this to building up a list of the targets llvm-exegesis supports then using that, as this means that when adding a new target you just add the target to the list of supported targets.

Diff Detail

Repository
rL LLVM

Event Timeline

john.brawn created this revision.Jun 29 2018, 10:43 AM
courbet added inline comments.Jun 30 2018, 3:02 AM
tools/llvm-exegesis/CMakeLists.txt
14 ↗(On Diff #153531)

Does this work if the variable LLVM_EXEGESIS_TARGETS is never set (e.g. if llvm targets to build is just "ARM") ?

john.brawn added inline comments.Jul 2 2018, 6:10 AM
tools/llvm-exegesis/CMakeLists.txt
14 ↗(On Diff #153531)

Yes, we get the some behaviour as we currently do (LLVM_EXEGESIS_NATIVE_ARCH is not set, so the default exegesis target is used).

courbet accepted this revision.Jul 2 2018, 6:39 AM
This revision is now accepted and ready to land.Jul 2 2018, 6:39 AM
This revision was automatically updated to reflect the committed changes.