Dan Gohman
71b2d12a48
Add a new helper function to IVUsers for returning the "canonical"
...
form of an expression. This is the expression without the
post-increment adjustment made, which is useful in determining
which registers will be used by the expansion.
llvm-svn: 93921
2010-01-19 21:55:32 +00:00
Victor Hernandez
afaac26fea
Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
...
llvm-svn: 93764
2010-01-18 20:42:09 +00:00
Tobias Grosser
4ce43821ee
Create Generic DOTGraphTraits Printer/Viewer
...
Move the DOTGraphTraits dotty printer/viewer templates, that were developed for
the dominance tree into their own header file. This will allow reuse in future
passes.
llvm-svn: 93632
2010-01-16 10:56:41 +00:00
Devang Patel
3bbca51dcd
Replace DebugLocTuple with DILocation.
...
llvm-svn: 93630
2010-01-16 06:09:35 +00:00
Victor Hernandez
c1b5223e76
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
...
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.
llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Victor Hernandez
97d7107d5e
Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
...
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Victor Hernandez
aee71b4e81
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
...
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Eric Christopher
9230a37bb0
Pad my commit stats by reducing indentation in this now separate
...
commit.
llvm-svn: 93473
2010-01-14 23:00:10 +00:00
Eric Christopher
013342ad23
Few minor changes that were requested. No functional change.
...
llvm-svn: 93462
2010-01-14 21:48:00 +00:00
Evan Cheng
595cdb7091
Small tweak to inline cost computation. Ext of i/fcmp results are mostly optimized away in codegen.
...
llvm-svn: 93453
2010-01-14 21:04:31 +00:00
Eric Christopher
b2708c4ba1
Reduce the inlining cost of functions that contain calls to easily,
...
and frequently optimized functions.
llvm-svn: 93448
2010-01-14 20:12:34 +00:00
Victor Hernandez
832bd4fd2d
Respond to Chris' review:
...
Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t.
Get constness correct for getVariable() and getValue().
llvm-svn: 93149
2010-01-11 07:45:19 +00:00
Chris Lattner
953394de82
"In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
...
Patch by James Y Knight!
llvm-svn: 93079
2010-01-09 22:27:07 +00:00
Dan Gohman
771144e807
Use WriteAsOperand instead of getName() to print loop header names,
...
so that unnamed blocks are handled.
llvm-svn: 93059
2010-01-09 18:17:45 +00:00
Chris Lattner
0dc48180de
fix PR5978 by peeling the loop so that we avoid shifting the
...
result int by 8 for the first byte. While normally harmless,
if the result is smaller than a byte, this shift is invalid.
llvm-svn: 93018
2010-01-08 19:02:23 +00:00
Chris Lattner
944f9c4ac1
teach ComputeNumSignBits to look through PHI nodes.
...
llvm-svn: 92964
2010-01-07 23:44:37 +00:00
Duncan Sands
4ef1119d94
Partially address a README by having functionattrs consider calls to
...
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.
llvm-svn: 92829
2010-01-06 08:45:52 +00:00
Dan Gohman
b4e120e7a7
Restore dump() methods to Loop and MachineLoop.
...
llvm-svn: 92772
2010-01-05 21:08:02 +00:00
Benjamin Kramer
0ba7479f2c
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Benjamin Kramer
c233521d45
Convert a ton of simple integer type equality tests to the new predicate.
...
llvm-svn: 92760
2010-01-05 20:07:06 +00:00
Devang Patel
3b08c33f33
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
8a0648118b
constant fold nasty constant expressions formed by llvm-gcc,
...
wrapping up PR3351.
llvm-svn: 92410
2010-01-02 01:22:23 +00:00
Chris Lattner
ecba817b0e
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
c12382b7c8
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
Chris Lattner
9afb6e9c27
Optimize MDNode to coallocate the operand list immediately
...
after the MDNode in memory. This eliminates the operands
pointer and saves a new[] per node.
Note that the code in DIDerivedType::replaceAllUsesWith is wrong
and quite scary. A MDNode should not be RAUW'd with something
else: this changes all uses of the mdnode, which may not be debug
info related! Debug info should use something non-mdnode for
declarations.
llvm-svn: 92321
2009-12-31 01:05:46 +00:00
Chris Lattner
d981b3fc91
remove a bunch of unneeded functions.
...
llvm-svn: 92263
2009-12-29 09:32:19 +00:00
Chris Lattner
430379c2d5
major cleanups, much of this file was incorrectly indented.
...
llvm-svn: 92262
2009-12-29 09:22:47 +00:00
Chris Lattner
f0034478f8
one pass of cleanup over DebugInfo.h. Much more is still needed.
...
llvm-svn: 92261
2009-12-29 09:15:46 +00:00
Chris Lattner
84e9de4a58
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
9ec640a902
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
cd3aa9d1ff
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
David Greene
c0eced92e3
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92086
2009-12-23 23:29:28 +00:00
David Greene
693db7a309
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92085
2009-12-23 23:27:15 +00:00
David Greene
0c06474821
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92081
2009-12-23 23:14:41 +00:00
David Greene
5980bb69ba
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92080
2009-12-23 23:09:39 +00:00
David Greene
b73d637eba
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92077
2009-12-23 23:00:50 +00:00
David Greene
f227aac0f4
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92076
2009-12-23 22:59:29 +00:00
David Greene
1b160211dd
Remove dump routine and the associated Debug.h from a header. Patch up
...
other files to compensate.
llvm-svn: 92075
2009-12-23 22:58:38 +00:00
David Greene
dafe3d88d6
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92073
2009-12-23 22:49:57 +00:00
David Greene
02480b7d83
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92071
2009-12-23 22:35:10 +00:00
David Greene
b348240e9c
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92068
2009-12-23 22:28:01 +00:00
David Greene
62d4863b56
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92067
2009-12-23 22:18:14 +00:00
David Greene
f2377def25
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92066
2009-12-23 22:10:20 +00:00
David Greene
fc8ae247eb
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92063
2009-12-23 21:58:29 +00:00
David Greene
4caa552456
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92060
2009-12-23 21:48:18 +00:00
David Greene
c8b577197f
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92050
2009-12-23 21:27:29 +00:00
David Greene
fd7042fa79
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92048
2009-12-23 21:16:54 +00:00
David Greene
28b8bcd98d
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92046
2009-12-23 21:06:14 +00:00
David Greene
33f717c804
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92042
2009-12-23 20:52:41 +00:00
David Greene
016e0af68d
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92040
2009-12-23 20:43:58 +00:00