FailedChanges

Summary

  1. [Hexagon] Use InstSimplify instead of ConstantProp (details)
  2. Teach SROA to handle allocas with more than one dbg.declare. (details)
  3. [RDF] Lower the sorting complexity in RDFLiveness::getAllReachingDefs (details)
  4. [RDF] Cache register aliases in PhysicalRegisterInfo (details)
  5. [RDF] Really remove remaining uses of PhysicalRegisterInfo::normalize (details)
  6. BPF: simplify IR generation for __builtin_btf_type_id() (details)
  7. [RDF] Use hash-based containers, cache extra information (details)
  8. [RDF] Add operator<<(raw_ostream&, RegisterAggr), NFC (details)
  9. Fix debugserver's qProcessInfo reporting of maccatalyst binaries (details)
Commit f50b3ff02e3245b44b5452b409ca1df22e91be45 by aeubanks
[Hexagon] Use InstSimplify instead of ConstantProp

This is the last remaining use of ConstantProp, migrate it to InstSimplify in the goal of removing ConstantProp.

Add -hexagon-instsimplify option to enable skipping of instsimplify in
tests that can't handle the extra optimization.

Differential Revision: https://reviews.llvm.org/D85047
The file was modifiedllvm/test/CodeGen/Hexagon/newvaluejump-kill.ll
The file was modifiedllvm/test/CodeGen/Hexagon/vect/zext-v4i1.ll
The file was modifiedllvm/test/CodeGen/Hexagon/loop_correctness.ll
The file was modifiedllvm/test/CodeGen/Hexagon/autohvx/isel-setcc-pair.ll
The file was modifiedllvm/test/CodeGen/Hexagon/store-vector-pred.ll
The file was modifiedllvm/test/CodeGen/Hexagon/isel-simplify-crash.ll
The file was modifiedllvm/include/llvm/Transforms/Scalar.h
The file was modifiedllvm/test/CodeGen/Hexagon/autohvx/isel-qfalse.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/Hexagon/bit-bitsplit-regclass.ll
The file was modifiedllvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h
The file was modifiedllvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
The file was modifiedllvm/test/CodeGen/Hexagon/hvx-bitcast-v64i1.ll
The file was modifiedllvm/test/CodeGen/Hexagon/packetize-impdef-1.ll
Commit bf82ff61a6dbfec5295d9f24e6b66dcb9a038c6c by Adrian Prantl
Teach SROA to handle allocas with more than one dbg.declare.

It is technically legal for optimizations to create an alloca that is
used by more than one dbg.declare, if one or both of them are inlined
instances of aliasing variables.

Differential Revision: https://reviews.llvm.org/D85172
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was addedllvm/test/Transforms/SROA/dbg-inline.ll
Commit 47fe1b63f449827e1171f944b07d0cbebad1de63 by kparzysz
[RDF] Lower the sorting complexity in RDFLiveness::getAllReachingDefs

The sorting is needed, because reaching defs are (logically) ordered,
but are not collected in that order. This change will break up the
single call to std::sort into a series of smaller sorts, each of which
should use a cheaper comparison function than the original.
The file was modifiedllvm/lib/CodeGen/RDFLiveness.cpp
Commit f0f467aeecfc615a5055d8f2edd903996c11727e by kparzysz
[RDF] Cache register aliases in PhysicalRegisterInfo

This improves performance of PhysicalRegisterInfo::makeRegRef.
The file was modifiedllvm/lib/CodeGen/RDFRegisters.cpp
The file was modifiedllvm/include/llvm/CodeGen/RDFRegisters.h
Commit 4b25f672998fde5cc5bb02411e9268b2bb35655f by kparzysz
[RDF] Really remove remaining uses of PhysicalRegisterInfo::normalize
The file was modifiedllvm/lib/CodeGen/RDFGraph.cpp
The file was modifiedllvm/lib/CodeGen/RDFLiveness.cpp
Commit 00602ee7ef0bf6c68d690a2bd729c12b95c95c99 by yhs
BPF: simplify IR generation for __builtin_btf_type_id()

This patch simplified IR generation for __builtin_btf_type_id().
For __builtin_btf_type_id(obj, flag), previously IR builtin
looks like
   if (obj is a lvalue)
     llvm.bpf.btf.type.id(obj.ptr, 1, flag)  !type
   else
     llvm.bpf.btf.type.id(obj, 0, flag)  !type
The purpose of the 2nd argument is to differentiate
   __builtin_btf_type_id(obj, flag) where obj is a lvalue
vs.
   __builtin_btf_type_id(obj.ptr, flag)

Note that obj or obj.ptr is never used by the backend
and the `obj` argument is only used to derive the type.
This code sequence is subject to potential llvm CSE when
  - obj is the same .e.g., nullptr
  - flag is the same
  - metadata type is different, e.g., typedef of struct "s"
    and strust "s".
In the above, we don't want CSE since their metadata is different.

This patch change IR builtin to
   llvm.bpf.btf.type.id(seq_num, flag)  !type
and seq_num is always increasing. This will prevent potential
llvm CSE.

Also report an error if the type name is empty for
remote relocation since remote relocation needs non-empty
type name to do relocation against vmlinux.

Differential Revision: https://reviews.llvm.org/D85174
The file was modifiedclang/test/CodeGen/builtin-bpf-btf-type-id.c
The file was modifiedllvm/include/llvm/IR/IntrinsicsBPF.td
The file was modifiedllvm/test/CodeGen/BPF/BTF/builtin-btf-type-id.ll
The file was modifiedllvm/lib/Target/BPF/BPFPreserveDIType.cpp
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 9521704553e8a330cfdf5a0611885680073178b2 by kparzysz
[RDF] Use hash-based containers, cache extra information

This improves performance.
The file was modifiedllvm/lib/CodeGen/RDFLiveness.cpp
The file was modifiedllvm/include/llvm/CodeGen/RDFRegisters.h
The file was modifiedllvm/include/llvm/CodeGen/RDFLiveness.h
Commit 06d425737bd2953cbea319b5f1d4419b54870e6c by kparzysz
[RDF] Add operator<<(raw_ostream&, RegisterAggr), NFC
The file was modifiedllvm/include/llvm/CodeGen/RDFRegisters.h
The file was modifiedllvm/lib/CodeGen/RDFRegisters.cpp
Commit 7e9bab6ad51af1cab0c7457e4323166af3ac797c by Adrian Prantl
Fix debugserver's qProcessInfo reporting of maccatalyst binaries

This patch is similar in spirit to https://reviews.llvm.org/D84480,
but does the maccatalyst/macosx disambiguation. I also took the
opportunity to factor out the gdb-remote packet log scanning used by
several testcases into lldbutil functions.

rdar://problem/66059257

Differential Revision: https://reviews.llvm.org/D84576
The file was addedlldb/test/API/macosx/macCatalyst/main.c
The file was addedlldb/test/API/macosx/macCatalystAppMacOSFramework/foo.c
The file was removedlldb/test/API/macosx/macabi/Makefile
The file was addedlldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
The file was modifiedlldb/tools/debugserver/source/DNB.cpp
The file was removedlldb/test/API/macosx/macabi/foo.h
The file was modifiedlldb/tools/debugserver/source/DNB.h
The file was addedlldb/test/API/macosx/macCatalystAppMacOSFramework/Makefile
The file was removedlldb/test/API/macosx/macabi/foo.c
The file was modifiedlldb/tools/debugserver/source/RNBRemote.cpp
The file was removedlldb/test/API/macosx/macabi/main.c
The file was addedlldb/test/API/macosx/macCatalystAppMacOSFramework/foo.h
The file was addedlldb/test/API/macosx/macCatalystAppMacOSFramework/main.c
The file was removedlldb/test/API/macosx/macabi/TestMacABImacOSFramework.py
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachProcess.mm
The file was addedlldb/test/API/macosx/macCatalyst/Makefile
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbutil.py
The file was addedlldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
The file was modifiedlldb/test/API/macosx/simulator/TestSimulatorPlatform.py
The file was modifiedlldb/tools/debugserver/source/MacOSX/MachProcess.h