Changes

Summary

  1. [SCEV] Simplify invalidation after BE count calculation (NFCI) (details)
  2. [SCEV] Simplify forgetSymbolicName() (NFCI) (details)
  3. [DwarfCompileUnit] Set parent DIE right after creating a local entity (details)
  4. [PowerPC] Regenerate ppc64-P9-vabsd.ll tests (details)
Commit c2550e342732d029c3a8ae1eff764d68b1abfc59 by nikita.ppv
[SCEV] Simplify invalidation after BE count calculation (NFCI)

After backedge taken counts have been calculated, we want to
invalidate all addrecs and dependent expressions in the loop,
because we might compute better results with the newly available
backedge taken counts. Previously this was done with a forgetLoop()
style use-def walk. With recent improvements to SCEV invalidation,
we can instead directly invalidate any SCEVs using addrecs in this
loop. This requires a great deal less subtlety to avoid invalidating
more than necessary, and in particular gets rid of the hack from
D113349. The change is similar to D114263 in spirit.
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit f492a414bad782ae4202d2af9d3408f8e727599d by nikita.ppv
[SCEV] Simplify forgetSymbolicName() (NFCI)

With the recently introduced tracking as well as D113349, we can
greatly simplify forgetSymbolicName(). In fact, we can simply
replace it with forgetMemoizedResults().

What forgetSymbolicName() used to do is to walk the IR use-def
chain to find all SCEVs that mention the SymbolicName. However,
thanks to use tracking, we can now determine the relevant SCEVs
in a more direct way. D113349 is needed to also clear out the
actual IR to SCEV mapping in ValueExprMap.

Differential Revision: https://reviews.llvm.org/D114263
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 904328932699cd5e0eefab2c81e4f51421fd3f33 by kbessonova
[DwarfCompileUnit] Set parent DIE right after creating a local entity

No functional changes intended.

Before this patch DwarfCompileUnit::createScopeChildrenDIE() and
DwarfCompileUnit::createAndAddScopeChildrenDIE() used to emit child subtrees
and then when all the children get created, attach them to a parent scope DIE.
However, when a DIE doesn't have a parent, all the requests for its unit DIE
fail.

Currently, this is not a big issue since it isn't usually needed to know unit DIE
for a local (function-scoped) entity. But once we introduce lexical blocks as
a valid scope for global variables (static locals) and type DIEs, any requests
for a unit DIE need to be guarded against local scope due to the potential
absence of the DIE's parent.

To avoid the aforementioned issue, this patch refactors a few DwarfCompileUnit
methods to support the idea of attaching a DIE to its parent as close to the
creation of this DIE as possible.

Reviewed By: ellis

Differential Revision: https://reviews.llvm.org/D114350
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit 7ba64ab05a174cc5cecacbc81dadc0ef48cc8ed1 by llvm-dev
[PowerPC] Regenerate ppc64-P9-vabsd.ll tests
The file was modifiedllvm/test/CodeGen/PowerPC/ppc64-P9-vabsd.ll