SuccessChanges

Summary

  1. [nfc] [lldb] Removed unused DWARFDebugInfo::GetDIEForDIEOffset (details)
  2. [GlobalOpt] support ConstantExpr use of global address for OptimizeGlobalAddressOfMalloc (details)
  3. [RISCV] Add some tests for SimplifyCFG's switch to lookup table transform (details)
Commit 6ef6616e07f5be69557e744fc28459d6051cfa9c by jan.kratochvil
[nfc] [lldb] Removed unused DWARFDebugInfo::GetDIEForDIEOffset

Its last use was removed by D63428.
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
Commit 732b05555c71cfdbf135a100a06472c5efc4eefb by scui
[GlobalOpt] support ConstantExpr use of global address for OptimizeGlobalAddressOfMalloc

I'm working on extending the OptimizeGlobalAddressOfMalloc to handle some more general cases. This is to add support of the ConstantExpr use of the global variables. The function allUsesOfLoadedValueWillTrapIfNull is now iterative with the added CE use of GV. Also, the recursive function valueIsOnlyUsedLocallyOrStoredToOneGlobal is changed to iterative using a worklist with the GEP case added.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D106589
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
The file was addedllvm/test/Transforms/GlobalOpt/new-promote.ll
The file was modifiedllvm/lib/Transforms/Utils/GlobalStatus.cpp
Commit 0da367145cb32f45a192e6f758a7474297730fc4 by craig.topper
[RISCV] Add some tests for SimplifyCFG's switch to lookup table transform

These are some of the basic cases taken from X86.

We currently fail to use lookup tables on many of these cases
because SimplifyCFG requires a legal type to do the transform and
RISCV only has one legal integer type.
The file was addedllvm/test/Transforms/SimplifyCFG/RISCV/switch_to_lookup_table-rv64.ll
The file was addedllvm/test/Transforms/SimplifyCFG/RISCV/switch_to_lookup_table-rv32.ll