AbortedChanges

Summary

  1. [InstCombine] Fix errno bug in pow expansion to sqrt (details)
  2. [InstCombine][NFC][tests] Add ninf base value case to pow-sqrt.ll (details)
  3. [trace] avoid using <regex> (details)
  4. [ORC][examples] Add missing library dependencies. (details)
  5. [NFC][docs] Fix link. (details)
  6. [IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData. (details)
  7. [Clang] Fix a typo in implicit-int-float-conversion.c (details)
  8. [lld-macho] handle option -headerpad_max_install_names (details)
  9. [EHStreamer] Ensure CallSiteEntry::{BeginLabel,EndLabel} are non-null. NFC (details)
  10. Revert "Canonicalize declaration pointers when forming APValues." (details)
  11. [DWARFYAML][test] Simplify __debug_pubnames/types tests. NFC. (details)
  12. [NewPM] Pin tests with -debug-pass to legacy PM (details)
  13. Revert "[IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData." (details)
  14. [test][NewPM] Fix update-scev.ll under NPM (details)
  15. [CostModel][X86] add CostModel for SK_Select(v8f64, v8i64, v16f32, v16i32, v32i16, v64i8) (details)
  16. [test][NewPM] Clean up ScalarEvolution tests to work under NPM (details)
  17. [lld-macho] In the context of relocs, s/target/referent/ for sections & symbols (details)
  18. [ThinLTO] Avoid temporaries when loading global decl attachment metadata (details)
  19. [lld-maco] fix build breakage (details)
Commit 32c9991dab5cb1454959561c77f9d0089d981429 by hubert.reinterpretcast
[InstCombine] Fix errno bug in pow expansion to sqrt

A conversion from `pow` to `sqrt` shall not call an `errno`-setting
`sqrt` with -//infinity//: the `sqrt` will set `EDOM` where the `pow`
call need not.

This patch avoids the erroneous (pun not intended) transformation by
applying the restrictions discussed in the thread for
https://lists.llvm.org/pipermail/llvm-dev/2020-September/145051.html.

The existing tests are updated (depending on emphasis in the checks for
library calls, avoidance of overlap, and overall coverage):
  - to add `ninf`, retaining the intended library call,
  - to use the intrinsic, retaining the use of `select`, or
  - to expect the replacement to not occur.

The following is tested:
  - The pow intrinsic folds to a `select` instruction to
    handle -//infinity//.
  - The pow library call folds, with `ninf`, to `sqrt` without the
    `select` instruction associated with handling -//infinity//.
  - The pow library call does not fold to `sqrt` without `ninf`.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D87877
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/pow-sqrt.ll
The file was modifiedllvm/test/Transforms/InstCombine/pow-1.ll
The file was modifiedllvm/test/Transforms/InstCombine/win-math.ll
Commit a60852e9d692e3c38d9b58b7ec1679e07af2b8f7 by hubert.reinterpretcast
[InstCombine][NFC][tests] Add ninf base value case to pow-sqrt.ll
The file was modifiedllvm/test/Transforms/InstCombine/pow-sqrt.ll
Commit ed621e76a9889e25a9cbed47e0b96a7a6fdbdb80 by walter erquinigo
[trace] avoid using <regex>

Easy fix based on the feedback by maskray on
https://reviews.llvm.org/D85705.
The file was modifiedlldb/source/Target/TraceSettingsParser.cpp
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.cpp
Commit 71be8809d01f0199032242b9f11d6a7a471183fd by Lang Hames
[ORC][examples] Add missing library dependencies.
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt
Commit af429cd89bf83bbbef295ded85e66f03776ec015 by joker.eph
[NFC][docs] Fix link.

The rendered html was (no hyperlink was generated):

(see Getting Started <GettingStarted.html#git-pre-push-hook>)

Now, it is (with proper hyperlink):

(see Git pre-push hook)

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D88116
The file was modifiedllvm/docs/Phabricator.rst
The file was modifiedllvm/docs/GettingStarted.rst
Commit 4944bb190fed8861d4d043eaf45e3c1e12aa2dc5 by andrew.litteken
[IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData.

The IRSimilarityCandidate is a container to hold a region of
IRInstructions and offer interfaces for the starting instruction, ending
instruction, parent function, length.  It also assigns a global value
number for each unique instance of a value in the region.

It also contains an interface to compare two IRSimilarity as to whether
they have the same sequence of similar instructions.

Tests for whether the instructions are similar are found in
unittests/Analysis/IRSimilarityIdentifierTest.cpp.

Differential Revision: https://reviews.llvm.org/D86970
The file was modifiedllvm/include/llvm/Analysis/IRSimilarityIdentifier.h
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
The file was modifiedllvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Commit 10092291d7a770fee9eec8d8c7f60aeca9a8d7fb by noreply
[Clang] Fix a typo in implicit-int-float-conversion.c
The file was modifiedclang/test/Sema/implicit-int-float-conversion.c
Commit 145ce86dba6e13d5c45fa8b1256f310bb6d48598 by gkm
[lld-macho] handle option -headerpad_max_install_names

Differential Revision: https://reviews.llvm.org/D88064
The file was modifiedlld/MachO/Config.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/headerpad.s
Commit bee68b2956d93b190d9065c9f8640593cec9cf90 by i
[EHStreamer] Ensure CallSiteEntry::{BeginLabel,EndLabel} are non-null. NFC

... to simplify the code a bit.

Reviewed By: rahmanl

Differential Revision: https://reviews.llvm.org/D87999
The file was modifiedllvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
Commit 15d94a7d0f8f0d6b3b5308fff51b286957e45650 by leonardchan
Revert "Canonicalize declaration pointers when forming APValues."

This reverts commit 905b9ca26c94fa86339451a528cedde5004fc1bb.

Reverting because this strips `weak` attributes off function
declarations, leading to the linker error we see at
https://ci.chromium.org/p/fuchsia/builders/ci/clang_toolchain.fuchsia-arm64-debug-subbuild/b8868932035091473008.

See https://reviews.llvm.org/rG905b9ca26c94 for reproducer details.
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/include/clang/AST/APValue.h
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp
The file was modifiedclang/test/OpenMP/ordered_messages.cpp
The file was modifiedclang/lib/AST/APValue.cpp
The file was modifiedclang/lib/AST/DeclBase.cpp
Commit 64435a427a01a61574a59824ea0a4949a80b11e6 by Xing
[DWARFYAML][test] Simplify __debug_pubnames/types tests. NFC.

This patch stripped unneeded sections from the test case.

Reviewed By: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D88073
The file was modifiedllvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml
Commit 61ac58e10ae1fbb18416cac20119725803b9ad6f by aeubanks
[NewPM] Pin tests with -debug-pass to legacy PM

-debug-pass is a legacy PM only option.

Some tests checks that the pass returned that it made a change,
which is not relevant to the NPM, since passes return PreservedAnalyses.

Some tests check that passes are freed at the proper time, which is also
not relevant to the NPM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D87945
The file was modifiedllvm/test/Transforms/Coroutines/smoketest.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
The file was modifiedllvm/test/Analysis/BasicAA/phi-values-usage.ll
The file was modifiedllvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
The file was modifiedllvm/test/Transforms/InstSimplify/remove-dead-call.ll
The file was modifiedllvm/test/Transforms/GVN/preserve-analysis.ll
The file was modifiedllvm/test/Transforms/SCCP/preserve-analysis.ll
The file was modifiedllvm/test/Analysis/alias-analysis-uses.ll
Commit 88bc59c3001b3b20f55994f9fa9dbaf45991df1d by andrew.litteken
Revert "[IRSim] Adding IRSimilarityCandidate that contains a region of IRInstructionData."

This reverts commit 4944bb190fed8861d4d043eaf45e3c1e12aa2dc5.
The file was modifiedllvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
The file was modifiedllvm/include/llvm/Analysis/IRSimilarityIdentifier.h
Commit d6746ecb73c3892bd9a353c3b1b3facbd285c450 by aeubanks
[test][NewPM] Fix update-scev.ll under NPM
The file was modifiedllvm/test/Transforms/LICM/update-scev.ll
Commit ec24e505536fe50636fcbc759b821aca6295aa45 by bing1.yu
[CostModel][X86] add CostModel for SK_Select(v8f64, v8i64, v16f32, v16i32, v32i16, v64i8)

add CostModel for SK_Select(v8f64, v8i64, v16f32, v16i32, v32i16, v64i8)

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D87884
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-select.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
Commit 2d0de5f9a4c58e2fcdd8f00dabca505ba47abbd0 by aeubanks
[test][NewPM] Clean up ScalarEvolution tests to work under NPM
The file was modifiedllvm/test/Analysis/ScalarEvolution/trivial-phis.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
Commit 1a3ef0417c7ca9498895186c96da452f6e2f15a0 by gkm
[lld-macho] In the context of relocs, s/target/referent/ for sections & symbols

The word "target" is overloaded, so lighten its load by using another word to denote the symbol or section to which a reloc points. While more stilted than "target", "referent" is rather less pompous than "designatum" or "denotatum". :P

Along the way, make a few neighboring variable names more descriptive.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D87584
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/InputSection.cpp
Commit ab1b4810b55279bcf6fdd87be74a403440be3991 by tejohnson
[ThinLTO] Avoid temporaries when loading global decl attachment metadata

When performing ThinLTO importing, the metadata loader attempts to lazy
load, by building an index. However, module level global decl attachment
metadata was being parsed early while building the index, since the
associated (module level) global values aren't materialized on demand.
This results in the creation of forward reference temporary metadatas,
which are expensive.

Normally, these module level global values don't have much attached
metadata. However, in the case of -fwhole-program-vtables (e.g. for
whole program devirtualization), the vtables may have many attached type
metadatas. This was resulting in very slow performance when performing
ThinLTO importing with the default lazy loading.

This patch restructures the handling of these global decl attachment
records, delaying their parsing until after the lazy loading index has
been built. Then the parser can use the interface that loads from the
index, which resolves forward references immediately instead of creating
expensive temporaries.

For one ThinLTO backend that imports from modules containing huge
numbers of vtables and associated types, I measured the following
compile times for the metadata materialization during function
importing, rounded to nearest second:

No -fwhole-program-vtables:
  Lazy loading on (head):  1s
  Lazy loading off (head): 3s
  Lazy loading on (patch): 1s

With -fwhole-program-vtables:
  Lazy loading on (head):  440s
  Lazy loading off (head): 4s
  Lazy loading on (patch): 2s

Differential Revision: https://reviews.llvm.org/D87970
The file was modifiedllvm/lib/Bitcode/Reader/MetadataLoader.cpp
The file was modifiedllvm/test/ThinLTO/X86/devirt2.ll
Commit ab903560a466194d4350600ad946934eb72f1a14 by gkm
[lld-maco] fix build breakage
The file was modifiedlld/MachO/Writer.cpp