[all-commits] [llvm/llvm-project] a8db80: [SimplifyLibCalls][IRBuilder] Accept any IRBuilder...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Feb 21 09:26:16 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a8db806d52ce02ddca179b811da164023316d4b9
      https://github.com/llvm/llvm-project/commit/a8db806d52ce02ddca179b811da164023316d4b9
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-02-21 (Fri, 21 Feb 2020)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/Transforms/InstCombine/simplify-libcalls.ll

  Log Message:
  -----------
  [SimplifyLibCalls][IRBuilder] Accept any IRBuilder in SimplifyLibCalls

This changes the SimplifyLibCalls utility to accept an IRBuilderBase,
which allows us to pass through the IRBuilder used by InstCombine.
This will ensure that new instructions get added to the worklist.
The annotated test-case drops from 4 to 2 InstCombine iterations thanks
to this.

To achieve this, I'm adding an IRBuilderBase::OperandBundlesGuard,
which is basically the same as the existing InsertPointGuard and
FastMathFlagsGuard, but for operand bundles. Also add a
setDefaultOperandBundles() method so these can be set outside the
constructor.

Differential Revision: https://reviews.llvm.org/D74792


  Commit: c90ea87cfd71f8da05f2e684d3cf139f9773c15d
      https://github.com/llvm/llvm-project/commit/c90ea87cfd71f8da05f2e684d3cf139f9773c15d
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-02-21 (Fri, 21 Feb 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [X86] Fix SDLoc initialization

Fixes -Wparentheses warning, in this case indicating a genuine
bug.


Compare: https://github.com/llvm/llvm-project/compare/8c70a2597f53...c90ea87cfd71


More information about the All-commits mailing list