[PATCH] D60057: [llvm-exegesis] Handle CMOV's OPERAND_COND_CODE OperandType
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 05:23:10 PDT 2019
courbet added inline comments.
================
Comment at: tools/llvm-exegesis/lib/SnippetGenerator.cpp:49
: RATC.emptyRegisters();
// TODO: Generate as many BenchmarkCode as needed.
{
----------------
lebedev.ri wrote:
> Any advice on how to best produce multiple variants covering all the condcodes?
> The obvious solution could be to pass `BenchmarkCode` to Target hook that would
> duplicate it for each of the possible condcodes,
> and return vector that would get appended to `Output`.
> Is that on the right track? Anything cleaner?
I think the original idea was to generate several identical templates and let randomization handle exploration. With what you just implemented when generating several instances of the same template you always get the same cond code because you wrote:
```
AssignedValue = llvm::MCOperand::createImm(1);
```
if you did something like:
```
AssignedValue = llvm::MCOperand::createImm(random_int_in_range(0, 2));
```
Then half of your generated snippets would go each way.
+ @gchatelet who started[[ https://github.com/llvm-mirror/llvm/commit/b1497a74adb1d3669dbb16a9e02ee5214ea211a6 | implementing support for exploration ]].
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60057/new/
https://reviews.llvm.org/D60057
More information about the llvm-commits
mailing list