Devang Patel
729589a539
Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.
...
llvm-svn: 83977
2009-10-13 17:00:54 +00:00
Devang Patel
c1e370a29c
Lookup handler name only when assertions are enabled.
...
llvm-svn: 83114
2009-09-29 22:05:52 +00:00
Devang Patel
39b5b72d74
Add removeMD().
...
llvm-svn: 83107
2009-09-29 20:42:25 +00:00
Devang Patel
292bcd8ca1
Only one custom meadata of each kind can be attached with an instruction.
...
llvm-svn: 83105
2009-09-29 20:30:57 +00:00
Devang Patel
351585921d
Use assertion instead of early exit to catch malformed custom metadata store.
...
llvm-svn: 83102
2009-09-29 20:01:19 +00:00
Devang Patel
629ad89954
Parse custom metadata attached with an instruction.
...
llvm-svn: 83033
2009-09-29 00:01:14 +00:00
Devang Patel
1070b7a713
s/class Metadata/class MetadataContext/g
...
llvm-svn: 83019
2009-09-28 21:41:20 +00:00
Devang Patel
d836a7d651
Do not use global typedef for MDKindID.
...
llvm-svn: 83016
2009-09-28 21:14:55 +00:00
Devang Patel
18dae0848f
Do not leave behind metadata while cloning an instruction.
...
llvm-svn: 82638
2009-09-23 18:32:25 +00:00
Devang Patel
c195f74dee
Write and read metadata attachments.
...
llvm-svn: 82259
2009-09-18 19:26:43 +00:00
Devang Patel
f15eea3399
Print debug info attached with an instruction.
...
llvm-svn: 82075
2009-09-16 20:21:17 +00:00
Devang Patel
253aa4d192
Add llvm::Metadata to manage metadata used in a context.
...
This interface will be used to attach metadata with an instruction.
llvm-svn: 82060
2009-09-16 18:09:00 +00:00
Devang Patel
2cbc3ef1e9
Take lock before removing a node from MDNodeSet.
...
llvm-svn: 81356
2009-09-09 17:44:26 +00:00
Devang Patel
2898d3cb86
Enable MDNode uniquing.
...
llvm-svn: 81355
2009-09-09 17:30:04 +00:00
Daniel Dunbar
b258ff7cee
Disable MDNode uniquing.
...
- Hopefully this unbreaks some llvm-gcc bootstraps.
llvm-svn: 81141
2009-09-07 04:05:49 +00:00
Devang Patel
40a0a72be8
While replacing an MDNode elment, properly update MDNode's operand list.
...
MDNode's operand list does not include all elements.
llvm-svn: 81045
2009-09-04 21:32:05 +00:00
Devang Patel
27616c3c80
Now Bitcode reader bug is fixed. Reapply 80839.
...
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
llvm-svn: 80868
2009-09-03 01:39:20 +00:00
Devang Patel
317ab82083
Revert 80839 for now. It causes test failures.
...
llvm-svn: 80841
2009-09-02 21:49:26 +00:00
Devang Patel
c4be6559c4
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
...
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
llvm-svn: 80839
2009-09-02 21:22:09 +00:00
Devang Patel
2d78fddeb4
For now disable MDNode uniquing. This fixes llvm-gcc bootstrap failure on certain Mac OS X 10.5. I am working on a proper fix.
...
llvm-svn: 80738
2009-09-01 23:56:42 +00:00
Devang Patel
0ac8889288
Remove an entry from ValueMap before removing elements.
...
llvm-svn: 80247
2009-08-27 15:32:38 +00:00
Devang Patel
10c075a316
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Devang Patel
7d42bfab6c
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
...
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)
llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Owen Anderson
9df206d02d
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Devang Patel
df6d338da2
Link NamedMDNodes.
...
llvm-svn: 78696
2009-08-11 18:01:24 +00:00
Devang Patel
d59b85298b
Remove MDNode from ValueMap when MDNode is destroyed.
...
llvm-svn: 78612
2009-08-10 22:59:46 +00:00
Devang Patel
7c51e1fb95
Rename MDNodeSet as MDNodes.
...
llvm-svn: 78607
2009-08-10 22:31:31 +00:00
Devang Patel
762e9641fd
We are not using FoldingSet for metadata uniquing anymore.
...
llvm-svn: 78585
2009-08-10 18:59:07 +00:00
Owen Anderson
4cd02c843b
Change the MDNode uniquing to a ValueMap, at Devang's request.
...
llvm-svn: 78577
2009-08-10 18:16:08 +00:00
Devang Patel
b7c719fbcf
Keep track of metadata used by other metadata.
...
llvm-svn: 78012
2009-08-03 22:51:10 +00:00
Devang Patel
b770039c5b
Add NamedMDNode destructor.
...
llvm-svn: 77959
2009-08-03 06:19:01 +00:00
Owen Anderson
034ab4f8b1
Move the metadata constructors back to 2.5 syntax.
...
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Benjamin Kramer
85fa67c3c5
fix a unitialized pointer in NamedMDNode (and reenable unittest)
...
llvm-svn: 77597
2009-07-30 15:35:55 +00:00
Devang Patel
c8dfc60e5e
There is no need to keep name ref in NamedMDNode.
...
llvm-svn: 77511
2009-07-29 21:58:56 +00:00
Devang Patel
6bc0c66630
Keep track of named mdnodes in a Module using an ilist.
...
llvm-svn: 77476
2009-07-29 17:16:17 +00:00
Devang Patel
8ed4662148
Add NamedMDNode.
...
llvm-svn: 77409
2009-07-29 00:33:07 +00:00
Devang Patel
b784b514a3
Remove unused method.
...
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Devang Patel
cb23671431
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00