[PATCH] D48542: [llvm-exegesis] Generate snippet setup code.

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 05:56:52 PDT 2018


gchatelet added inline comments.


================
Comment at: tools/llvm-exegesis/lib/BenchmarkRunner.cpp:142
+    const std::vector<InstructionInstance> &Snippet) const {
+  // Collect all register uses and create a mov for each of them.
+  // Loop invariant: DefinedRegs[i] is true iif it has been set at least once
----------------
"a mov" -> "an assignment"


================
Comment at: unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp:253
+  InstructionInstance II(Runner.createInstruction(llvm::X86::ADD16ri));
+  // II.randomizeUnsetVariables();
+  II.getValueFor(II.Instr.Variables[0]) =
----------------
remove


================
Comment at: unittests/tools/llvm-exegesis/X86/TargetTest.cpp:41
+  const auto Insts = Target_->setRegToConstant(llvm::X86::XMM1);
+  EXPECT_THAT(Insts, Not(IsEmpty()));
 }
----------------
SizeIs(Gt(0)) ?


Repository:
  rL LLVM

https://reviews.llvm.org/D48542





More information about the llvm-commits mailing list