llvm-6502/include/llvm/Support
Adrian Prantl 02474a32eb Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.

Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.

By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.

The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)

This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.

What this patch doesn't do:

This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.

http://reviews.llvm.org/D4919
rdar://problem/17994491

Thanks to dblaikie and dexonsmith for reviewing this patch!

Note: I accidentally committed a bogus older version of this patch previously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 18:55:02 +00:00
..
AIXDataTypesFix.h
AlignOf.h
Allocator.h BumpPtrAllocator: do the size check without moving any pointers 2014-09-07 04:24:31 +00:00
ARMBuildAttributes.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ARMEHABI.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ARMWinEH.h Support: Delete {aligned_,}{u,}{little,big}8_t 2014-09-11 21:46:33 +00:00
ArrayRecycler.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
Atomic.h
BlockFrequency.h blockfreq: Defer to BranchProbability::scale() (again) 2014-04-29 16:31:29 +00:00
BranchProbability.h BranchProb: Simplify printing code 2014-04-29 17:07:42 +00:00
Capacity.h
Casting.h [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-09 06:08:46 +00:00
CBindingWrapping.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
circular_raw_ostream.h [C++11] Make use of 'nullptr' in the Support library. 2014-04-07 04:17:22 +00:00
CodeGen.h
COFF.h yaml2obj: Support bigobj 2014-09-16 03:52:46 +00:00
CommandLine.h Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind 2014-08-22 19:29:17 +00:00
Compiler.h Enable use of __builtin_assume_aligned when self-hosting 2014-09-10 21:06:11 +00:00
Compression.h
ConvertUTF.h Support/ConvertUTF: implement U+FFFD insertion according to the recommendation 2014-06-16 11:09:46 +00:00
CrashRecoveryContext.h Add override to overriden virtual methods, remove virtual keywords. 2014-09-03 11:41:21 +00:00
DataExtractor.h
DataStream.h
DataTypes.h.cmake DataTypes.h.cmake: Define PRIx32 &c for !HAVE_INTTYPES_H hosts. 2014-08-08 17:00:47 +00:00
DataTypes.h.in Fix standard integer definitions for MSVC in DataTypes.h 2014-05-28 18:19:55 +00:00
Debug.h [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
DOTGraphTraits.h
Dwarf.h Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
DynamicLibrary.h Fix some semantic usability issues with DynamicLibrary. 2014-08-27 18:13:25 +00:00
ELF.h AArch64: add support for dynamic-loader relocations 2014-08-11 10:10:27 +00:00
Endian.h [Support][Endian] Overload += and -= 2014-09-11 22:55:25 +00:00
EndianStream.h Fixed a build problem when there were headers 2014-08-30 02:30:02 +00:00
Errc.h Finishing touch for the std::error_code transition. 2014-06-13 17:20:48 +00:00
Errno.h
ErrorHandling.h Make the error-handling functions thread-safe. 2014-06-13 21:20:44 +00:00
ErrorOr.h Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type. 2014-09-03 17:31:25 +00:00
FileOutputBuffer.h unique_ptrify FileOutputBuffer::FileOutputBuffer 2014-09-02 17:49:23 +00:00
FileSystem.h Move sys::fs::AccessMode out of @brief in the function. [-Wdocumentation] 2014-09-12 15:12:32 +00:00
FileUtilities.h [C++11] Make use of 'nullptr' in the Support library. 2014-04-07 04:17:22 +00:00
Format.h [Support] Fix Format.h to build on Windows 2014-09-25 21:00:38 +00:00
FormattedStream.h [C++11] Make use of 'nullptr' in the Support library. 2014-04-07 04:17:22 +00:00
GCOV.h test commit: remove trailing space 2014-07-23 17:18:05 +00:00
GenericDomTree.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
GenericDomTreeConstruction.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
GraphWriter.h Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
Host.h
LEB128.h Fixup for r217830. Don't do left shifts on negative values 2014-09-17 18:23:07 +00:00
LICENSE.TXT
LineIterator.h LineIterator: Provide a variant that keeps blank lines 2014-09-17 15:43:01 +00:00
Locale.h
LockFileManager.h Don't use 'using std::error_code' in include/llvm. 2014-06-12 21:46:39 +00:00
MachO.h Adds the next bit of support for llvm-objdump’s -private-headers for executable Mach-O files. 2014-09-04 16:54:47 +00:00
ManagedStatic.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MathExtras.h Fix llvm::huge_valf multiple initializations with Visual C++. 2014-09-27 14:41:29 +00:00
MD5.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Memory.h Don't use 'using std::error_code' in include/llvm. 2014-06-12 21:46:39 +00:00
MemoryBuffer.h Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00
MemoryObject.h
Mutex.h Support: make LLVM Mutexes STL-compatible 2014-08-23 22:49:22 +00:00
MutexGuard.h Support: make LLVM Mutexes STL-compatible 2014-08-23 22:49:22 +00:00
OnDiskHashTable.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
OutputBuffer.h
Path.h Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already. 2014-08-30 16:48:02 +00:00
PluginLoader.h
PointerLikeTypeTraits.h
PrettyStackTrace.h
Process.h Refactor the code in clang to find a file in a PATH like environment variable into a helper function 2014-06-30 19:54:20 +00:00
Program.h Add writeFileWithSystemEncoding to LibLLVMSuppor. 2014-09-03 20:02:00 +00:00
RandomNumberGenerator.h Fix the build. 2014-06-25 15:47:36 +00:00
raw_os_ostream.h
raw_ostream.h [Support] Add type-safe alternative to llvm::format() 2014-09-25 20:30:58 +00:00
Recycler.h
RecyclingAllocator.h
Regex.h [C++11] Make use of 'nullptr' in the Support library. 2014-04-07 04:17:22 +00:00
Registry.h Use unique_ptr for the result of Registry entries. 2014-04-15 05:53:26 +00:00
RegistryParser.h
RWMutex.h Support: make LLVM Mutexes STL-compatible 2014-08-23 22:49:22 +00:00
SaveAndRestore.h SaveAndRestore: fix coding style and Doxygenify comments 2014-04-10 09:44:32 +00:00
ScaledNumber.h Include <tuple> for std::tie 2014-06-24 05:59:52 +00:00
Signals.h [C++11] Make use of 'nullptr' in the Support library. 2014-04-07 04:17:22 +00:00
SMLoc.h [C++11] Make use of 'nullptr' in the Support library. 2014-04-07 04:17:22 +00:00
Solaris.h
SourceMgr.h Add an explicit move constructor to SrcBuffer 2014-08-21 23:24:08 +00:00
SpecialCaseList.h Fix indenting caused by clang-format+spuriously indented access specifier in r216925 2014-09-15 22:20:31 +00:00
StreamableMemoryObject.h Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert. 2014-06-19 06:10:58 +00:00
StringPool.h Fix breakage from r211244 by using LLVM_EXPLICIT to avoid using explicit operators under MSVC where they're not supported. 2014-06-19 01:09:49 +00:00
StringRefMemoryObject.h
SwapByteOrder.h Adding llvm::sys::swapByteOrder() for the common use-case of byte-swapping a value in place 2014-06-14 12:52:55 +00:00
SystemUtils.h
TargetRegistry.h Remove obsolete function TargetRegistry::getClosestTargetForJIT() 2014-07-01 10:47:13 +00:00
TargetSelect.h
Threading.h Re-apply r211287: Remove support for LLVM runtime multi-threading. 2014-06-27 15:13:01 +00:00
ThreadLocal.h
Timer.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
TimeValue.h Cleaning up static initializers in TimeValue. 2014-08-29 01:05:12 +00:00
ToolOutputFile.h Modernize raw_fd_ostream's constructor a bit. 2014-08-25 18:16:47 +00:00
type_traits.h
Unicode.h include/llvm/Support/Unicode.h didn't have re-include guards 2014-05-13 10:11:29 +00:00
UnicodeCharRanges.h [Modules] Make Support/Debug.h modular. This requires it to not change 2014-04-21 22:55:11 +00:00
UniqueLock.h Support: add llvm::unique_lock 2014-08-23 23:07:14 +00:00
Valgrind.h
Watchdog.h
Win64EH.h Support: Delete {aligned_,}{u,}{little,big}8_t 2014-09-11 21:46:33 +00:00
WindowsError.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
YAMLParser.h yaml::Stream doesn't need to take ownership of the buffer. 2014-08-27 19:03:22 +00:00
YAMLTraits.h Fix memory leak in error paths in YAMLTraits by using unique_ptr 2014-09-15 18:39:24 +00:00