Commit Graph

43800 Commits

Author SHA1 Message Date
Dale Johannesen e695ab227c Fix for PR 2323, infinite loop in tail dup.
llvm-svn: 51063
2008-05-13 20:06:43 +00:00
Chris Lattner 03ce206143 add a note
llvm-svn: 51062
2008-05-13 19:56:20 +00:00
Evan Cheng f8ab712fa9 - Fix the pasto in the fix for a previous pasto.
- Incorporate Chris' comment suggestion.

llvm-svn: 51061
2008-05-13 18:59:59 +00:00
Chris Lattner d17f58ae6e add a note
llvm-svn: 51060
2008-05-13 18:48:54 +00:00
Dan Gohman 35a835cb60 s/indicies/indices/ and clarify the extractvalue and insertvalue are
working with struct field or array element values. Thanks Duncan!

llvm-svn: 51059
2008-05-13 18:16:06 +00:00
Nate Begeman 6645714f16 Fix one more encoding bug.
llvm-svn: 51057
2008-05-13 17:52:09 +00:00
Sanjiv Gupta f6387983e8 Added configure switches for PIC16 backend.
llvm-svn: 51056
2008-05-13 17:37:32 +00:00
Ted Kremenek 52387a1828 Re-enable the analyzer.
llvm-svn: 51055
2008-05-13 17:10:28 +00:00
Evan Cheng 595e226085 - Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
- Correct a pasto.

llvm-svn: 51054
2008-05-13 16:45:56 +00:00
Anton Korobeynikov 5c48bae209 Add thin layer over StringMap to form StringSet. By Mikhail Glushenkov.
llvm-svn: 51048
2008-05-13 15:03:16 +00:00
Eli Friedman 1a5754a26a Detabify.
llvm-svn: 51042
2008-05-13 14:40:48 +00:00
Owen Anderson 8c2391d00d Make the non-local CSE safety checks slightly more thorough.
llvm-svn: 51035
2008-05-13 13:41:23 +00:00
Sanjiv Gupta 4394c2376c 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))

llvm-svn: 51027
2008-05-13 09:02:57 +00:00
Evan Cheng 1120279ae6 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

llvm-svn: 51026
2008-05-13 08:35:03 +00:00
Owen Anderson 525aa89356 Add a testcase for non-local CSE of read-only calls.
llvm-svn: 51025
2008-05-13 08:17:44 +00:00
Owen Anderson 69057b80c7 Add support for non-local CSE of read-only calls.
llvm-svn: 51024
2008-05-13 08:17:22 +00:00
Gabor Greif 0d42adf65b Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
llvm-svn: 51023
2008-05-13 07:09:08 +00:00
Dan Gohman 0479aa5c0b 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.

llvm-svn: 51022
2008-05-13 02:05:11 +00:00
Nate Begeman 53c5c62d6d 80 col / tabs fixes
llvm-svn: 51021
2008-05-13 01:48:26 +00:00
Nate Begeman 50f7ef30bb Fix and encoding error in the psrad xmm, imm8 instruction.
llvm-svn: 51020
2008-05-13 01:47:52 +00:00
Evan Cheng 3f40c69083 On x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext load to i16.
llvm-svn: 51019
2008-05-13 00:54:02 +00:00
Dan Gohman d78c400b5b 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.

llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Ted Kremenek 80ff5f0696 Place "-x" option before other analyzer options.
llvm-svn: 51014
2008-05-12 23:56:50 +00:00
Dan Gohman b9d6660998 Initial documentation for first-class aggregates changes.
llvm-svn: 51013
2008-05-12 23:51:09 +00:00
Ted Kremenek ece302d75b Directly invoke gcc immediately instead of before we process the command line arguments.
llvm-svn: 51012
2008-05-12 23:47:41 +00:00
Dan Gohman 43ba067132 Fix a malformed %gt;
llvm-svn: 51011
2008-05-12 23:38:42 +00:00
Nate Begeman b87e63a730 Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns.  Custom lowering for unsupported ones is next.

llvm-svn: 51009
2008-05-12 23:09:43 +00:00
Evan Cheng b980f6fb3d Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.
llvm-svn: 51008
2008-05-12 23:04:07 +00:00
Dale Johannesen e6942c31ea New test for tail merging
llvm-svn: 51007
2008-05-12 22:59:44 +00:00
Dale Johannesen 9d29283fc7 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.

llvm-svn: 51006
2008-05-12 22:53:12 +00:00
Steve Naroff a98fe19c7e Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors when parsing AppKit that gcc does not.
Teach Sema::MergeVarDecl() about __private_extern__.

llvm-svn: 51005
2008-05-12 22:36:43 +00:00
Bill Wendling 6b8bd513d4 Constify isSourceDefinedByImplicitDef function. Otherwise, just formatting
changes that don't change functionality.

llvm-svn: 51004
2008-05-12 22:15:05 +00:00
Ted Kremenek f5a94e7114 Added internal command logging.
llvm-svn: 51003
2008-05-12 22:07:14 +00:00
Steve Naroff bf1516c618 Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats
llvm-svn: 51002
2008-05-12 21:44:38 +00:00
Bill Wendling 1e11768a4f Constify the machine instruction passed into the
"is{Trivially,Really}ReMaterializable" methods.

llvm-svn: 51001
2008-05-12 20:54:26 +00:00
Nate Begeman d875c3e2fd Initial X86 codegen support for VSETCC.
llvm-svn: 51000
2008-05-12 20:34:32 +00:00
Dale Johannesen c4c4d8e1f7 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.

llvm-svn: 50999
2008-05-12 20:33:57 +00:00
Nate Begeman 68586bddb1 Simplify some checks
llvm-svn: 50998
2008-05-12 20:33:52 +00:00
Dan Gohman 0863b19ae6 Fix a copy+paste bug; pseudo-instructions shouldn't have
encoding information.

llvm-svn: 50997
2008-05-12 20:22:45 +00:00
Nate Begeman 17c5434a16 Pointer comparisons should use icmp, not vicmp
llvm-svn: 50996
2008-05-12 20:16:55 +00:00
Owen Anderson f792860255 Go back to passing the analyses around as parameters.
llvm-svn: 50995
2008-05-12 20:15:55 +00:00
Nate Begeman 66d0a0e8f4 Pointer comparisons should be handled by icmp, not vicmp :)
llvm-svn: 50994
2008-05-12 20:11:05 +00:00
Evan Cheng 5f52142ee0 Forgot this.
llvm-svn: 50993
2008-05-12 20:08:05 +00:00
Nate Begeman 1196287522 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

llvm-svn: 50992
2008-05-12 20:01:56 +00:00
Evan Cheng 2609d5e779 Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use of it.
llvm-svn: 50991
2008-05-12 19:56:52 +00:00
Bill Wendling 2930845065 Revert the previous commit. Go ahead and hoist rematerializable instructions.
llvm-svn: 50990
2008-05-12 19:47:18 +00:00
Nate Begeman cfcb56091b Add support for vicmp/vfcmp codegen, more legalize support coming.
This is necessary to unbreak the build.

llvm-svn: 50988
2008-05-12 19:40:03 +00:00
Bill Wendling 70613b84da 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.

llvm-svn: 50987
2008-05-12 19:38:32 +00:00
Nate Begeman ac7f3d99dd Fix build breakage
llvm-svn: 50986
2008-05-12 19:23:22 +00:00
Nate Begeman d21957002a Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
for details.  CodeGen support coming in a follow up patch

llvm-svn: 50985
2008-05-12 19:01:56 +00:00