Owen Anderson
a7aed18624
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
bda59bd247
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
755aceb5d0
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
...
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Owen Anderson
a57b97e7e7
Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
...
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Dan Gohman
afbe4a7a10
Make this code a little more readable.
...
llvm-svn: 108968
2010-07-20 23:49:44 +00:00
Dan Gohman
b22dd85bb3
Fix a typo.
...
llvm-svn: 108962
2010-07-20 23:10:36 +00:00
Dan Gohman
5c2e65b7bf
Don't look up the "dbg" metadata kind by name.
...
llvm-svn: 108961
2010-07-20 23:09:34 +00:00
Devang Patel
2b434e12cd
Debugging infomration is encoded in llvm IR using metadata. This is designed
...
such a way that debug info for symbols preserved even if symbols are
optimized away by the optimizer.
Add new special pass to remove debug info for such symbols.
llvm-svn: 107416
2010-07-01 19:49:20 +00:00
Devang Patel
b9e2e4b762
If a named mdnode is removed then mark module as changed.
...
llvm-svn: 107412
2010-07-01 18:27:46 +00:00
Devang Patel
db735cbbab
Remove all debug info related named mdnodes.
...
llvm-svn: 107323
2010-06-30 21:29:00 +00:00
Gabor Greif
d50572802e
use ArgOperand API
...
llvm-svn: 107277
2010-06-30 12:40:35 +00:00
Duncan Sands
17f1ca8793
Return Changed. This required setting Changed if dbg metadata
...
is stripped off. Currently set unconditionally, since the API
does not provide a way of working out if anything was actually
stripped off.
llvm-svn: 107142
2010-06-29 14:52:10 +00:00
Devang Patel
e2ff7f3a7d
Strip llvm.dbg.lv also.
...
llvm-svn: 104236
2010-05-20 16:49:22 +00:00
Devang Patel
211746a69a
Strip new llvm.dbg.value intrinsic.
...
llvm-svn: 95807
2010-02-10 21:19:56 +00:00
Benjamin Kramer
3838dfbaea
Another strncmp -> StringRef.startswith simplification.
...
llvm-svn: 94203
2010-01-22 20:00:21 +00:00
Chris Lattner
a0566979b7
Final step in the metadata API restructuring: move the
...
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.
llvm-svn: 92259
2009-12-29 09:01:33 +00:00
Chris Lattner
2f2aa2b067
This is a major cleanup of the instruction metadata interfaces that
...
I asked Devang to do back on Sep 27. Instead of going through the
MetadataContext class with methods like getMD() and getMDs(), just
ask the instruction directly for its metadata with getMetadata()
and getAllMetadata().
This includes a variety of other fixes and improvements: previously
all Value*'s were bloated because the HasMetadata bit was thrown into
value, adding a 9th bit to a byte. Now this is properly sunk down to
the Instruction class (the only place where it makes sense) and it
will be folded away somewhere soon.
This also fixes some confusion in getMDs and its clients about
whether the returned list is indexed by the MDID or densely packed.
This is now returned sorted and densely packed and the comments make
this clear.
This introduces a number of fixme's which I'll follow up on.
llvm-svn: 92235
2009-12-28 23:41:32 +00:00
Chris Lattner
7093946ab1
rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
...
doesn't exist already, eliminate registerMDKind. Tidy up a bunch
of random stuff.
llvm-svn: 92225
2009-12-28 20:45:51 +00:00
Devang Patel
12144a2348
Remove debug info attached with an instruction.
...
llvm-svn: 89016
2009-11-17 00:47:06 +00:00
Devang Patel
ffd561bc2d
llvm.dbg.global_variables do not exist anymore.
...
llvm-svn: 85402
2009-10-28 16:51:52 +00:00
Chris Lattner
a91a563530
Previously, all operands to Constant were themselves constant.
...
In the new world order, BlockAddress can have a BasicBlock operand.
This doesn't permute much, because if you have a ConstantExpr (or
anything more specific than Constant) we still know the operand has
to be a Constant.
llvm-svn: 85375
2009-10-28 05:14:34 +00:00
Devang Patel
27e0be274e
Derive metadata hierarchy from Value instead of User.
...
llvm-svn: 84801
2009-10-21 23:57:35 +00:00
Nick Lewycky
88214fbd12
Remove VISIBILITY_HIDDEN from this file.
...
llvm-svn: 80903
2009-09-03 06:43:15 +00:00
Devang Patel
80ae34974b
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Devang Patel
f08e35d9dc
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Devang Patel
02aac922b4
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
Dan Gohman
a6d0afcb74
Fix a bunch of namespace pollution.
...
llvm-svn: 78363
2009-08-07 01:32:21 +00:00
Devang Patel
ae5ead6df4
Use DebugInfoFinder.
...
llvm-svn: 78333
2009-08-06 20:53:06 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
6115b39ffd
Remove Value::getName{Start,End}, the last of the old Name APIs.
...
llvm-svn: 77152
2009-07-26 09:48:23 +00:00
Owen Anderson
47db941fd3
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Chris Lattner
58f9bb2ccd
implement a new magic global "llvm.compiler.used" which is like llvm.used, but
...
doesn't cause ".no_dead_strip" to be emitted on darwin.
llvm-svn: 76399
2009-07-20 06:14:25 +00:00
Owen Anderson
20b34ac794
Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
...
our current context-passing stuff, which is also fixed here
llvm-svn: 76089
2009-07-16 18:04:31 +00:00
Owen Anderson
605a8c743f
More LLVMContext-ification.
...
llvm-svn: 74811
2009-07-06 01:34:54 +00:00
Devang Patel
0751a28888
Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
...
and llvm.dbg.global_variables.
llvm-svn: 74251
2009-06-26 01:49:18 +00:00
Dan Gohman
b17dcbdadc
The second argument to RecursivelyDeleteTriviallyDeadInstructions has
...
a default value, and will hopefully be going away soon.
llvm-svn: 70642
2009-05-02 20:22:10 +00:00
Dale Johannesen
a4ac735531
Fix -strip-debug-declare to work when there are
...
llvm.global.variable's but no llvm.declare's.
llvm-svn: 66977
2009-03-13 22:59:47 +00:00
Devang Patel
4a1b0776b3
Remove llvm.dbg.global_variables also.
...
llvm-svn: 66471
2009-03-09 21:32:28 +00:00
Devang Patel
66f84e7a42
Add helper pass to remove llvm.dbg.declare intrinsics.
...
llvm-svn: 66454
2009-03-09 20:49:37 +00:00
Devang Patel
b833ce74d8
Recursively remove dead argument while removing llvm.dbg.declare intrinsic.
...
llvm-svn: 65971
2009-03-03 21:31:02 +00:00
Devang Patel
49d64927e1
Remove all dbg symobls, including those with circular references.
...
This is ugly, but I can't figure out a quick way out of this.
llvm-svn: 65889
2009-03-02 22:50:58 +00:00
Rafael Espindola
6de96a1b5d
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Devang Patel
c8b2fe1eed
Do not forget llvm.dbg.declare's first argument while removing debugging information.
...
llvm-svn: 59688
2008-11-20 01:20:42 +00:00
Devang Patel
25662f3e4a
Remove unused variables.
...
llvm-svn: 59570
2008-11-19 00:22:02 +00:00
Devang Patel
ebd2363339
Fix typo.
...
llvm-svn: 59569
2008-11-19 00:19:18 +00:00
Devang Patel
b5e867acff
Add new helper pass that strips all symbol names except debugging information.
...
This pass makes it easier to test wheter debugging info. influences optimization passes or not.
llvm-svn: 59552
2008-11-18 21:34:39 +00:00
Devang Patel
3b7a2be88e
Remove even more llvm.dbg variables.
...
Remove all dead globals from llvm.metadata.
Ignore linkonce linkage for selected llvm.dbg values.
llvm-svn: 59547
2008-11-18 21:13:41 +00:00
Chris Lattner
f8f6270f14
simplify loop
...
llvm-svn: 59406
2008-11-16 06:35:18 +00:00
Devang Patel
8ada1d5de5
Refactor code.
...
Strip debug information before stripping symbol names.
llvm-svn: 59328
2008-11-14 22:49:37 +00:00
Devang Patel
3dd51c5c62
Really remove all debug information.
...
llvm-svn: 59208
2008-11-13 01:28:40 +00:00