Commit Graph

28 Commits

Author SHA1 Message Date
Devang Patel
43215788d5 Print debug info attached with an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 20:21:17 +00:00
Devang Patel
937b1e92a9 Add llvm::Metadata to manage metadata used in a context.
This interface will be used to attach metadata with an instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 18:09:00 +00:00
Devang Patel
88cfd964a3 Take lock before removing a node from MDNodeSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 17:44:26 +00:00
Devang Patel
740fce3020 Enable MDNode uniquing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 17:30:04 +00:00
Daniel Dunbar
d34b0b1cda Disable MDNode uniquing.
- Hopefully this unbreaks some llvm-gcc bootstraps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 04:05:49 +00:00
Devang Patel
68f195cc50 While replacing an MDNode elment, properly update MDNode's operand list.
MDNode's operand list does not include all elements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 21:32:05 +00:00
Devang Patel
5f4ac848d9 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 01:39:20 +00:00
Devang Patel
8fc5576413 Revert 80839 for now. It causes test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 21:49:26 +00:00
Devang Patel
d9489cbb0c 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02 21:22:09 +00:00
Devang Patel
3a29d2d327 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 23:56:42 +00:00
Devang Patel
8cf476be5b Remove an entry from ValueMap before removing elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 15:32:38 +00:00
Devang Patel
8245988835 Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 05:01:18 +00:00
Devang Patel
2a610c7387 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!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 05:24:07 +00:00
Owen Anderson
1d0be15f89 Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:58:54 +00:00
Devang Patel
ab67e705f5 Link NamedMDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 18:01:24 +00:00
Devang Patel
286d9e4b9d Remove MDNode from ValueMap when MDNode is destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 22:59:46 +00:00
Devang Patel
6418a3ca85 Rename MDNodeSet as MDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 22:31:31 +00:00
Devang Patel
d7de19ad7b We are not using FoldingSet for metadata uniquing anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 18:59:07 +00:00
Owen Anderson
0631fce850 Change the MDNode uniquing to a ValueMap, at Devang's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78577 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 18:16:08 +00:00
Devang Patel
4771e16fa9 Keep track of metadata used by other metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 22:51:10 +00:00
Devang Patel
a82f8838c6 Add NamedMDNode destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 06:19:01 +00:00
Owen Anderson
647e3016de Move the metadata constructors back to 2.5 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 21:35:40 +00:00
Benjamin Kramer
20cc4b8cd9 fix a unitialized pointer in NamedMDNode (and reenable unittest)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 15:35:55 +00:00
Devang Patel
5316bf0252 There is no need to keep name ref in NamedMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 21:58:56 +00:00
Devang Patel
28bc9d8826 Keep track of named mdnodes in a Module using an ilist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 17:16:17 +00:00
Devang Patel
f457d1316d Add NamedMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77409 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 00:33:07 +00:00
Devang Patel
3755bec950 Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 22:04:55 +00:00
Devang Patel
0a9f7b9c3e Rename MDNode.h header. It defines MDnode and other metadata classes.
New name is Metadata.h.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 21:49:47 +00:00