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

577 Commits

Author SHA1 Message Date
Che-Liang Chiou
0eaf890a31 Add ret instruction to PTX backend
llvm-svn: 114788
2010-09-25 07:46:17 +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
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
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
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
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
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
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
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
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
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
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +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
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
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
992ef6fa9c use ArgOperand accessors
llvm-svn: 106623
2010-06-23 13:09:06 +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
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
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
Eric Christopher
e78496e5f1 Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.

llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Gabor Greif
e7d6812008 reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

llvm-svn: 101465
2010-04-16 15:33:14 +00:00
Gabor Greif
cd116e8c6a back out r101423 and r101397, they break llvm-gcc self-host on darwin10
llvm-svn: 101434
2010-04-16 01:16:20 +00:00
Gabor Greif
2e18d34d80 reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

llvm-svn: 101397
2010-04-15 20:51:13 +00:00
Gabor Greif
6022150477 back out r101364, as it trips the linux nightlybot on some clang C++ tests
llvm-svn: 101368
2010-04-15 12:46:56 +00:00
Gabor Greif
428ca23bbd rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary

llvm-svn: 101364
2010-04-15 10:49:53 +00:00
Dan Gohman
5bf62639ed Print empty structs as {} rather than { }.
llvm-svn: 100787
2010-04-08 18:03:05 +00:00
Gabor Greif
c637593cda rename pred_const_iterator to const_pred_iterator for consistency's sake
llvm-svn: 99567
2010-03-25 23:25:28 +00:00
Gabor Greif
624a31f2eb Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.

Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.

llvm-svn: 99399
2010-03-24 13:21:49 +00:00
Gabor Greif
ef64581628 backing out r99170 because it still fails on clang-x86_64-darwin10-fnt
llvm-svn: 99171
2010-03-22 09:11:00 +00:00
Gabor Greif
04f7f381ae Now that hopefully all direct accesses to InvokeInst operands are fixed
we can reapply the InvokeInst operand reordering patch. (see r98957).

llvm-svn: 99170
2010-03-22 08:28:00 +00:00
Gabor Greif
0bfed2dc4e back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite
llvm-svn: 98958
2010-03-19 13:50:02 +00:00
Gabor Greif
953702b8e6 Recommit r80858 again (which has been backed out in r80871).
This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.

Maybe the valgrind bots give me a hint of what may be wrong
(it at all).

llvm-svn: 98957
2010-03-19 11:55:53 +00:00
Chris Lattner
b51960824f add asmprinter suport for unions, fixing Feature/unions.ll to actually
be doing something useful.

llvm-svn: 98677
2010-03-16 21:21:35 +00:00
Erick Tryzelaar
24ec58b50b Fix looking up MD names to not need a module.
llvm-svn: 97550
2010-03-02 05:32:52 +00:00
Nick Lewycky
c443274bc1 Dump the presence of attached metadata even if we don't know what it is. This
format is not parsable, even if the module is legal. To get parsable output,
dump the module instead of the function or smaller, since metadata kind are
attached to the module (not the context).

llvm-svn: 97124
2010-02-25 06:53:04 +00:00
Duncan Sands
e9a13a3c60 Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned.

llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
1b33dd3c83 There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.

llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Duncan Sands
2acaf3609c Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!

llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Chris Lattner
2265d6280b Add support for a union type in LLVM IR. Patch by Talin!
llvm-svn: 96011
2010-02-12 20:49:41 +00:00
Dan Gohman
296f6e4952 Minor whitespace cleanups.
llvm-svn: 95801
2010-02-10 20:42:57 +00:00
Dan Gohman
f2323826d2 Add a hook to AssemblyAnnotationWriter to allow custom info comments
to be printed, in place of the familiar "uses=" comments.

llvm-svn: 95798
2010-02-10 20:41:46 +00:00
Dan Gohman
c5a2b73589 Print a comment next to "materializable" global values, to distinguish
them from values that are not actually defined in the module.

llvm-svn: 94854
2010-01-29 23:12:36 +00:00