Bob Wilson
7577e948e4
Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.
...
This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've
just changed SSAUpdater to check for existing PHIs in both places.
llvm-svn: 94690
2010-01-27 22:01:02 +00:00
Benjamin Kramer
1266d46d32
Don't bother with sprintf, just pass the Twine through.
...
llvm-svn: 94684
2010-01-27 19:58:47 +00:00
Chris Lattner
65f4733b77
some cleanups.
...
llvm-svn: 94649
2010-01-27 02:12:20 +00:00
Chris Lattner
711e701f1c
no need to check for null
...
llvm-svn: 94648
2010-01-27 02:04:20 +00:00
Victor Hernandez
477d9274bb
When converting dbg.declare to dbg.value, attach promoted store's debug metadata to dbg.value
...
llvm-svn: 94634
2010-01-27 00:44:36 +00:00
Victor Hernandez
2b17e2a452
Avoid extra calls to MD->getNumOperands()
...
llvm-svn: 94618
2010-01-26 23:29:09 +00:00
Victor Hernandez
9ecd2f039f
Switch AllocaDbgDeclares to SmallVector and don't leak DIFactory
...
llvm-svn: 94567
2010-01-26 18:57:53 +00:00
Victor Hernandez
cd94410152
In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store.
...
llvm-svn: 94493
2010-01-26 02:42:15 +00:00
Victor Hernandez
8a588e1444
Revert r94260 until findDbgDeclare() is made more efficient
...
llvm-svn: 94432
2010-01-25 17:52:13 +00:00
Chris Lattner
823aed16f9
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Victor Hernandez
5006e43faf
In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store
...
llvm-svn: 94260
2010-01-23 00:17:34 +00:00
Victor Hernandez
5f8c8c034a
Keep ignoring pointer-to-pointer bitcasts
...
llvm-svn: 94194
2010-01-22 19:05:05 +00:00
Chris Lattner
7ba0661f27
Stop building RTTI information for *most* llvm libraries. Notable
...
missing ones are libsupport, libsystem and libvmcore. libvmcore is
currently blocked on bugpoint, which uses EH. Once it stops using
EH, we can switch it off.
This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.
llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Victor Hernandez
7b151e9f06
No need to look through bitcasts for DbgInfoIntrinsic
...
llvm-svn: 94114
2010-01-21 23:09:12 +00:00
Victor Hernandez
ae4d949721
DbgInfoIntrinsic no longer appear in an instruction's use list
...
llvm-svn: 94113
2010-01-21 23:08:36 +00:00
Victor Hernandez
1df65186d1
DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics()
...
llvm-svn: 94111
2010-01-21 23:05:53 +00:00
Chris Lattner
24716b6c63
It turns out that this #include is needed because otherwise
...
ValueMapper.cpp ends up calling an out of line
__ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config
determines arbitrarily to use the one in libipo. This sucks, but
keeping the #include is a reasonable workaround.
llvm-svn: 94103
2010-01-21 21:29:25 +00:00
Chris Lattner
9889b4be04
unbreak the build, apparently without this transformutils starts depending on libipa?
...
llvm-svn: 94102
2010-01-21 21:20:51 +00:00
Chris Lattner
e39837d5ee
tidy up
...
llvm-svn: 94101
2010-01-21 21:05:54 +00:00
Victor Hernandez
a9ad174b49
Don't need to include IntrinsicInst.h any more
...
llvm-svn: 94092
2010-01-21 19:33:59 +00:00
Victor Hernandez
d089f4e10b
No need to map NULL operands of metadata
...
llvm-svn: 94091
2010-01-21 19:26:20 +00:00
Victor Hernandez
f2462407ee
Switch Elts from vector to SmallVector
...
llvm-svn: 93989
2010-01-20 06:56:16 +00:00
Victor Hernandez
5fa88d4e30
Map operands of all function-local metadata, not just metadata passed to llvm.dbg.declare intrinsics
...
llvm-svn: 93979
2010-01-20 05:49:59 +00:00
Devang Patel
696cb8d410
While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
...
because it points to an alloca instruction through metadata.
llvm-svn: 93757
2010-01-18 19:52:14 +00:00
Bob Wilson
e0da4b6cff
Fix a comment typo.
...
llvm-svn: 93560
2010-01-15 21:55:02 +00:00
Chris Lattner
7c743f2c74
add a helper function.
...
llvm-svn: 93251
2010-01-12 19:40:54 +00:00
Julien Lerouge
321098ebec
Fix nondeterministic behavior.
...
llvm-svn: 93093
2010-01-10 01:07:22 +00:00
Julien Lerouge
f50a3f19da
Fix nondeterministic behavior.
...
llvm-svn: 93038
2010-01-09 01:06:49 +00:00
Benjamin Kramer
a81a6dff0d
Convert a ton of simple integer type equality tests to the new predicate.
...
llvm-svn: 92760
2010-01-05 20:07:06 +00:00
Dan Gohman
c3c031bb37
Nick Lewycky pointed out that this code makes changes unconditionally.
...
llvm-svn: 92739
2010-01-05 17:50:58 +00:00
Dan Gohman
28943873e6
Use do+while instead of while for loops which obviously have a
...
non-zero trip count. Use SmallVector's pop_back_val().
llvm-svn: 92734
2010-01-05 16:27:25 +00:00
Dan Gohman
cb99fe9839
Make RecursivelyDeleteTriviallyDeadInstructions,
...
RecursivelyDeleteDeadPHINode, and DeleteDeadPHIs return a flag
indicating whether they made any changes.
llvm-svn: 92732
2010-01-05 15:45:31 +00:00
Benjamin Kramer
ccce8bae14
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
David Greene
084b0dde9d
Change errs() to dbgs().
...
llvm-svn: 92606
2010-01-05 01:26:57 +00:00
David Greene
76a4e852f8
Change errs() to dbgs().
...
llvm-svn: 92605
2010-01-05 01:26:54 +00:00
David Greene
725c7c3f2e
Change errs() to dbgs().
...
llvm-svn: 92604
2010-01-05 01:26:52 +00:00
David Greene
3774a38fdf
Change errs() to dbgs().
...
llvm-svn: 92603
2010-01-05 01:26:49 +00:00
David Greene
50c54238e4
Change errs() to dbgs().
...
llvm-svn: 92602
2010-01-05 01:26:45 +00:00
David Greene
0ad6dce031
Change errs() to dbgs().
...
llvm-svn: 92601
2010-01-05 01:26:44 +00:00
David Greene
627f40a9f2
Change errs() to dbgs().
...
llvm-svn: 92600
2010-01-05 01:26:41 +00:00
David Greene
a8a32dd987
Change errs() to dbgs().
...
llvm-svn: 92599
2010-01-05 01:26:39 +00:00
Devang Patel
be94f23992
Remove dead debug info intrinsics.
...
Intrinsic::dbg_stoppoint
Intrinsic::dbg_region_start
Intrinsic::dbg_region_end
Intrinsic::dbg_func_start
AutoUpgrade simply ignores these intrinsics now.
llvm-svn: 92557
2010-01-05 01:10:40 +00:00
Chris Lattner
6a0ca6aa90
fix Analysis/DebugInfo.h to not include Metadata.h. Do this
...
by moving one method out of line and eliminating redundant checks
from other methods.
llvm-svn: 92337
2009-12-31 03:02:08 +00:00
Chris Lattner
9b493028df
rename "elements" of metadata to "operands". "Elements" are
...
things that occur in types. "operands" are things that occur
in values.
llvm-svn: 92322
2009-12-31 01:22:29 +00:00
Benjamin Kramer
756d7086c1
Use an array instead of a SmallVector.
...
llvm-svn: 92264
2009-12-29 11:04:52 +00:00
Chris Lattner
22e13ba4e5
prune #includes.
...
llvm-svn: 92260
2009-12-29 09:12:29 +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
6311212bf9
remove useless argument.
...
llvm-svn: 92256
2009-12-29 08:03:58 +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