Changes

Summary

  1. [InstCombine] Don't transform code if DoTransform is false (details)
  2. [libfuzzer] Disable failing DFSan-related tests (details)
  3. [ORC][examples] Fix file name in comment. (details)
  4. [ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeModule utils. (details)
  5. [llvm][Inliner] Add an optional PriorityInlineOrder (details)
  6. Revert "[lld-macho] Have path-related functions return std::string, not StringRef" (details)
  7. [re-land][lld-macho] Avoid force-loading the same archive twice (details)
Commit 575ba6f42560002807dd6382ffc83abc1b6b9b50 by carrot
[InstCombine] Don't transform code if DoTransform is false

In patch https://reviews.llvm.org/D72396, it doesn't check DoTransform before transforming the code, and generates wrong result for the attached test case.

Differential Revision: https://reviews.llvm.org/D104567
The file was modifiedllvm/test/Transforms/InstCombine/zext.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 070556237e29e8a804fbec1d416d431239384ab0 by gbalats
[libfuzzer] Disable failing DFSan-related tests

These have been broken by https://reviews.llvm.org/D104494.
However, `lib/fuzzer/dataflow/` is unused (?) so addressing this is not a priority.

Added TODOs to re-enable them in the future.

Reviewed By: stephan.yichao.zhao

Differential Revision: https://reviews.llvm.org/D104568
The file was modifiedcompiler-rt/test/fuzzer/only-some-bytes.test
The file was modifiedcompiler-rt/test/fuzzer/only-some-bytes-fork.test
The file was modifiedcompiler-rt/lib/fuzzer/dataflow/DataFlow.cpp
Commit 9b699450dd66df258cb424470fcb1ea737a99341 by Lang Hames
[ORC][examples] Fix file name in comment.
The file was modifiedllvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c
Commit 80f30a6b855b7aa96b99205c986972483d75822e by Lang Hames
[ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeModule utils.

This patch was derived from Valentin Churavy's work in
https://reviews.llvm.org/D104480. It adds support for setting the transform on
an IRTransformLayer, and for accessing the IRTransformLayer in LLJIT. It also
adds access to the ThreadSafeModule::withModuleDo method for thread-safe
access to modules.

A new example has been added to show how to use these APIs to optimize a module
during materialization.

Thanks Valentin!

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D103855
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/include/llvm-c/LLJIT.h
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c
The file was modifiedllvm/examples/OrcV2Examples/CMakeLists.txt
The file was modifiedllvm/include/llvm-c/Orc.h
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
Commit 671a87104b8132e45718a9584cbb7ed97916683f by taolq
[llvm][Inliner] Add an optional PriorityInlineOrder

This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining.
The callsite which size is smaller would have a higher priority.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D104028
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
The file was modifiedllvm/test/Transforms/Inline/inline_call.ll
The file was modifiedllvm/test/Transforms/Inline/last-callsite.ll
The file was modifiedllvm/test/Transforms/Inline/inline_invoke.ll
Commit a79c01832553a8a192ab157098662a9e8f2c16af by jezng
Revert "[lld-macho] Have path-related functions return std::string, not StringRef"

This reverts commit 1d31fb8d122b1117cf20a9edc09812db8472e930.

Making `rerootPath` return a temporary std::string caused a
use-after-free:

https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/1608/overview
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/MachO/Driver.h
Commit 4507f64165fd0c95f08b66d61db39549b22c50d3 by jezng
[re-land][lld-macho] Avoid force-loading the same archive twice

This reverts commit c9b241efd68c5a0f1f67e9250960ade454f3bc11, which was
a backout diff to fix the buildbots.

The real culprit of the crash is
https://github.com/llvm/llvm-project/commit/1d31fb8d122b1117cf20a9edc09812db8472e930,
which is being reverted.

Differential Revision: https://reviews.llvm.org/D104353
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/archive.s
The file was modifiedlld/test/MachO/force-load.s