Commit Graph

38895 Commits

Author SHA1 Message Date
Owen Anderson
ff5a535378 Fix memdep's handling of invokes when finding the dependency of another call
instruction.  This fixes some Ada miscompiles reported in PR2324.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51069 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 21:25:37 +00:00
Chris Lattner
9b43ac042e Update the Win32 project files, patch by Razvan Aciu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51067 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 20:56:51 +00:00
Dale Johannesen
72997fedab Fix for PR 2323, infinite loop in tail dup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51063 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 20:06:43 +00:00
Chris Lattner
3b34e1e9e8 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51062 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 19:56:20 +00:00
Evan Cheng
b656443366 - Fix the pasto in the fix for a previous pasto.
- Incorporate Chris' comment suggestion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51061 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 18:59:59 +00:00
Chris Lattner
7171c836a9 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51060 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 18:48:54 +00:00
Dan Gohman
c3dac5cbfe s/indicies/indices/ and clarify the extractvalue and insertvalue are
working with struct field or array element values. Thanks Duncan!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51059 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 18:16:06 +00:00
Nate Begeman
32097bdbf6 Fix one more encoding bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51057 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 17:52:09 +00:00
Sanjiv Gupta
0234f51ff9 Added configure switches for PIC16 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51056 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 17:37:32 +00:00
Evan Cheng
11b6793ede - Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
- Correct a pasto.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51054 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 16:45:56 +00:00
Anton Korobeynikov
e269f434b1 Add thin layer over StringMap to form StringSet. By Mikhail Glushenkov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 15:03:16 +00:00
Owen Anderson
16db1f70b7 Make the non-local CSE safety checks slightly more thorough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 13:41:23 +00:00
Sanjiv Gupta
0e68771536 Adding files for Microchip's PIC16 target.
A brief description about PIC16:
===============================
PIC16 is an 8-bit microcontroller with only one 8-bit register which is the 
accumulator. All arithmetic/load/store operations are 8-bit only.
The architecture has two address spaces: program and data. The program memory 
is divided into 2K pages and the data memory is divided into banks of 128 byte, with only 80 usable bytes, resulting in an non-contiguous data memory. 

It supports direct data memory access (by specifying the address as part of the instruction) and indirect data and program memory access (in an unorthodox fashion which utilize a 16 bit pointer register). 

Two classes of registers exist: (8-bit class which is only one
accumulator) (16-bit class, which contains one or more 16 bit
pointer(s))



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 09:02:57 +00:00
Evan Cheng
77f0b7a50a Instead of a vector load, shuffle and then extract an element. Load the element from address with an offset.
pshufd $1, (%rdi), %xmm0
        movd %xmm0, %eax
=>
        movl 4(%rdi), %eax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51026 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 08:35:03 +00:00
Owen Anderson
6513c1bf90 Add a testcase for non-local CSE of read-only calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 08:17:44 +00:00
Owen Anderson
3b3f58cb77 Add support for non-local CSE of read-only calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51024 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 08:17:22 +00:00
Gabor Greif
d6a2218586 Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 07:09:08 +00:00
Dan Gohman
6ddba2b933 Change class' public PassInfo variables to by initialized with the
address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.

Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51022 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 02:05:11 +00:00
Nate Begeman
a72acf9389 80 col / tabs fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 01:48:26 +00:00
Nate Begeman
c9bdb00683 Fix and encoding error in the psrad xmm, imm8 instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51020 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 01:47:52 +00:00
Evan Cheng
fa7fd33a26 On x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext load to i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51019 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 00:54:02 +00:00
Dan Gohman
844731a7f1 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 00:00:25 +00:00
Dan Gohman
a334d5f535 Initial documentation for first-class aggregates changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51013 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 23:51:09 +00:00
Dan Gohman
f3480b94b4 Fix a malformed %gt;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 23:38:42 +00:00
Nate Begeman
0d1704b955 Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns.  Custom lowering for unsupported ones is next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 23:09:43 +00:00
Evan Cheng
9bfa03c6fd Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 23:04:07 +00:00
Dale Johannesen
38eb9f9ae6 New test for tail merging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 22:59:44 +00:00
Dale Johannesen
30562b7d44 Be more aggressive about tail-merging small blocks
if those blocks consist entirely of common instructions;
merging will not add an extra branch in this case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 22:53:12 +00:00
Bill Wendling
ae94dda61a Constify isSourceDefinedByImplicitDef function. Otherwise, just formatting
changes that don't change functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51004 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 22:15:05 +00:00
Bill Wendling
9f8fea3531 Constify the machine instruction passed into the
"is{Trivially,Really}ReMaterializable" methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:54:26 +00:00
Nate Begeman
c2616e43fd Initial X86 codegen support for VSETCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:34:32 +00:00
Dale Johannesen
51b2b9e29e Further rework of tail merge algorithm. Not quite
semantically identical, but little difference in
either results or execution speed; but it's much
easier to read, at least IMO.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:33:57 +00:00
Nate Begeman
baa64ebd26 Simplify some checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:33:52 +00:00
Dan Gohman
9499b7186b Fix a copy+paste bug; pseudo-instructions shouldn't have
encoding information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:22:45 +00:00
Nate Begeman
51d2ed179b Pointer comparisons should use icmp, not vicmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:16:55 +00:00
Owen Anderson
a472c4a280 Go back to passing the analyses around as parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:15:55 +00:00
Nate Begeman
c83ad0d8e7 Pointer comparisons should be handled by icmp, not vicmp :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:11:05 +00:00
Evan Cheng
f86f211ec2 Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50993 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:08:05 +00:00
Nate Begeman
18e4e8500f Hard code CmpInst back to i1 for now while I go track down what in the bitcode reader/writer is assuming i1
This was breaking a bunch of tests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50992 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 20:01:56 +00:00
Evan Cheng
ad4196b44a Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50991 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 19:56:52 +00:00
Bill Wendling
c1b7f52fbe Revert the previous commit. Go ahead and hoist rematerializable instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50990 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 19:47:18 +00:00
Nate Begeman
b43e9c1965 Add support for vicmp/vfcmp codegen, more legalize support coming.
This is necessary to unbreak the build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 19:40:03 +00:00
Bill Wendling
e4fc1ccd4d One real change - don't hoist something that's trivially rematerializable. It's
possible for it to produce worse code than before.

The rest of this patch is code cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50987 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 19:38:32 +00:00
Nate Begeman
6fd90ce2ee Fix build breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 19:23:22 +00:00
Nate Begeman
ac80ade158 Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
for details.  CodeGen support coming in a follow up patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50985 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 19:01:56 +00:00
Dan Gohman
7c2e4f2fc5 Make firstEightPowers const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50975 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:38:14 +00:00
Dan Gohman
9b38d7db6d Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50974 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:34:30 +00:00
Mikhail Glushenkov
5c98d824f6 Filter option names to escape symbols not allowed as C++ identifiers.
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov
ecb977e64f Make it possible to choose between different compilation graph definitions at compile-time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:32:24 +00:00
Mikhail Glushenkov
a673037097 Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-12 16:31:42 +00:00