[PATCH] D74787: [IRBuilder] Always respect inserter/folder

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 12:08:58 PST 2020


nikic created this revision.
nikic added reviewers: nhaehnle, Meinersbur, spatel, lebedev.ri.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added a reviewer: jdoerfert.
Herald added projects: clang, LLVM.

Some IRBuilder methods that were originally defined on IRBuilderBase do not respect custom IRBuilder inserters/folders, because those were not accessible prior to D73835 <https://reviews.llvm.org/D73835>. Fix this by making use of existing (and now accessible) IRBuilder methods, which will handle inserters/folders correctly.

There are some changes in OpenMP tests, where bitcasts now get constant folded. I've also highlighted one InstCombine test which now finishes in two rather than three iterations, thanks to new instructions being inserted into the worklist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74787

Files:
  clang/test/OpenMP/parallel_codegen.cpp
  clang/test/OpenMP/target_firstprivate_codegen.cpp
  llvm/lib/IR/IRBuilder.cpp
  llvm/test/Transforms/InstCombine/saturating-add-sub.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74787.245235.patch
Type: text/x-patch
Size: 6119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200218/bcc1a08c/attachment.bin>


More information about the llvm-commits mailing list