Chris Lattner [Tue, 2 Feb 2010 22:36:29 +0000 (22:36 +0000)]
remove the # TAILCALL markers, which was causing the to fail.
It's unclear if the matcher is nondeterminstic of what here,
but I'm getting matches without TAILCALL and some other hosts
are getting matches with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 22:31:11 +0000 (22:31 +0000)]
Remove a bunch of stuff around the edges of the ELF writer.
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95148
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Feb 2010 22:29:26 +0000 (22:29 +0000)]
Reformat my last patch slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95147
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 22:13:21 +0000 (22:13 +0000)]
tidy some targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95146
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Feb 2010 22:10:43 +0000 (22:10 +0000)]
Re-add strcmp and known size object size checking optimization.
Passed bootstrap and nightly test run here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95145
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 22:03:00 +0000 (22:03 +0000)]
remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95144
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Feb 2010 22:00:15 +0000 (22:00 +0000)]
MCAssembler/Darwin: Add a test (on Darwin) that we assemble a bunch of
instructions exactly like 'as', and produce equivalent .o files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95143
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:55:58 +0000 (21:55 +0000)]
detemplatize the ppc code emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95142
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:52:03 +0000 (21:52 +0000)]
remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95141
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:49:29 +0000 (21:49 +0000)]
add a definition for ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95140
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:48:51 +0000 (21:48 +0000)]
detemplatize ARM code emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95138
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Feb 2010 21:44:16 +0000 (21:44 +0000)]
MCAsmParser/X86: Represent absolute memory operands as CodeGen does, with scale
== 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95137
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Feb 2010 21:44:10 +0000 (21:44 +0000)]
MCCodeEmitter/X86: Handle tied registers better when converting MCInst ->
MCMachineInstr. This also fixes handling of tied registers for MRMSrcMem
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95136
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Feb 2010 21:44:01 +0000 (21:44 +0000)]
MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95135
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:38:59 +0000 (21:38 +0000)]
remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95134
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:35:47 +0000 (21:35 +0000)]
detemplatize alpha code emission, it is now JIT specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:31:47 +0000 (21:31 +0000)]
eliminate all the dead addSimpleCodeEmitter implementations.
eliminate random "code emitter" stuff in Alpha, except for
the JIT path. Next up, remove the template cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95131
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Feb 2010 21:29:10 +0000 (21:29 +0000)]
Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Feb 2010 21:11:22 +0000 (21:11 +0000)]
Make DenseSet's erase pass on the return value rather than swallowing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95127
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Feb 2010 21:10:27 +0000 (21:10 +0000)]
Fix function names in comments. Thanks Duncan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 21:06:45 +0000 (21:06 +0000)]
eliminate FileModel::Model, just use CodeGenFileType. The client
of the code generator shouldn't care what object format a target
uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 20:57:28 +0000 (20:57 +0000)]
this apparently depends on the host somehow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95122
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Feb 2010 20:56:02 +0000 (20:56 +0000)]
XFAIL for PPC Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95121
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 20:41:39 +0000 (20:41 +0000)]
disable this test for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95120
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 2 Feb 2010 20:20:30 +0000 (20:20 +0000)]
...and fixed the Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95119
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 2 Feb 2010 20:11:23 +0000 (20:11 +0000)]
Renamed the ed directory to edis, as suggested
yesterday. This eliminates possible confusion
about what exactly in this directory; the name
is still short, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95118
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 19:41:23 +0000 (19:41 +0000)]
remove the remnants of TargetMachOWriterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95114
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 19:38:14 +0000 (19:38 +0000)]
Add a new top-level MachO.h file for manifest constants, fixing
a layering violation from MC -> Target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95113
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 2 Feb 2010 19:31:58 +0000 (19:31 +0000)]
Added t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95112
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 19:23:55 +0000 (19:23 +0000)]
remove PPCMachOWriterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 19:14:27 +0000 (19:14 +0000)]
eliminate all forms of addPassesToEmitMachineCode except
the one used by the JIT. Remove all forms of
addPassesToEmitFileFinish except the one used by the static
code generator. Inline the remaining version of
addPassesToEmitFileFinish into its only caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95109
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 2 Feb 2010 19:05:57 +0000 (19:05 +0000)]
Added another version of the X86 assembler matcher test case.
This test case is different subset of the full auto generated test case, and a
larger subset that is in x86_32-bit.s (that set will encode correctly). These
instructions can pass though llvm-mc as it were a logical cat(1) and then
reassemble to the same instruction. It is useful as we bring up the parser and
matcher so we don't break things that currently work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95107
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 19:03:39 +0000 (19:03 +0000)]
remove dead code, we're requesting TargetMachine::AssemblyFile here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95105
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 2 Feb 2010 18:52:56 +0000 (18:52 +0000)]
Test revert 95050; there's a good chance it's causing
buildbot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 18:44:12 +0000 (18:44 +0000)]
Inline addAssemblyEmitter into its one real caller and delete
the -print-emitted-asm option. The JIT shouldn't have to pull
in the asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95100
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 2 Feb 2010 12:53:04 +0000 (12:53 +0000)]
Adding missing methods for creating Add, Mul, Neg and Sub with NUW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95086
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Feb 2010 07:05:31 +0000 (07:05 +0000)]
Return value on every path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95075
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Feb 2010 06:33:32 +0000 (06:33 +0000)]
simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95074
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Feb 2010 06:22:08 +0000 (06:22 +0000)]
More logic correction: RemoveOverlap should always create new tree. Add a
parameter to record whether changes actually happened.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95073
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Feb 2010 05:23:23 +0000 (05:23 +0000)]
Add a lookup method to the IntervalMap. The difference from the original
lookup is that if the lookup key is contained in the key, we return the data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95070
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 2 Feb 2010 03:47:27 +0000 (03:47 +0000)]
Apparently gdb is not amused by empty lines in pubtypes section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95064
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 2 Feb 2010 03:37:03 +0000 (03:37 +0000)]
NULL terminate name in pubtypes sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 02:43:51 +0000 (02:43 +0000)]
don't turn (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B
for vectors. Codegen is generating awful code or segfaulting
in various cases (e.g. PR6204).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95058
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Feb 2010 02:40:56 +0000 (02:40 +0000)]
Fix a bunch of errors in the old logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 02:26:54 +0000 (02:26 +0000)]
fix a crash in loop unswitch on a loop invariant vector condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95055
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Feb 2010 02:23:37 +0000 (02:23 +0000)]
remove an unreduced testcase, rename another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95054
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Feb 2010 02:22:50 +0000 (02:22 +0000)]
Perform sibcall in some cases when arguments are passes memory. Look for cases
where callee's arguments are already in the caller's own caller's stack and
they line up perfectly. e.g.
extern int foo(int a, int b, int c);
int bar(int a, int b, int c) {
return foo(a, b, c);
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95053
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 2 Feb 2010 02:18:20 +0000 (02:18 +0000)]
Removed an unnecessary class from the EDDisassembler
implementation. Also made sure that the register maps
were created during disassembler initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95051
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 2 Feb 2010 02:08:02 +0000 (02:08 +0000)]
Make local RA smarter about reusing input register of a copy
as output. Needed for (functional) correctness in inline asm,
and should be generally beneficial.
7361612.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95050
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Feb 2010 01:57:01 +0000 (01:57 +0000)]
11.8p1: A nested class is a member and as such has the same access rights as
any other member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95047
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Feb 2010 01:44:02 +0000 (01:44 +0000)]
LangRef.html says that inttoptr and ptrtoint always use zero-extension
when the cast is extending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95046
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Feb 2010 01:41:39 +0000 (01:41 +0000)]
Factor out alignof expression folding into a separate function and
generalize it to handle more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95045
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Feb 2010 01:38:49 +0000 (01:38 +0000)]
Various code simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95044
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Feb 2010 01:12:20 +0000 (01:12 +0000)]
Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95041
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Feb 2010 00:51:45 +0000 (00:51 +0000)]
Don't need to check the last argument since it'll always be bool. We also
don't use TargetData here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95040
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Feb 2010 00:13:06 +0000 (00:13 +0000)]
More indentation/tabification fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95036
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Feb 2010 00:06:55 +0000 (00:06 +0000)]
Untabify previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95035
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 2 Feb 2010 00:04:46 +0000 (00:04 +0000)]
Changed to Chris Lattner's suggested approach, which
merely stubs out the blocks-based disassembly functions
if the library wasn't built with blocks, which allows a
constant .exports file and also properly deals with
situations in which the compiler used to build a client
is different from the compiler used to build the library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95034
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 1 Feb 2010 23:56:58 +0000 (23:56 +0000)]
Kill the Mach-O writer, and temporarily make filetype=obj an error.
The MCStreamer based assemblers will take over for this functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95033
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 1 Feb 2010 23:27:57 +0000 (23:27 +0000)]
Fix for builds with separate source and build
directories (like, oh, say, any multistage build)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95028
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 1 Feb 2010 23:25:03 +0000 (23:25 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95027
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Mon, 1 Feb 2010 23:06:04 +0000 (23:06 +0000)]
MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a
Rn operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95025
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 1 Feb 2010 23:01:38 +0000 (23:01 +0000)]
Updated to use the proper .exports file for the
target platform, depending on whether the target
supports the blocks API or not
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95024
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 1 Feb 2010 22:51:23 +0000 (22:51 +0000)]
Add "dump" method to IVUsersOneStride.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95022
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 1 Feb 2010 22:46:05 +0000 (22:46 +0000)]
Testcase for 94996 (PR 6157)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95021
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Feb 2010 22:40:09 +0000 (22:40 +0000)]
Fix PR6196. GV callee may not be a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95017
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Feb 2010 22:32:42 +0000 (22:32 +0000)]
Add test case for 95013.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95014
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Mon, 1 Feb 2010 22:15:09 +0000 (22:15 +0000)]
Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95012
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 1 Feb 2010 21:57:50 +0000 (21:57 +0000)]
Rollback on including blocks functionality in .exports
because some platforms don't support blocks and then
break because the symbols aren't present
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95011
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 1 Feb 2010 21:17:14 +0000 (21:17 +0000)]
Add an option to GVN to remove all partially redundant loads. This is currently
disabled by default. This divides the existing load PRE code into 2 phases:
first it checks that it is safe to move the load to each of the predecessors
where it is unavailable, and then if it is safe, the code is changed to move
the load. Radar
7571861.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95007
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 1 Feb 2010 20:57:35 +0000 (20:57 +0000)]
Do an early exit when the result is known cheaply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95002
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Feb 2010 20:48:08 +0000 (20:48 +0000)]
eliminate a bunch of pointless LLVMContext arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95001
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 1 Feb 2010 20:42:02 +0000 (20:42 +0000)]
Fix typo "of" -> "or" and change the way a line was formatted to fit
into 80 columns to match my artistic preferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95000
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Feb 2010 20:04:40 +0000 (20:04 +0000)]
fix PR6195, a bug constant folding scalar -> vector compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94997
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 1 Feb 2010 19:54:53 +0000 (19:54 +0000)]
fix PR 6157. Testcase pending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94996
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Feb 2010 19:54:45 +0000 (19:54 +0000)]
cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Feb 2010 19:35:08 +0000 (19:35 +0000)]
fix PR6197 - infinite recursion in ipsccp due to block addresses
evaluateICmpRelation wasn't handling blockaddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94993
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Mon, 1 Feb 2010 19:03:18 +0000 (19:03 +0000)]
Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result
type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can
be used to extended the width of an integer type. This fixes a bug for
Generic/vector-casts.ll on a ppc750.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94990
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 1 Feb 2010 19:00:32 +0000 (19:00 +0000)]
Update this test for a trivial register allocation difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94989
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 1 Feb 2010 18:27:38 +0000 (18:27 +0000)]
Generalize target-independent folding rules for sizeof to handle more
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.
Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.
Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.
And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94987
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Feb 2010 18:11:34 +0000 (18:11 +0000)]
fix rdar://
7590304, a miscompilation of objc apps on arm. The caller
of objc message send was getting marked arm_apcscc, but the prototype
isn't. This is fine at runtime because objcmsgsend is implemented in
assembly. Only turn a mismatched caller and callee into 'unreachable'
if the callee is a definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94986
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Feb 2010 18:04:58 +0000 (18:04 +0000)]
fix rdar://
7590304, an infinite loop in instcombine. In the invoke
case, instcombine can't zap the invoke for fear of changing the CFG.
However, we have to do something to prevent the next iteration of
instcombine from inserting another store -> undef before the invoke
thereby getting into infinite iteration between dead store elim and
store insertion.
Just zap the callee to null, which will prevent the next iteration
from doing anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94985
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 1 Feb 2010 17:41:44 +0000 (17:41 +0000)]
Fix pr6198 by moving the isSized() check to an outer conditional.
The testcase from pr6198 does not crash for me -- I don't know what's up with
that -- so I'm not adding it to the tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94984
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 1 Feb 2010 16:38:14 +0000 (16:38 +0000)]
Add a getNUWMul function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94982
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 1 Feb 2010 16:37:38 +0000 (16:37 +0000)]
Add a generalized form of ConstantExpr::getOffsetOf which works for
array types as well as struct types, and which accepts arbitrary
Constant indicies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94981
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 1 Feb 2010 12:16:39 +0000 (12:16 +0000)]
MulOp is actually a Mips specific node, so do the match using Opcode. This fixes PR6192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94977
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Feb 2010 10:43:31 +0000 (10:43 +0000)]
Add an immutable interval map, prepared to be used by flat memory model
in the analyzer. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94976
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 1 Feb 2010 09:02:24 +0000 (09:02 +0000)]
Whoops, left some debugging code in that broke
a buildbot. Removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94975
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 1 Feb 2010 08:49:35 +0000 (08:49 +0000)]
Added the enhanced disassembly library's implementation and
fleshed out the .exports file. I still have to fix several
details of operand parsing, but the basic functionality is
there and usable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94974
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Feb 2010 07:32:52 +0000 (07:32 +0000)]
Simplify code. We can compare TNew with T in one batch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94973
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 1 Feb 2010 02:13:39 +0000 (02:13 +0000)]
Undo r94946 now all the tests are passing again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94970
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 1 Feb 2010 02:03:24 +0000 (02:03 +0000)]
Fix stack size bug while using o32 abi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94969
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Sun, 31 Jan 2010 11:22:28 +0000 (11:22 +0000)]
For MVNr and MVNs, we need to set Inst{25} = 0 so as not to confuse the decoder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94955
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 31 Jan 2010 07:28:44 +0000 (07:28 +0000)]
Change TAILJMP's to be varargs and transfer implicit uses over from TCRETURN's. Otherwise the missing uses can make post-regalloc scheduling do bad things. This fixes 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94950
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 31 Jan 2010 07:27:31 +0000 (07:27 +0000)]
Fix a missing check from my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94949
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 31 Jan 2010 06:44:49 +0000 (06:44 +0000)]
Avoid recursive sibcall's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94946
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 31 Jan 2010 04:55:32 +0000 (04:55 +0000)]
Remove a completed item, add a couple new ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94945
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 31 Jan 2010 04:40:45 +0000 (04:40 +0000)]
Remove test which is no longer relevant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94944
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 31 Jan 2010 04:29:12 +0000 (04:29 +0000)]
Simplify/generalize the xor+add->sign-extend instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94943
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 31 Jan 2010 02:30:23 +0000 (02:30 +0000)]
Add a small transform: transform -(X<<Y) to (-X<<Y) when the shift has a single
use and X is free to negate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94941
91177308-0d34-0410-b5e6-
96231b3b80d8