SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [X86] Default to -x86-pad-for-align=false to drop assembler difference with or w/o -g (details)
  2. [RISCV] Remove unneeded StringRef to std::string conversions in RISCVCompressInstEmitter. NFC (details)
  3. [RISC] Replace dyn_casts that are only checked by an assert with a cast. NFC (details)
  4. [RISCV] Simplify mergeCondAndCode in RISCVCompressInstEmitter.cpp. NFC (details)
  5. [RISCV] Few more minor cleanups to RISCVCompressInstEmitter. NFC (details)
  6. [RISCV] Remove an extra map lookup from RISCVCompressInstEmitter. NFC (details)
  7. [VE] Support VE in libunwind (details)
  8. [ELF] Support R_PPC_ADDR24 (ba foo; bla foo) (details)
  9. [BasicAA] Move assumption tracking into AAQI (details)
  10. Reapply [BasicAA] Handle recursive queries more efficiently (details)
Commit a048ce13e32daa255d26533c00da8abd0b67e819 by i
[X86] Default to -x86-pad-for-align=false to drop assembler difference with or w/o -g

Fix PR48742: the D75203 assembler optimization locates MCRelaxableFragment's
within two MCSymbol's and relaxes some MCRelaxableFragment's to reduce the size
of a MCAlignFragment.  A -g build has more MCSymbol's and therefore may have
different assembler output (e.g. a MCRelaxableFragment (jmp) may have 5 bytes
with -O1 while 2 bytes with -O1 -g).

`.p2align 4, 0x90` is common due to loops. For a larger program, with a
lot of temporary labels, the assembly output difference is somewhat
destined. The cost seems to overweigh the benefits so we default to
-x86-pad-for-align=false until the heuristic is improved.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D94542
The file was modifiedllvm/test/MC/X86/align-via-relaxation.s
The file was modifiedllvm/test/MC/X86/prefix-padding-64.s
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
The file was modifiedllvm/test/MC/X86/align-via-padding-corner.s
The file was modifiedllvm/test/MC/X86/prefix-padding-32.s
The file was modifiedllvm/test/MC/X86/align-via-padding.s
Commit 633c5afccfbb0a985976aa3e6493f1a08061cb10 by craig.topper
[RISCV] Remove unneeded StringRef to std::string conversions in RISCVCompressInstEmitter. NFC

Stop concatenating std::string before streaming into a raw_ostream.
Just stream the pieces.

Remove some new lines from asserts. Remove std::string concatenation
from an assert. assert strings aren't really evaluated like this at
runtime. An assertion failure will just print exactly what's between
the parentheses in the source.
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 97f7e4e8c9309e0806f9b8f8afcf8ce2ef63656c by craig.topper
[RISC] Replace dyn_casts that are only checked by an assert with a cast. NFC
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 2b6a92625fdf11928bff1a31cdc06d7dbd193f85 by craig.topper
[RISCV] Simplify mergeCondAndCode in RISCVCompressInstEmitter.cpp. NFC

Instead forming a std::string and returning it to pass into another
raw_ostream, just pass the raw_ostream as a parameter.

Take StringRef as arguments instead raw_string_ostream references
making the caller responsible for converting to strings. Use
StringRef operations instead of std::string::substr.a
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 1327c730bb9a0bff963af3745869cf244ae37241 by craig.topper
[RISCV] Few more minor cleanups to RISCVCompressInstEmitter. NFC

-Use StringRef instead of std::string.
-Const correct a parameter.
-Don't call StringRef::data() before printing. Just pass the StringRef.
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 061f681c0dfa4d279dc656802bf81f3b9bfa3d34 by craig.topper
[RISCV] Remove an extra map lookup from RISCVCompressInstEmitter. NFC

When we looked up the map to see if the entry already existed,
this created the new entry for us. So save a reference to it so
we can use it to update the entry instead of looking it up again.

Also remove unnecessary StringRef constructors around string
literals on calls to this function.
The file was modifiedllvm/utils/TableGen/RISCVCompressInstEmitter.cpp
Commit 3cbd476c54886e8ebac64b4145d4517732a71023 by marukawa
[VE] Support VE in libunwind

Modify libunwind to support SjLj exception handling routines for VE.
In order to do that, we need to implement not only SjLj exception
handling routines but also a Registers_ve class.  This implementation
of Registers_ve is incomplete.  We will work on it later when we need
backtrace in libunwind.

Reviewed By: #libunwind, compnerd

Differential Revision: https://reviews.llvm.org/D94591
The file was modifiedlibunwind/include/__libunwind_config.h
The file was modifiedlibunwind/src/libunwind.cpp
The file was modifiedlibunwind/src/Registers.hpp
The file was modifiedlibunwind/include/libunwind.h
The file was modifiedlibunwind/src/Unwind-sjlj.c
Commit 3809f4ebabde98bfdc1fdcdad2963a874151820b by i
[ELF] Support R_PPC_ADDR24 (ba foo; bla foo)
The file was modifiedlld/test/ELF/ppc32-reloc-addr.s
The file was modifiedlld/ELF/Arch/PPC.cpp
Commit b1c2f1282a237e9bc60f1b0020bc7535ca019739 by nikita.ppv
[BasicAA] Move assumption tracking into AAQI

D91936 placed the tracking for the assumptions into BasicAA.
However, when recursing over phis, we may use fresh AAQI instances.
In this case AssumptionBasedResults from an inner AAQI can reesult
in a removal of an element from the outer AAQI.

To avoid this, move the tracking into AAQI. This generally makes
more sense, as the NoAlias assumptions themselves are also stored
in AAQI.

The test case only produces an assertion failure with D90094
reapplied. I think the issue exists independently of that change
as well, but I wasn't able to come up with a reproducer.
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/include/llvm/Analysis/AliasAnalysis.h
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was addedllvm/test/Transforms/MemCpyOpt/aa-recursion-assertion-failure.ll
Commit 0b84afa5fcb41429004db72a0588656a8d76bf48 by nikita.ppv
Reapply [BasicAA] Handle recursive queries more efficiently

There are no changes relative to the original commit. However, an issue
this exposed in BasicAA assumption tracking has been fixed in the
previous commit.

-----

An alias query currently works out roughly like this:

* Look up location pair in cache.
* Perform BasicAA logic (including cache lookup and insertion...)
* Perform a recursive query using BestAAResults.
   * Look up location pair in cache (and thus do not recurse into BasicAA)
   * Query all the other AA providers.
* Query all the other AA providers.

This is a lot of unnecessary work, all ultimately caused by the
BestAAResults query at the end of aliasCheck(). The reason we perform
it, is that aliasCheck() is getting called recursively, and we of
course want those recursive queries to also make use of other AA
providers, not just BasicAA. We can solve this by making the recursive
queries directly use BestAAResults (which will check both BasicAA
and other providers), rather than recursing into aliasCheck().

There are some tradeoffs:

* We can no longer pass through the precomputed underlying object
   to aliasCheck(). This is not a major concern, because nowadays
   getUnderlyingObject() is quite cheap.
* Results from other AA providers are no longer cached inside
   BasicAA. The way this worked was already a bit iffy, in that a
   result could be cached, but if it was MayAlias, we'd still end
   up re-querying other providers anyway. If we want to cache
   non-BasicAA results, we should do that in a more principled manner.

In any case, despite those tradeoffs, this works out to be a decent
compile-time improvment. I think it also simplifies the mental model
of how BasicAA works. It took me quite a while to fully understand
how these things interact.

Differential Revision: https://reviews.llvm.org/D90094
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp