1. Jun 09, 2019
  2. Jun 08, 2019
    • Sanjay Patel's avatar
      [InstSimplify] enhance fcmp fold with never-nan operand · 4329c15f
      Sanjay Patel authored
      This is 1 step towards correcting our usage of fast-math-flags when applied on an fcmp.
      In this case, we are checking for 'nnan' on the fcmp itself rather than the operand of
      the fcmp. But I'm leaving that clause in until we're more confident that we can stop
      relying on fcmp's FMF.
      
      By using the more general "isKnownNeverNaN()", we gain a simplification shown on the
      tests with 'uitofp' regardless of the FMF on the fcmp (uitofp never produces a NaN).
      On the tests with 'fabs', we are now relying on the FMF for the call fabs instruction
      in addition to the FMF on the fcmp.
      
      I'll update the 'ult' case below here as a follow-up assuming no problems here.
      
      Differential Revision: https://reviews.llvm.org/D62979
      
      llvm-svn: 362879
      4329c15f
    • Sylvestre Ledru's avatar
      fix a typo unavaliable=>unavailable · 375297f3
      Sylvestre Ledru authored
      llvm-svn: 362878
      375297f3
    • Hubert Tong's avatar
      [analyzer][NFC][tests] Pre-normalize expected-plists · 15e3e952
      Hubert Tong authored
      As suggested in the review for D62949, this patch pre-normalizes the
      reference expected output plist files by removing lines containing
      fields for which we expect differences that should be ignored.
      
      llvm-svn: 362877
      15e3e952
    • Hubert Tong's avatar
      [analyzer][NFC][tests] Remove unused expected-plist files · 7081efcc
      Hubert Tong authored
      llvm-svn: 362876
      7081efcc
    • David Bolvansky's avatar
      [NFC] Added tests for D63038 · 54b10449
      David Bolvansky authored
      llvm-svn: 362875
      54b10449
    • David Green's avatar
      [ARM] Adjust isLegalT1AddressImmediate for non-legal types · c5471c2a
      David Green authored
      Types such as float and i64's do not have legal loads in Thumb1, but will still
      be loaded with a LDR (or potentially multiple LDR's). As such we can treat the
      cost of addressing mode calculations the same as an i32 and get some optimisation
      benefits.
      
      Differential Revision: https://reviews.llvm.org/D62968
      
      llvm-svn: 362874
      c5471c2a
    • David Green's avatar
      [ARM] Add MVE addressing to isLegalT2AddressImmediate · 342d1b81
      David Green authored
      Now with MVE being added, we can add the vector addressing mode costs for it.
      These are generally imm7 multiplied by the size of the type being loaded /
      stored.
      
      Differential Revision: https://reviews.llvm.org/D62967
      
      llvm-svn: 362873
      342d1b81
    • David Green's avatar
      [ARM] Add fp16 addressing to isLegalT2AddressImmediate · 4ecce205
      David Green authored
      The fp16 version of VLDR takes a imm8 multiplied by 2. This updates the costs
      to account for those, and adds extra testing. It is dependant upon hasFPRegs16
      as this is what the load/store instructions require.
      
      Differential Revision: https://reviews.llvm.org/D62966
      
      llvm-svn: 362872
      4ecce205
    • David Green's avatar
      [ARM] Add extra gep costmodel tests for MVE and half float. NFC · 990eb2d1
      David Green authored
      llvm-svn: 362871
      990eb2d1
    • David Green's avatar
      [ARM] Add HasNEON for all Neon patterns in ARMInstrNEON.td. NFCI · 10fbaa96
      David Green authored
      We are starting to add an entirely separate vector architecture to the ARM
      backend. To do that we need at least some separation between the existing NEON
      and the new MVE code. This patch just goes through the Neon patterns and
      ensures that they are predicated on HasNEON, giving MVE a stable place to start
      from.
      
      No tests yet as this is largely an NFC, and we don't have the other target that
      will treat any of these intructions as legal.
      
      Differential Revision: https://reviews.llvm.org/D62945
      
      llvm-svn: 362870
      10fbaa96
    • Jonas Paulsson's avatar
      [SystemZ] Fix CMakeLists.txt for alphabetical order (NFC). · bca56ab0
      Jonas Paulsson authored
      llvm-svn: 362869
      bca56ab0
    • Jonas Paulsson's avatar
      [SystemZ, RegAlloc] Favor 3-address instructions during instruction selection. · fdc4ea34
      Jonas Paulsson authored
      This patch aims to reduce spilling and register moves by using the 3-address
      versions of instructions per default instead of the 2-address equivalent
      ones. It seems that both spilling and register moves are improved noticeably
      generally.
      
      Regalloc hints are passed to increase conversions to 2-address instructions
      which are done in SystemZShortenInst.cpp (after regalloc).
      
      Since the SystemZ reg/mem instructions are 2-address (dst and lhs regs are
      the same), foldMemoryOperandImpl() can no longer trivially fold a spilled
      source register since the reg/reg instruction is now 3-address. In order to
      remedy this, new 3-address pseudo memory instructions are used to perform the
      folding only when the dst and lhs virtual registers are known to be allocated
      to the same physreg. In order to not let MachineCopyPropagation run and
      change registers on these transformed instructions (making it 3-address), a
      new target pass called SystemZPostRewrite.cpp is run just after
      VirtRegRewriter, that immediately lowers the pseudo to a target instruction.
      
      If it would have been possibe to insert a COPY instruction and change a
      register operand (convert to 2-address) in foldMemoryOperandImpl() while
      trusting that the caller (e.g. InlineSpiller) would update/repair the
      involved LiveIntervals, the solution involving pseudo instructions would not
      have been needed. This is perhaps a potential improvement (see Phabricator
      post).
      
      Common code changes:
      
      * A new hook TargetPassConfig::addPostRewrite() is utilized to be able to run a
      target pass immediately before MachineCopyPropagation.
      
      * VirtRegMap is passed as an argument to foldMemoryOperand().
      
      Review: Ulrich Weigand, Quentin Colombet
      https://reviews.llvm.org/D60888
      
      llvm-svn: 362868
      fdc4ea34
    • Fangrui Song's avatar
      [ELF][PPC] Simplify {read,write}FromHalf16 · 27de3d39
      Fangrui Song authored
      I've change the variable names used in PPC64.cpp from "Instr" to "Insn"
      because "Insn" is a more common abbreviation for "instruction".
      
      While changing PPC64.cpp relocateOne(), make R_PPC64_ADDR16_LO{_DS}
      slightly more efficient by saving a read and a write for the TocOptimize
      case.
      
      Reviewed By: ruiu
      
      Differential Revision: https://reviews.llvm.org/D63043
      
      llvm-svn: 362867
      27de3d39
    • Eric Fiselier's avatar
      update debugging docs to be less out of date · 99dfd708
      Eric Fiselier authored
      llvm-svn: 362866
      99dfd708
    • Eric Fiselier's avatar
      Substantially reduce instantiations and debug size of std::function · d63dd874
      Eric Fiselier authored
      std::function uses a standard allocator to manage its memory, however
      standard allocators are templates and using them correctly requires
      a stupid amount of instantiations. This leads to a substantial increase
      in debug info and object sizes.
      
      This patch addresses the issue by dropping the allocator when possible
      and using raw new and delete to get memory.
      
      This change decreases the object file size for the test func.wrap.func.con/F.pass.cpp by 33% and the final binary by 29% (when compiled with -g -ggnu-pubnames -gpubnames).
      
      It also roughly halfs the number of entries in the pubnames and pubtype
      sections.
      
      llvm-svn: 362865
      d63dd874
    • Nico Weber's avatar
      gn build: Merge r362857 · 3ba09eda
      Nico Weber authored
      llvm-svn: 362864
      3ba09eda
    • Seiya Nuta's avatar
      [llvm-objcopy][MachO] Recompute and update offset/size fields in the writer · b728e53b
      Seiya Nuta authored
      Summary:
      Recompute and update offset/size fields so that we can implement llvm-objcopy options like --only-section.
      
      This patch is the first step and focuses on supporting load commands that covered by existing tests: executable files and
      dynamic libraries are not supported.
      
      Reviewers: alexshap, rupprecht, jhenderson
      
      Reviewed By: alexshap, rupprecht
      
      Subscribers: compnerd, jakehehrlich, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62652
      
      llvm-svn: 362863
      b728e53b
    • Alex Langford's avatar
      Revert "DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit" · 5ada887b
      Alex Langford authored
      This reverts commit 58afc1bdebf9fa8b178d6c9d89af94c5cc091760.
      This commit caused the test suite on macOS to fail many tests. It
      appears that setting breakpoints is the issue. One example that fails
      is the lit test Breakpoint/case-sensitive.test.
      
      llvm-svn: 362862
      5ada887b
    • Eric Fiselier's avatar
      Fix some incorrect std::function tests · cdff3806
      Eric Fiselier authored
      llvm-svn: 362861
      cdff3806