[llvm-exegesis] Allow the randomizer to fail nicely...
authorClement Courbet <courbet@google.com>
Wed, 22 Jan 2020 14:49:10 +0000 (15:49 +0100)
committerClement Courbet <courbet@google.com>
Thu, 23 Jan 2020 10:08:44 +0000 (11:08 +0100)
commit04fd20415612f02c4b09da526f19d24e6fe18e7e
treed6860d92fab6828ae78bbad3911b3c99833f2db3
parent5c02fe1faabd5519c48ded170fe849f9b2c8d10f
[llvm-exegesis] Allow the randomizer to fail nicely...

Summary:
... instead of crashing.
On typical exmaple is when there are no available registers.

Reviewers: gchatelet

Subscribers: tschuett, mstojanovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73196
llvm/tools/llvm-exegesis/lib/RegisterAliasing.cpp
llvm/tools/llvm-exegesis/lib/RegisterAliasing.h
llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
llvm/tools/llvm-exegesis/lib/SnippetGenerator.h
llvm/tools/llvm-exegesis/lib/Target.cpp
llvm/tools/llvm-exegesis/lib/Target.h
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp