1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Transforms
David Stenberg 35ae52256a [InstCombine][DebugInfo] Fold constants wrapped in metadata
Summary:
When constant folding, constants that are wrapped in metadata were not
folded. This could lead to dbg.values being the only user of a constant
expression, due to the non-dbg uses having been rewritten, resulting in
the constant later on being removed by some other pass. This occurred
with the attached test case, in which the non-rewritten GEP in the
dbg.value intrinsic was later on removed by globalopt.

This patch makes the code look through metadata and fold such constants.

I guess that we in the future may want to allow dbg.values using GEPs and
other constant expressions to be emittable even if there are no non-dbg
uses, but for example SelectionDAG does not support that.

Reviewers: jmorse, aprantl, vsk, davide

Reviewed By: aprantl, vsk, davide

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D73630
2020-01-30 15:50:16 +01:00
..
AggressiveInstCombine [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CFGuard Add support for __declspec(guard(nocf)) 2020-01-10 16:04:12 +00:00
Coroutines [Coroutines] Remove corresponding phi values when apply simplifyTerminatorLeadingToRet 2020-01-05 18:26:30 -05:00
Hello Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstCombine [InstCombine][DebugInfo] Fold constants wrapped in metadata 2020-01-30 15:50:16 +01:00
Instrumentation Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
IPO Inline debug variable. 2020-01-30 10:29:24 +01:00
ObjCARC [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Scalar [LoopFusion] Move instructions from FC1.Preheader to FC0.Preheader when 2020-01-29 15:06:11 +00:00
Utils [llvm][VectorUtils] Tweak VFShape for scalable vector functions. 2020-01-30 05:53:56 +00:00
Vectorize [LV] Hoist code to mark conditional assumes as dead to caller (NFC). 2020-01-28 08:50:44 -08:00
CMakeLists.txt Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00
LLVMBuild.txt Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00