Dan Gohman
47a0f0d56f
Remove setDbgMetadata and getDbgMetadata; their users have been
...
replaced with setDebugLoc and getDebugLoc.
llvm-svn: 108914
2010-07-20 20:18:21 +00:00
Owen Anderson
660466ed42
I just fail with SVN today.
...
llvm-svn: 108888
2010-07-20 19:23:55 +00:00
Owen Anderson
1e8ae64f83
Convert the internal PassRegistrar class into a new, external PassRegistry class. No intended functionality change at this point.
...
llvm-svn: 108877
2010-07-20 18:39:06 +00:00
Owen Anderson
3183ef1120
Pull out r108755. After offline discussion with Chris, we're going to go a different direction with this.
...
llvm-svn: 108856
2010-07-20 16:55:05 +00:00
Owen Anderson
81781220d2
Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
...
would cause them to fail the way they are, but none of the other intervening patches seem likely either.
llvm-svn: 108818
2010-07-20 08:26:15 +00:00
Owen Anderson
8dc129325f
Reapply r108794, a fix for the failing test from last time.
...
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar
4a35d6f8cd
Revert r108794, "Separate PassInfo into two classes: a constructor-free
...
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.
llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson
e7c5fe586a
Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
...
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Owen Anderson
0edf6a1131
Change the implemented interfaces list on PassInfo from a std::vector to a manually implemented
...
linked list. This is a little slower and involves more malloc'ing, but these lists are
typically short, and it allows PassInfo to be entirely constant initializable.
llvm-svn: 108755
2010-07-19 21:44:48 +00:00
Duncan Sands
b1d61aab06
Expose BasicBlock::moveBefore and moveAfter in C API, patch
...
by Benjamin Saunders.
llvm-svn: 108699
2010-07-19 15:31:07 +00:00
Gabor Greif
39c06b3b23
precompute 20 tags
...
llvm-svn: 108695
2010-07-19 14:48:15 +00:00
Gabor Greif
2960987ddb
fullStopTag cannot happen here, it is handled above
...
llvm-svn: 108631
2010-07-17 20:52:46 +00:00
Chris Lattner
718da70ca2
Fix PR7658, a problem where type refinement can trigger
...
constant replacement which was botching its handling of
types. Use of getType() instead of getRawType() was causing
the type map in constant folding to be updated wrong.
llvm-svn: 108610
2010-07-17 06:13:52 +00:00
Chris Lattner
c9c22862d4
tidy up
...
llvm-svn: 108560
2010-07-16 21:20:46 +00:00
Chris Lattner
27e997a168
eliminate unlockedRefineAbstractTypeTo, types are all per-llvmcontext,
...
so there is no locking involved in type refinement.
llvm-svn: 108553
2010-07-16 20:50:13 +00:00
Gabor Greif
fee4dafbd0
get the first few tags from a precomputed table (count can be increased if desired)
...
llvm-svn: 108549
2010-07-16 20:35:19 +00:00
Gabor Greif
6d673953e3
eliminate CallInst::ArgOffset
...
llvm-svn: 108522
2010-07-16 09:38:02 +00:00
Tobias Grosser
3d84c9c793
LoopSimplify does not update domfrontier correctly.
...
This fixes PR7649.
llvm-svn: 108513
2010-07-16 05:59:45 +00:00
Tobias Grosser
bd7c9f701b
Add dump() to DominanceFrontier
...
llvm-svn: 108512
2010-07-16 05:59:39 +00:00
Benjamin Kramer
92d8998348
Don't pass StringRef by reference.
...
llvm-svn: 108366
2010-07-14 22:38:02 +00:00
Dan Gohman
1513217e27
Just use getParent() instead of getModuleFromVal when the value is a Function.
...
llvm-svn: 108358
2010-07-14 21:12:44 +00:00
Dan Gohman
efb8dbb3f1
Rename WriteConstantInt to WriteConstantInternal, to avoid confusion.
...
llvm-svn: 108357
2010-07-14 20:57:55 +00:00
Dan Gohman
1e0213a758
Add support for empty metadata nodes: !{}.
...
llvm-svn: 108259
2010-07-13 19:33:27 +00:00
Gabor Greif
03e7e68caa
rotate CallInst operands
...
with this commit the callee moves to the end of
the operand array (from the start) and the call
arguments now start at index 0 (formerly 1)
this ordering is now consistent with InvokeInst
this commit only flips the switch,
functionally it is equivalent to
r101465
I intend to commit several cleanups after a few
days of soak period
llvm-svn: 108240
2010-07-13 15:31:36 +00:00
Gabor Greif
2a464d7308
cache dereferenced iterators
...
llvm-svn: 108131
2010-07-12 10:36:48 +00:00
Duncan Sands
41b4a6b36a
Convert some tab stops into spaces.
...
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner
25eea4db66
fix PR7311 by avoiding breaking casts when a bitcast from scalar->vector
...
is involved.
llvm-svn: 108117
2010-07-12 01:19:22 +00:00
Chris Lattner
601e390a3b
make the prototypes for CreateMalloc and CreateFree more consistent. Patch
...
by Hans Vandierendonck from PR7605
llvm-svn: 108116
2010-07-12 00:57:28 +00:00
Nick Lewycky
5d373c2141
If it's safe to speculatively execute load(alloca) the it's safe to execute
...
load(gep(alloca)) where the gep is all-zeros. There's more we could do here but
this is a common case.
llvm-svn: 108101
2010-07-11 20:36:29 +00:00
Chris Lattner
31bd2de24e
fix typo
...
llvm-svn: 108100
2010-07-11 19:42:53 +00:00
Chris Lattner
9380b81837
use PrintEscapedString to handle attribute section with escapes in it,
...
PR7399. The asm parser already handles this. This is of dubious
utility (see the PR) but the asmprinter was clearly broken here.
llvm-svn: 107834
2010-07-07 23:16:37 +00:00
Devang Patel
b36df17b08
Add fixme.
...
llvm-svn: 107697
2010-07-06 21:05:17 +00:00
Dan Gohman
ee8d80d6a3
IndirectBr is not safe to speculatively execute (!)
...
llvm-svn: 107454
2010-07-02 00:35:34 +00:00
Bill Wendling
03bcd6ecc8
Implement the "linker_private_weak" linkage type. This will be used for
...
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.
For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
Currently only supported on Darwin platforms.
llvm-svn: 107433
2010-07-01 21:55:59 +00:00
Gabor Greif
9dc154bcb4
reformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it work even if CallInst::op_* are private
...
llvm-svn: 107390
2010-07-01 10:41:37 +00:00
Bill Wendling
3632171750
Revert r107205 and r107207.
...
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
1767723dbe
Introducing the "linker_weak" linkage type. This will be used for Objective-C
...
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:
.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1
This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".
llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Gabor Greif
eab748d409
use ArgOperand API
...
llvm-svn: 107145
2010-06-29 16:17:26 +00:00
Gabor Greif
eec74583ca
encode operand initializations (at fixed index)
...
in terms of Op<> and ArgOffset. This works for
values of {0, 1} for ArgOffset.
Please note that ArgOffset will become 0 soon and
will go away eventually.
llvm-svn: 107129
2010-06-29 11:41:38 +00:00
Dan Gohman
e697a6f24f
Constant fold x == undef to undef.
...
llvm-svn: 107074
2010-06-28 21:30:07 +00:00
Dan Gohman
7c34ece501
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
...
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.
llvm-svn: 107071
2010-06-28 21:16:52 +00:00
Gabor Greif
4d18165f82
use ArgOperand accessors
...
llvm-svn: 106626
2010-06-23 13:56:57 +00:00
Gabor Greif
c9a9251844
use ArgOperand accessors
...
llvm-svn: 106623
2010-06-23 13:09:06 +00:00
Gabor Greif
e54065394e
use helper to neatly access arguments
...
llvm-svn: 106622
2010-06-23 08:45:32 +00:00
Gabor Greif
c89d2aad4c
use high-level accessors
...
llvm-svn: 106573
2010-06-22 20:40:38 +00:00
Gabor Greif
b575cf69f4
warmup ritual: use high-level argument accessors
...
llvm-svn: 106563
2010-06-22 19:46:37 +00:00
Devang Patel
b6e058da18
Use single interface, using twine, to get named metadata.
...
getNamedMetadata().
llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Dan Gohman
dd41bba517
Use A.append(...) instead of A.insert(A.end(), ...) when A is a
...
SmallVector, and other SmallVector simplifications.
llvm-svn: 106452
2010-06-21 19:47:52 +00:00
Dan Gohman
ffdee30e90
Move several non-performance-critical member functinos out of line.
...
llvm-svn: 106444
2010-06-21 18:46:45 +00:00
Bob Wilson
4581434c27
Tidy.
...
llvm-svn: 106383
2010-06-19 05:33:57 +00:00