1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

3720 Commits

Author SHA1 Message Date
John Thompson
ae3a86d6de Added skeleton for inline asm multiple alternative constraint support.
llvm-svn: 113766
2010-09-13 18:15:37 +00:00
Dale Johannesen
b3df2ff13d Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)

llvm-svn: 113618
2010-09-10 20:55:01 +00:00
Bill Wendling
51019d366e Use StringRef which performs the "early exit" when compared against a constant
string.

llvm-svn: 113615
2010-09-10 20:42:26 +00:00
Bill Wendling
b3818f7584 Early exit with simple checks.
llvm-svn: 113603
2010-09-10 19:06:58 +00:00
Bill Wendling
f6ee5c5231 Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.

llvm-svn: 113600
2010-09-10 18:51:56 +00:00
Dan Gohman
3c81335a10 MDNodes are not Constants.
llvm-svn: 113539
2010-09-09 20:54:24 +00:00
Dan Gohman
2a0bee3d07 Print invalid metadata references as <badref>, for consistency with
regular value references.

llvm-svn: 113538
2010-09-09 20:53:58 +00:00
Owen Anderson
c7dd9d3840 Clarify the ownership model of LLVMContext and Module. Namely, contexts own
modules are instantiated in them.  If the context is deleted, all of its owned
modules are also deleted.

llvm-svn: 113374
2010-09-08 18:03:32 +00:00
Owen Anderson
94ae132fc8 Fix PR7972, in which the PassRegistry was being leaked. As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.

llvm-svn: 113283
2010-09-07 20:48:10 +00:00
Bill Wendling
9bb7ac566f Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
llvm-svn: 113261
2010-09-07 20:03:56 +00:00
Owen Anderson
e15120e561 Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.

llvm-svn: 113252
2010-09-07 19:16:25 +00:00
Bob Wilson
24fa0b33b1 Replace NEON vabdl, vaba, and vabal intrinsics with combinations of the
vabd intrinsic and add and/or zext operations.  In the case of vaba, this
also avoids the need for a DAG combine pattern to combine vabd with add.
Update tests.  Auto-upgrade the old intrinsics.

llvm-svn: 112941
2010-09-03 01:35:08 +00:00
Chris Lattner
0f0c0967e4 lets get crazy and name the header file the exact class name,
not a scrunched version of it.

llvm-svn: 112904
2010-09-02 23:09:42 +00:00
Chris Lattner
fad92eae5f reapply 112894:
Remove #uses comments from functions: they we're padded out to column 50
and were potentially confusing for externally visible functions.

going further, remove the "<i8**> [#uses=3]" comments entirely. They
add a lot of noise, confuse people about what the IR is, and don't add 
any particular value.  When the types are long it makes it really really
hard to read IR.

If someone is interested in this sort of thing, the right way to do this
is to implement an AsmAnnotationWriter that produces the same output, and
add a flag to llvm-dis (only) to produce this output.

llvm-svn: 112899
2010-09-02 22:52:10 +00:00
Chris Lattner
fb0dc5c3ba revert patch, need to update clang tests too
llvm-svn: 112895
2010-09-02 22:42:07 +00:00
Chris Lattner
ae715d8b70 Remove #uses comments from functions: they we're padded out to column 50
and were potentially confusing for externally visible functions.

going further, remove the "<i8**> [#uses=3]" comments entirely. They
add a lot of noise, confuse people about what the IR is, and don't add 
any particular value.  When the types are long it makes it really really
hard to read IR.

If someone is interested in this sort of thing, the right way to do this
is to implement an AsmAnnotationWriter that produces the same output, and
add a flag to llvm-dis (only) to produce this output.

llvm-svn: 112894
2010-09-02 22:41:24 +00:00
Duncan Sands
6b382d04f4 Print the number of uses of a function in the .ll since it can be informative
and there seems to be no reason not to.

llvm-svn: 112812
2010-09-02 08:52:23 +00:00
Bob Wilson
3348d2eb50 Remove NEON vmull, vmlal, and vmlsl intrinsics, replacing them with multiply,
add, and subtract operations with zero-extended or sign-extended vectors.
Update tests.  Add auto-upgrade support for the old intrinsics.

llvm-svn: 112773
2010-09-01 23:50:19 +00:00
Dan Gohman
6909a51674 Add comments explaining why it's not necessary to include the
is-function-local flag in metadata uniquing bits.

llvm-svn: 112528
2010-08-30 21:18:41 +00:00
Bob Wilson
826a677f94 Remove NEON vmovn intrinsic, replacing it with vector truncate operations.
Auto-upgrade the old intrinsic and update tests.

llvm-svn: 112507
2010-08-30 20:02:30 +00:00
Bob Wilson
807d004452 Remove NEON vaddl, vaddw, vsubl, and vsubw intrinsics. Instead, use llvm
IR add/sub operations with one or both operands sign- or zero-extended.
Auto-upgrade the old intrinsics.

llvm-svn: 112416
2010-08-29 05:57:34 +00:00
Chris Lattner
ecf276b787 remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.

llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Chris Lattner
fcf6250d57 zap dead code
llvm-svn: 112349
2010-08-28 03:18:45 +00:00
Bob Wilson
c01101e76c Add alignment arguments to all the NEON load/store intrinsics.
Update all the tests using those intrinsics and add support for
auto-upgrading bitcode files with the old versions of the intrinsics.

llvm-svn: 112271
2010-08-27 17:13:24 +00:00
Dan Gohman
6e1e480f13 Don't include the is-function-local bit in the FoldingSetNodeID
for MDNodes, since this information is effectively implied by
the operands. This allow allows the code to avoid doing a
recursive is-it-really-function-local check in some cases.

llvm-svn: 111995
2010-08-24 23:21:12 +00:00
Dan Gohman
1aabedd6b3 Verify that a non-uniqued non-temporary MDNode is not deleted via
MDNode::deleteTemporary.

llvm-svn: 111853
2010-08-23 22:32:05 +00:00
Owen Anderson
fe3d206e65 Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.
llvm-svn: 111815
2010-08-23 17:52:01 +00:00
Nick Lewycky
c529c1c041 Verify the predicates on icmp/fcmp. Suggested by Jeff Yasskin!
llvm-svn: 111787
2010-08-22 23:45:14 +00:00
Benjamin Kramer
8ae4730ad7 Use MDNode::destroy(). Fixes a delete/free mismatch.
llvm-svn: 111739
2010-08-21 15:07:23 +00:00
Dan Gohman
ad0acc2bf2 Add an assert to MDNode::deleteTemporary check that the node being deleted
is not non-temporary.

llvm-svn: 111713
2010-08-21 02:52:29 +00:00
Bill Wendling
163660135e Create the new linker type "linker_private_weak_def_auto".
It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility.  The symbols are removed by the linker from the final linked image
(executable or dynamic library).

llvm-svn: 111684
2010-08-20 22:05:50 +00:00
Dan Gohman
072e7bdcd4 Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.

llvm-svn: 111681
2010-08-20 22:02:26 +00:00
Erick Tryzelaar
68c31295f7 Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
llvm-svn: 111625
2010-08-20 14:51:22 +00:00
Bob Wilson
0039bc228b Replace the arm.neon.vmovls and vmovlu intrinsics with vector sign-extend and
zero-extend operations.

llvm-svn: 111614
2010-08-20 04:54:02 +00:00
Dan Gohman
bb27588b3f Revert r111199; it breaks -debug-pass=Structure output.
llvm-svn: 111500
2010-08-19 01:29:07 +00:00
Dan Gohman
72106f71dc The plural of analysis is analyses.
llvm-svn: 111200
2010-08-16 22:57:28 +00:00
Dan Gohman
b09e2e1be4 Make dumpPassStructure be a PMDataManager abstraction, rather than
a Pass abstraction, since that's the level it's actually used at.
Rename Pass' dumpPassStructure to dumpPass.

This eliminates an awkward use of getAsPass() to convert a PMDataManager*
into a Pass* just to permit a dumpPassStructure call.

llvm-svn: 111199
2010-08-16 22:45:12 +00:00
Dan Gohman
dfd828dd87 Remove redundant inline keywords.
llvm-svn: 111192
2010-08-16 21:57:30 +00:00
Dan Gohman
05fbd723d5 Eliminate the TopLevelManagerType enum; instead, just make
PMTopLevelManager's constructor take a PMDataManager *, which already
provides the needed abstraction support.

llvm-svn: 111189
2010-08-16 21:38:42 +00:00
Argyrios Kyrtzidis
75b69c1de3 Revert r111082. No warnings for this common pattern.
llvm-svn: 111102
2010-08-15 10:27:23 +00:00
Argyrios Kyrtzidis
70b248e3ac Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.
llvm-svn: 111082
2010-08-14 21:35:10 +00:00
Nate Begeman
833a7cd504 Move some code from Verifier into SVI::isValidOperands. This allows us to catch bad shufflevector operations when they are created, rather than waiting for someone to notice later on.
llvm-svn: 110986
2010-08-13 00:16:46 +00:00
Dan Gohman
88b65340ea Trim #includes.
llvm-svn: 110983
2010-08-12 23:56:03 +00:00
Dan Gohman
6fd1662d06 Tidy up whitespace.
llvm-svn: 110982
2010-08-12 23:50:08 +00:00
Dan Gohman
f6ffbfbbd1 Use .empty() instead of .size().
llvm-svn: 110981
2010-08-12 23:46:28 +00:00
Dan Gohman
da120221cb Remove BasicBlockPass::runOnFunction, which was unused.
llvm-svn: 110847
2010-08-11 20:28:16 +00:00
Dan Gohman
0f3058d723 Delete FunctionPass::run, which is unused.
llvm-svn: 110843
2010-08-11 19:11:05 +00:00
Dan Gohman
18a8add4ab Delete FunctionPass::runOnModule, which is unused.
llvm-svn: 110842
2010-08-11 19:05:53 +00:00
Nick Lewycky
0651189df1 Reject unrepresentable pointer types in intrinsics. Fixes PR7316.
llvm-svn: 110541
2010-08-08 06:12:09 +00:00
Dan Gohman
48a98809af More #include cleanups.
llvm-svn: 110499
2010-08-07 01:18:18 +00:00
Dan Gohman
9cabe94039 Oops, check in this file too.
llvm-svn: 110496
2010-08-07 01:04:15 +00:00
Dan Gohman
1d48a4b1d7 Tidy some #includes and forward-declarations, and move the C binding code
out of PassManager.cpp and into Core.cpp with the rest of the C binding code.

llvm-svn: 110494
2010-08-07 00:43:20 +00:00
Owen Anderson
f2fea95f2f Reapply r110396, with fixes to appease the Linux buildbot gods.
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
aadd8a89ca Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
b9762c07cb 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
Gabor Greif
f2465b8757 remove the private hack from CallInst, it was not supposed to hit the branch anyway
as a positive consequence the CallSite::getCallee() methods now can be rewritten to be
a bit more efficient

llvm-svn: 110380
2010-08-05 21:25:49 +00:00
Dan Gohman
227c4f64ac Eliminate unnecessary empty string literals.
llvm-svn: 110183
2010-08-04 01:39:08 +00:00
Dan Gohman
655a83cec4 Fix visitInvokeInst to call visitTerminatorInst, and remove
a redundant check from checkInstruction.

llvm-svn: 110076
2010-08-02 23:09:14 +00:00
Dan Gohman
5e090b7535 Add Verifier logic for indirectbr.
llvm-svn: 110075
2010-08-02 23:08:33 +00:00
Oscar Fuentes
4742c01c2a Prefix next' iterator operation with llvm::'.
Fixes potential ambiguity problems on VS 2010.

Patch by nobled!

llvm-svn: 110029
2010-08-02 06:00:15 +00:00
Benjamin Kramer
1f47ed839d Preallocate vector, avoid unnecessary vector growth.
llvm-svn: 109971
2010-08-01 11:43:26 +00:00
Dan Gohman
343e4fb4ea Make GlobalValue alignment consistent with load, store, and alloca
alignment, fixing silent truncation of alignment values.

llvm-svn: 109653
2010-07-28 20:56:48 +00:00
Dan Gohman
939744be5f Define a maximum supported alignment value for load, store, and
alloca instructions (constrained by their internal encoding),
and add error checking for it. Fix an instcombine bug which
generated huge alignment values (null is infinitely aligned).
This fixes undefined behavior noticed by John Regehr.

llvm-svn: 109643
2010-07-28 20:12:04 +00:00
Duncan Sands
816457c7f3 After updating value handles for RAUW, check that no weak or tracking handles
are still on the list.  This might happen if a CallbackVH created some new value
handles for the old value when doing RAUW.  Barf if it occurs, since it is almost
certainly a mistake.

llvm-svn: 109495
2010-07-27 06:53:14 +00:00
Dan Gohman
e191a19b69 Fix (at least) quadratic worst-case complexity in DominanceFrontier::splitBlock:
don't visit all blocks in the function, and don't iterate over the split blocks'
predecessor lists for each block visited.

Also, remove the special-case test for the entry block. Splitting the entry
block isn't common enough to make this worthwhile.

This fixes a major compile-time bottleneck which is exposed now that
LoopSimplify isn't being redundantly run both before and after
DominanceFrontier.

llvm-svn: 109408
2010-07-26 17:55:15 +00:00
Dan Gohman
c90f474e23 Avoid copying and recopying a std::set.
llvm-svn: 109405
2010-07-26 17:45:33 +00:00
Dan Gohman
8babd895c7 Exit a search loop when the search goal is found.
llvm-svn: 109404
2010-07-26 17:41:45 +00:00
Dan Gohman
014eec6389 Fix formatting.
llvm-svn: 109403
2010-07-26 17:39:33 +00:00
Benjamin Kramer
0f8f1bd5a1 Reduce string trashing.
llvm-svn: 109386
2010-07-25 23:18:32 +00:00
Eli Friedman
6769a5186d PR7704: A function is not allowed to return a function; make sure to enforce
this consistently.

llvm-svn: 109360
2010-07-24 22:58:04 +00:00
Duncan Sands
5128cb3743 Clarify that if a new value handle is added while dropping value handles
hanging off a value, then the dropping code will intentionally not drop
it too (since this is almost certainly a bug).

llvm-svn: 109337
2010-07-24 12:09:22 +00:00
Gabor Greif
a7509fca78 undo 80 column trespassing I caused
llvm-svn: 109092
2010-07-22 10:37:47 +00:00
Dan Gohman
859ffd353e Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.

llvm-svn: 109061
2010-07-21 23:38:33 +00:00
Owen Anderson
f8addbb0a1 Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Dan Gohman
f4c6f5cc46 NamedMDNode is never an operand.
llvm-svn: 109031
2010-07-21 20:25:43 +00:00
Dan Gohman
fc3ee085a0 Disallow null as a named metadata operand.
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.

One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).

llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Dan Gohman
b0db34a612 Use TrackingVH instead of WeakVH for NamedMDNode's operands, since nodes
referenced by NamedMDNodes shouldn't be deleted.

llvm-svn: 109021
2010-07-21 18:01:42 +00:00
Dan Gohman
328a6ebeae Tidy.
llvm-svn: 109020
2010-07-21 17:53:53 +00:00
Owen Anderson
f26c7a852f Move the smarts of AnalysisGroup registration into PassRegistry.
llvm-svn: 109019
2010-07-21 17:52:45 +00:00
Dan Gohman
09326457a8 Give MDNode printing has access to the current Module in more
cases. This will be needed when function-local metadata can
appear in places that aren't intrinsic function arguments.

llvm-svn: 108971
2010-07-20 23:55:01 +00:00
Owen Anderson
6265d52037 Move the handling of PassRegistrationListener's to PassRegistry.
llvm-svn: 108966
2010-07-20 23:41:56 +00:00
Dan Gohman
71724e8c7a Rename removeAllMetadata to clearMetadataHashEntries and simplify
it to just do the things that need to be done when an instruction
is deleted.

llvm-svn: 108948
2010-07-20 22:25:04 +00:00
Dan Gohman
b9a28557ea Add support for remapping metadata kind IDs when reading in a
bitcode file, so that two bitcode files where the same metadata kind
name happens to have been assigned a different ID can still be
linked together.

Eliminate the restriction that metadata kind IDs can't be 0.

Change MD_dbg from 1 to 0, because we can now, and because it's
less mysterious that way.

llvm-svn: 108939
2010-07-20 21:42:28 +00:00
Owen Anderson
2aafb91721 Move more functionality from Pass.cpp to PassRegistry.cpp. This global will go away eventually, but for now we still need it around.
llvm-svn: 108932
2010-07-20 21:22:24 +00:00
Dan Gohman
09c8c9c77c 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
6db80f9d90 I just fail with SVN today.
llvm-svn: 108888
2010-07-20 19:23:55 +00:00
Owen Anderson
93cceb71a1 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
e5f3371961 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
5f218b8612 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
cf625d0179 Reapply r108794, a fix for the failing test from last time.
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar
3280e3aebf 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
3502f9a91b 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
522ef60c01 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
7439f193bb 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
e35b95f719 precompute 20 tags
llvm-svn: 108695
2010-07-19 14:48:15 +00:00
Gabor Greif
330a6c1593 fullStopTag cannot happen here, it is handled above
llvm-svn: 108631
2010-07-17 20:52:46 +00:00
Chris Lattner
d2097ce7ab 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
02dc24e49a tidy up
llvm-svn: 108560
2010-07-16 21:20:46 +00:00
Chris Lattner
663dd0eb36 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
4121df768b 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
17c48ecd68 eliminate CallInst::ArgOffset
llvm-svn: 108522
2010-07-16 09:38:02 +00:00
Tobias Grosser
9c86be4570 LoopSimplify does not update domfrontier correctly.
This fixes PR7649.

llvm-svn: 108513
2010-07-16 05:59:45 +00:00
Tobias Grosser
97dc00d1d8 Add dump() to DominanceFrontier
llvm-svn: 108512
2010-07-16 05:59:39 +00:00
Benjamin Kramer
da3e6cdb26 Don't pass StringRef by reference.
llvm-svn: 108366
2010-07-14 22:38:02 +00:00
Dan Gohman
4a92aee9d6 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
e91d5d0c36 Rename WriteConstantInt to WriteConstantInternal, to avoid confusion.
llvm-svn: 108357
2010-07-14 20:57:55 +00:00
Dan Gohman
2ac1d3a2c9 Add support for empty metadata nodes: !{}.
llvm-svn: 108259
2010-07-13 19:33:27 +00:00
Gabor Greif
9772b3e74f 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
5c94fddae4 cache dereferenced iterators
llvm-svn: 108131
2010-07-12 10:36:48 +00:00
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner
59bffe35a1 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
c6f9c11878 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
9abc58b327 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
656c2c8700 fix typo
llvm-svn: 108100
2010-07-11 19:42:53 +00:00
Chris Lattner
20161998c6 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
568037d823 Add fixme.
llvm-svn: 107697
2010-07-06 21:05:17 +00:00
Dan Gohman
c754b1eda1 IndirectBr is not safe to speculatively execute (!)
llvm-svn: 107454
2010-07-02 00:35:34 +00:00
Bill Wendling
90b6422f2f 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
48effae6f6 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
59ef9bcc6d Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling
05a4c0b1f2 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
50741043d0 use ArgOperand API
llvm-svn: 107145
2010-06-29 16:17:26 +00:00
Gabor Greif
3c768ce3f0 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
50fffcaea3 Constant fold x == undef to undef.
llvm-svn: 107074
2010-06-28 21:30:07 +00:00
Dan Gohman
bd121d9b9f 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
6c86715183 use ArgOperand accessors
llvm-svn: 106626
2010-06-23 13:56:57 +00:00
Gabor Greif
992ef6fa9c use ArgOperand accessors
llvm-svn: 106623
2010-06-23 13:09:06 +00:00
Gabor Greif
dedbd07ed6 use helper to neatly access arguments
llvm-svn: 106622
2010-06-23 08:45:32 +00:00
Gabor Greif
3f6b94947f use high-level accessors
llvm-svn: 106573
2010-06-22 20:40:38 +00:00
Gabor Greif
2de1a571e9 warmup ritual: use high-level argument accessors
llvm-svn: 106563
2010-06-22 19:46:37 +00:00
Devang Patel
f50b6147ad Use single interface, using twine, to get named metadata.
getNamedMetadata().

llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Dan Gohman
6a3c46ad49 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
745765d0b8 Move several non-performance-critical member functinos out of line.
llvm-svn: 106444
2010-06-21 18:46:45 +00:00
Bob Wilson
c4a6a42c20 Tidy.
llvm-svn: 106383
2010-06-19 05:33:57 +00:00
Devang Patel
3282324020 Use separate named MDNode to hold each function's local variable info.
This speeds up local variable handling in DwarfDebug.

llvm-svn: 106075
2010-06-16 00:53:55 +00:00
Chris Lattner
72ef28f800 improve verifier error about unterminated block to include
function name, patch by Yuri

llvm-svn: 105887
2010-06-12 15:50:24 +00:00
Bill Wendling
97b6c4a378 Another place where the code wanted to access the argument list and not all of
the operands.

llvm-svn: 105545
2010-06-07 19:18:58 +00:00
Dan Gohman
eea56e5bd8 getFoldedOffsetOf no longer does anything special with vector types.
llvm-svn: 105514
2010-06-05 00:47:34 +00:00
Dan Gohman
85f0f45ea1 Split the logic behind CastInst::isNoopCast into a separate static function,
as is done with most other cast opcode predicates.

llvm-svn: 105008
2010-05-28 21:41:37 +00:00
Dan Gohman
bcee12027f Eliminate the restriction that the array size in an alloca must be i32.
This will help reduce the amount of casting required on 64-bit targets.

llvm-svn: 104911
2010-05-28 01:14:11 +00:00
Dan Gohman
9789093ab7 Add basic error checking to MemoryBuffer::getSTDIN.
llvm-svn: 104855
2010-05-27 17:31:51 +00:00
Anton Korobeynikov
925a32ae37 Add support for thiscall calling convention.
Patch by Charles Davis and Steven Watanabe!

llvm-svn: 103902
2010-05-16 09:08:45 +00:00
Evan Cheng
775549c9e7 Adding a v8i64 512-bit vector type. This will be used to model ARM NEON intrinsics which translate into a pair of vld / vst instructions that can load / store 8 consecutive 64-bit (D) registers.
llvm-svn: 103746
2010-05-13 23:55:47 +00:00
Dan Gohman
1ebf23a692 Revert r103493, materializing functions in the regular PassManager.
It works in simple cases, but it isn't a general solution.

llvm-svn: 103499
2010-05-11 20:30:00 +00:00
Dan Gohman
4c44e690d7 Teach the regular pass manager how to materialize functions as needed.
llvm-svn: 103493
2010-05-11 19:58:43 +00:00
Chris Lattner
622f6de228 simplify more.
llvm-svn: 103431
2010-05-10 20:59:18 +00:00
Chris Lattner
2ab3a7d574 Simplify by using startswith instead of substr.
llvm-svn: 103430
2010-05-10 20:58:42 +00:00
Chris Lattner
e78cc107c4 fix PR7105 by enumerating MDNodes on all @llvm.foo
function calls, not just recognized intrinsics.

llvm-svn: 103428
2010-05-10 20:53:17 +00:00
David Greene
dec8f8b802 Fix PR6875:
This includes a patch by Roman Divacky to fix the initial crash.

Move the actual addition of passes from *PassManager::add to
*PassManager::addImpl.  That way, when adding printer passes we won't
recurse infinitely.

Finally, check to make sure that we are actually adding a FunctionPass
to a FunctionPassManager before doing a print before or after it.
Immutable passes are strange in this way because they aren't
FunctionPasses yet they can be and are added to the FunctionPassManager.

llvm-svn: 103425
2010-05-10 20:24:27 +00:00
Dan Gohman
2644f3ae62 Minimally fix this code to not abort on mdnodes with integer data
wider than 64 bits.

llvm-svn: 103309
2010-05-07 22:15:24 +00:00