Victor Hernandez
9ce5b5134d
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
25963c6113
"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
bc694918cc
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
a69f89c17a
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
35d3b9dcd0
teach ComputeNumSignBits to look through PHI nodes.
...
llvm-svn: 92964
2010-01-07 23:44:37 +00:00
Duncan Sands
78376ad7e1
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
c3f2137c06
Restore dump() methods to Loop and MachineLoop.
...
llvm-svn: 92772
2010-01-05 21:08:02 +00:00
Benjamin Kramer
d2564e3afb
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +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
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
8fb74c6ee2
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
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
Chris Lattner
8cb6c3476d
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
8e805be369
remove a bunch of unneeded functions.
...
llvm-svn: 92263
2009-12-29 09:32:19 +00:00
Chris Lattner
047fd2fd97
major cleanups, much of this file was incorrectly indented.
...
llvm-svn: 92262
2009-12-29 09:22:47 +00:00
Chris Lattner
573f294c00
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
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
David Greene
1495b5f887
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92086
2009-12-23 23:29:28 +00:00
David Greene
f790593e6e
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92085
2009-12-23 23:27:15 +00:00
David Greene
91b6bcefc6
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92081
2009-12-23 23:14:41 +00:00
David Greene
3d64631fef
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92080
2009-12-23 23:09:39 +00:00
David Greene
3fe18e72b3
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92077
2009-12-23 23:00:50 +00:00
David Greene
d79102d6f2
Change dbgs() back to errs() for assert messages as Chris requested.
...
llvm-svn: 92076
2009-12-23 22:59:29 +00:00
David Greene
2330f78075
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
0295ecfea0
Change dbgs() back to errs() as Chris requested.
...
llvm-svn: 92073
2009-12-23 22:49:57 +00:00
David Greene
452fc61a26
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
faa00b7a7f
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
df1c497c2f
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
2e23db1156
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
8135870f23
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
cf1884c246
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
1e4ea201d5
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
047ac4aa79
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
04e7ae6a57
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
9507879bca
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
37e9809294
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
David Greene
a7b92ee147
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92039
2009-12-23 20:34:27 +00:00
David Greene
069857ea31
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92037
2009-12-23 20:20:46 +00:00
David Greene
f8ed991e5a
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92035
2009-12-23 20:10:59 +00:00
David Greene
ba44b3ed59
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92034
2009-12-23 20:03:58 +00:00
David Greene
23e8c74d69
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92033
2009-12-23 19:51:44 +00:00
David Greene
83d478145d
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92032
2009-12-23 19:45:49 +00:00
David Greene
2ec90035e8
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92029
2009-12-23 19:27:59 +00:00
David Greene
2281998095
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92026
2009-12-23 19:21:19 +00:00
David Greene
a4375f1ffd
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92024
2009-12-23 19:15:13 +00:00
Chris Lattner
9b7d99eb76
The phi translated pointer can be computed when returning a partially cached result
...
instead of stored. This reduces memdep memory usage, and also eliminates a bunch of
weakvh's. This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.
llvm-svn: 91885
2009-12-22 04:25:02 +00:00
Chris Lattner
2ee6787c1b
avoid calling extractMallocCall when it's obvious we don't have
...
a call. This speeds up memdep ~1.5%
llvm-svn: 91869
2009-12-22 01:00:32 +00:00