[all-commits] [llvm/llvm-project] 945ed2: [X86] Move the implicit enabling of sse2 for 64-bi...

topperc via All-commits all-commits at lists.llvm.org
Fri Jul 24 11:19:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 945ed22f3397f52469618cd8a94207665f25bebd
      https://github.com/llvm/llvm-project/commit/945ed22f3397f52469618cd8a94207665f25bebd
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-07-24 (Fri, 24 Jul 2020)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
    M llvm/lib/Target/X86/X86Subtarget.cpp

  Log Message:
  -----------
  [X86] Move the implicit enabling of sse2 for 64-bit mode from X86Subtarget::initSubtargetFeatures to X86_MC::ParseX86Triple.

ParseX86Triple already checks for 64-bit mode and produces a
static string. We can just add +sse2 to the end of that static
string. This avoids a potential reallocation when appending it
to the std::string at runtime.

This is a slight change to the behavior of tools that only use
MC layer which weren't implicitly enabling sse2 before, but will
now. I don't think we check for sse2 explicitly in any MC layer
components so this shouldn't matter in practice. And if it did
matter the new behavior is more correct.




More information about the All-commits mailing list