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

3378 Commits

Author SHA1 Message Date
Nick Lewycky
711ead8deb Add verification of union types.
llvm-svn: 97889
2010-03-06 20:26:48 +00:00
Jeffrey Yasskin
ec7d47ec83 Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.
llvm-svn: 97792
2010-03-05 06:43:49 +00:00
Jeffrey Yasskin
a526081ebf Free MDNodes when the LLVMContext is destroyed. Leak found by Valgrind.
llvm-svn: 97788
2010-03-05 05:47:09 +00:00
Jeffrey Yasskin
5bdd4796e4 Stop leaking MDStrings.
llvm-svn: 97763
2010-03-04 23:24:19 +00:00
Erick Tryzelaar
4e7593750d Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.
We need this so can not bake DESTDIR into the O'Caml symlinks.

llvm-svn: 97743
2010-03-04 20:56:19 +00:00
Nick Lewycky
58ab63e179 Make the 'icmp pred trunc(ext(X)), CST --> icmp pred X, ext(trunc(CST))'
transformation much more careful. Truncating binary '01' to '1' sounds like it's
safe until you realize that it switched from positive to negative under a signed
interpretation, and that depends on the icmp predicate.

Also a few miscellaneous cleanups.

llvm-svn: 97721
2010-03-04 06:54:10 +00:00
Chris Lattner
9e230fb6b2 fix incorrect folding of icmp with undef, PR6481.
llvm-svn: 97659
2010-03-03 19:46:03 +00:00
Erick Tryzelaar
66bf49241f Add Module functions in place of module providers.
llvm-svn: 97608
2010-03-02 23:58:54 +00:00
Erick Tryzelaar
0d0b778d8b Rename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c.
llvm-svn: 97585
2010-03-02 20:32:28 +00:00
Duncan Sands
5a60a368dd Rather than passing "false" for InsertBefore, AddressSpace for ThreadLocal,
and nothing for AddressSpace, pass 0 for InsertBefore, "false" for ThreadLocal
and AddressSpace for AddressSpace.  Spotted by gcc-4.5.

llvm-svn: 97563
2010-03-02 11:18:43 +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
Dan Gohman
4fc1d1236f Don't print "Modified" for passes which haven't modified anything.
llvm-svn: 97446
2010-03-01 17:34:28 +00:00
Erick Tryzelaar
c6e78e3503 Add support for global variables in an address space for llvm-c and ocaml.
llvm-svn: 97377
2010-02-28 09:46:13 +00:00
Erick Tryzelaar
08d9f8e8fe Add indirect br support to llvm-c and ocaml.
llvm-svn: 97376
2010-02-28 09:46:06 +00:00
Erick Tryzelaar
9401ea01cc Add metadata functions to llvm-c and ocaml.
llvm-svn: 97375
2010-02-28 09:45:59 +00:00
Erick Tryzelaar
f7bbb83b17 Add the new builder arthmetic instructions to llvm-c and ocaml.
llvm-svn: 97372
2010-02-28 05:51:43 +00:00
Erick Tryzelaar
9c6bd15491 Add the new union arthmetic instructions to llvm-c and ocaml.
llvm-svn: 97371
2010-02-28 05:51:33 +00:00
Erick Tryzelaar
b405437c48 Add generic binary op and cast builder functions.
llvm-svn: 97370
2010-02-28 05:51:27 +00:00
Dale Johannesen
53dbd67b19 Add type printing for Metadata pseudo.
llvm-svn: 97251
2010-02-26 19:38:59 +00:00
Dan Gohman
a15e497d94 Teach the constant folder about union types.
llvm-svn: 97142
2010-02-25 16:45:19 +00:00
Dan Gohman
f42f098d1d Remove code which assumes it knows how vectors are stored in memory.
llvm-svn: 97141
2010-02-25 16:05:33 +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
Dan Gohman
97481fb5e0 Canonicalize ConstantInts to the right operand of commutative
operators.

The test difference is just due to the multiplication operands
being commuted (and thus requiring a more elaborate match). In
optimized code, that expression would be folded.

llvm-svn: 96816
2010-02-22 22:43:23 +00:00
Dan Gohman
0a0f1d2ee2 Use Instruction::isCommutative instead of duplicating it.
llvm-svn: 96807
2010-02-22 22:05:18 +00:00
Talin
cd8428c41f replaceUsesOfWithOnConstant implementation for unions.
llvm-svn: 96616
2010-02-18 21:43:45 +00:00
Devang Patel
5c67cb332e Destroy MDNodes gracefully while deleting llvm context.
llvm-svn: 96609
2010-02-18 20:53:16 +00:00
Kenneth Uildriks
13195c9525 Function attributes have index ~0, not 0
llvm-svn: 96370
2010-02-16 19:28:02 +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
Nick Lewycky
b38ae458a4 Teach the verifier to check the condition on a branch and ensure that it has
'i1' type.

llvm-svn: 96282
2010-02-15 22:09:09 +00:00
Nick Lewycky
a21f060918 Fix crash in VerifyType when checking Contexts. Because there may not be a
Module (we were called with verifyFunction and an unowned Function) we can't
rely on Mod->getContext().

llvm-svn: 96275
2010-02-15 21:52:04 +00:00
Nick Lewycky
1dcde6b319 Don't try to materialize a function that isn't materializable anyways. This
fixes a crash using FPM on a Function that isn't owned by a Module.

llvm-svn: 96273
2010-02-15 21:27:56 +00:00
Nick Lewycky
1357e1c99a A function with no Module owner isn't materializable. This fixes F->dump() for
functions not embedded within modules.

llvm-svn: 96272
2010-02-15 21:27:20 +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
Jeffrey Yasskin
963eee9ee1 Make PassRegistrar thread-safe since it can be modified by code running in
separate LLVMContexts.

llvm-svn: 96051
2010-02-13 00:03:17 +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
Charles Davis
d69c12ecc6 Add a new function attribute, 'alignstack'. It will indicate (when the backends
implement support for it) that the stack should be forcibly realigned in the
prologue (and the process reversed in the epilogue).

llvm-svn: 95945
2010-02-12 00:31:15 +00:00
Devang Patel
c83d8c3ccf revert 95903.
llvm-svn: 95918
2010-02-11 20:58:56 +00:00
Devang Patel
b41ff23af9 Destroy MDNodes while destructing llvm context.
llvm-svn: 95903
2010-02-11 19:35:10 +00:00
Jeffrey Yasskin
ad23983452 Fix some of the memcheck errors found in the JIT unittests.
llvm-svn: 95856
2010-02-11 06:41:30 +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
efb42fa7c7 Fix several comments which had previously been "the the" where a
different word was intended.

llvm-svn: 95795
2010-02-10 20:04:19 +00:00
Dan Gohman
92b6122204 Fix "the the" and similar typos.
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Dan Gohman
ff8027e33a Canonicalize sizeof and alignof on pointer types to a canonical
pointer type.

llvm-svn: 95769
2010-02-10 06:13:07 +00:00
Kenneth Uildriks
d9026b3fa4 IntegerValType holds a uint32_t, so its constructor should take a uint32_t. This allows it to be properly initialized with bit widths > 65535
llvm-svn: 95731
2010-02-10 00:14:03 +00:00
Nick Lewycky
866c48ae12 Make the destructor for TypeMapBase protected. Spotted by Duncan Sands with
cppcheck!

llvm-svn: 95527
2010-02-07 21:13:46 +00:00
Jakob Stoklund Olesen
83ebc265b3 Reintroduce the InlineHint function attribute.
This time it's for real! I am going to hook this up in the frontends as well.

The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.

We need some experiments to determine if that is the right thing to do.

llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Duncan Sands
364e9510fb Adding missing methods for creating Add, Mul, Neg and Sub with NUW.
llvm-svn: 95086
2010-02-02 12:53:04 +00:00
Dan Gohman
dd6702be8f Factor out alignof expression folding into a separate function and
generalize it to handle more cases.

llvm-svn: 95045
2010-02-02 01:41:39 +00:00