[PATCH] D74156: [llvm-exegesis] Exploring X86::OperandType::OPERAND_COND_CODE

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 12:25:59 PST 2020


lebedev.ri created this revision.
lebedev.ri added reviewers: courbet, gchatelet.
lebedev.ri added a project: LLVM.
Herald added subscribers: mstojanovic, atanasyan, jrtc27, tschuett, sdardis.

Currently, we only have nice exploration for LEA instruction,
while for the rest, we rely on `randomizeUnsetVariables()`
to sometimes generate something interesting.
While that works, it isn't very reliable in coverage :)

Here, i'm making an assumption that while we may want to explore
multi-instruction configs, we are most interested in the
characteristics of the main instruction we were asked about.

Which we can do, by taking the existing `randomizeMCOperand()`,
and turning it on it's head - instead of relying on it to randomly fill
one of the interesting values, let's pregenerate all the possible interesting
values for the variable, and then generate as much `InstructionTemplate`
combinations of these possible values for variables as needed/possible.

Of course, that requires invasive changes to no longer pass just the
naked `Instruction`, but sometimes partially filled `InstructionTemplate`.

As it can be seen from the test, this allows us to explore
`X86::OperandType::OPERAND_COND_CODE` for instructions
that take such an operand.
I'm hoping this will greatly simplify exploration.

Thoughts?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74156

Files:
  llvm/test/tools/llvm-exegesis/X86/latency-SETCCr-cond-codes-sweep.s
  llvm/tools/llvm-exegesis/lib/CodeTemplate.h
  llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp
  llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h
  llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
  llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.h
  llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
  llvm/tools/llvm-exegesis/lib/SnippetGenerator.h
  llvm/tools/llvm-exegesis/lib/Target.h
  llvm/tools/llvm-exegesis/lib/X86/Target.cpp
  llvm/tools/llvm-exegesis/llvm-exegesis.cpp
  llvm/unittests/tools/llvm-exegesis/Mips/SnippetGeneratorTest.cpp
  llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74156.242977.patch
Type: text/x-patch
Size: 31956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/a4db0d91/attachment.bin>


More information about the llvm-commits mailing list