Commit Graph

34773 Commits

Author SHA1 Message Date
Chris Lattner 79c57590a3 remember the initializer for a variable in the AST and teach the
pretty printer to print it.

llvm-svn: 39770
2007-07-12 00:36:32 +00:00
Owen Anderson 1e1bace52b Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
llvm-svn: 39769
2007-07-12 00:06:21 +00:00
Devang Patel 52c2dd4699 New test.
llvm-svn: 39768
2007-07-11 23:54:25 +00:00
Devang Patel fac4d1f014 Preserve analysis info.
llvm-svn: 39767
2007-07-11 23:47:28 +00:00
David Greene b2e2be4b6d Get rid of annoying spaces.
llvm-svn: 39766
2007-07-11 23:44:08 +00:00
Chris Lattner dcca487cfa implement codegen support for pre/post inc/dec.
llvm-svn: 39765
2007-07-11 23:43:46 +00:00
Bruno Cardoso Lopes bcda5e20c9 Added support for Mips specific GAS directives
Fixed print immediate 
Fixed Identation on MipsISelDAGToDAG.cpp

llvm-svn: 39764
2007-07-11 23:24:41 +00:00
Bruno Cardoso Lopes 6c8c748e4d Added support for framepointer
Prologue/Epilogue support fp,ra save/restore and use the stack frame the right
way!

llvm-svn: 39763
2007-07-11 23:21:31 +00:00
Owen Anderson aa07172340 Handle the case where an entire structure is freed, and its dependency is a store to a field within
that structure.

Also, refactor the runOnBasicBlock() function, splitting some of the special cases into separate functions.

llvm-svn: 39762
2007-07-11 23:19:17 +00:00
Bruno Cardoso Lopes 77dbdcabf2 Now that stack is represented the right way, LOA starts at 0
llvm-svn: 39761
2007-07-11 23:17:41 +00:00
Bruno Cardoso Lopes 4449e5dd7f Fixed AddLiveOut issues
FI's created the write way to represent Mips stack

llvm-svn: 39760
2007-07-11 23:16:16 +00:00
Bruno Cardoso Lopes c5affeccbd Removed unused immediate PatLeaf, fixed lui instruction
llvm-svn: 39759
2007-07-11 22:47:02 +00:00
Bruno Cardoso Lopes 753e37027f Added MipsMachineFunction class, to hold Mips dinamic stack info when inserting Prologue/Epilog
llvm-svn: 39758
2007-07-11 22:44:21 +00:00
Chris Lattner e399420b51 Fix a release build of clang.
llvm-svn: 39756
2007-07-11 21:50:45 +00:00
Owen Anderson 1441470be8 Add support for eliminate stores to stack-allocated memory locations at the end
of a function.

llvm-svn: 39754
2007-07-11 21:06:56 +00:00
Owen Anderson e720144837 Handle eliminating stores that occur right before a free.
llvm-svn: 39753
2007-07-11 20:38:34 +00:00
Lauro Ramos Venancio 3d70855dd2 Handle packed structs in the CBackend.
llvm-svn: 39752
2007-07-11 19:56:53 +00:00
Anton Korobeynikov d9625399fb Emit correct linkage. Patch by Roman Samoilov.
llvm-svn: 39751
2007-07-11 19:51:06 +00:00
Evan Cheng ade8183fe8 Add test case for PR1545.
llvm-svn: 39749
2007-07-11 19:29:05 +00:00
Evan Cheng 6b6d1f685f Missed a couple of places where new instructions are added due to spill / restore.
llvm-svn: 39748
2007-07-11 19:17:18 +00:00
Owen Anderson bf971aafb6 Clean up a few things based on Chris' feedback.
llvm-svn: 39747
2007-07-11 19:03:09 +00:00
Chris Lattner 49ec4b6eba update this.
llvm-svn: 39746
2007-07-11 18:58:19 +00:00
Tanya Lattner ccecbcd779 Adding ability to demote phi to stack.
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Dale Johannesen e59411d056 Fix hang compiling TimberWolf (allow for islands
of size other than 4).

llvm-svn: 39743
2007-07-11 18:32:38 +00:00
Chris Lattner 28404cf449 Test commit
llvm-svn: 39738
2007-07-11 17:31:59 +00:00
Lauro Ramos Venancio 09d73c0305 Assert when TLS is not implemented.
llvm-svn: 39737
2007-07-11 17:19:51 +00:00
Duncan Sands 03b274911f Exception handling has been implemented.
llvm-svn: 39732
2007-07-11 16:59:20 +00:00
Chris Lattner 63e92754d0 Convert .cvsignore files
llvm-svn: 39731
2007-07-11 06:43:45 +00:00
Steve Naroff 68b52f6df7 Bug #:
Submitted by:
Reviewed by:
Remove reference to Attr.h...

llvm-svn: 39730
2007-07-11 00:45:07 +00:00
Steve Naroff b207d6bed7 Bug #:
Submitted by:
Reviewed by:
Removed Attr.[h,cpp]...they didn't have any useful content.

When more (GCC) attributes are added, we might want to create a file
of this ilk. For now, it's better to remove them (to eliminate any confusion).

I also update the Xcode project file...

llvm-svn: 39729
2007-07-11 00:42:37 +00:00
Steve Naroff e728ba3504 Bug #:
Submitted by:
Reviewed by:
Two vector fixes:

- Sema::CheckAssignmentConstraints() needs to compare the canonical type.
- Expr::isLvalue() needs to disallow subscripting into a vector returned by a function. This
follows the rules for struct returns (in C, at least...C++ is another story:-)

Here is an example...

float4 float4_return()
{
    float4 xx;

    return xx;
}
void add_float4_void_return(float4 *a, float4 *b, float4 *result)
{
    float f;
    float4_return()[1] = f; // now illegal
}

llvm-svn: 39728
2007-07-10 22:20:04 +00:00
Chris Lattner c14236b8ae implement codegen support for the "default argument promotions" (C99 6.5.2.2p6).
Not having this prevented promoting float arguments to double when passed
into printf, for example.

llvm-svn: 39727
2007-07-10 22:18:37 +00:00
Chris Lattner 11eef2eb9c remove obsolete comment.
llvm-svn: 39726
2007-07-10 22:18:03 +00:00
Chris Lattner a779b3df28 implement codegen support for rvalue-only vector subscripts, such as:
float4 test(void);
float test2() {
  return test()[1];
}

llvm-svn: 39725
2007-07-10 21:58:36 +00:00
Chris Lattner 08c4b9ffec Add support for codegen'ing vector subscripts, at least when they are lvalues.
llvm-svn: 39724
2007-07-10 21:17:59 +00:00
Steve Naroff b29cdd543f Bug #:
Submitted by:
Reviewed by:
Support the following...

1. Type checking and codegen support for V[i] on vectors. Hacked
Sema::ParseArraySubscriptExpr().

2. Unary bitwise complement ("~") on vectors. Hacked Sema::ParseUnaryOp().

llvm-svn: 39723
2007-07-10 18:23:31 +00:00
Chris Lattner 436806ad05 In code like this:
typedef float float4 __attribute__((vector_size (16)));
void addFloat4(float4 a, float4 b) {
    float4 temp;
}

make sure to add 'temp' to the stmt tree as a declstmt.

llvm-svn: 39722
2007-07-10 05:03:31 +00:00
Chris Lattner 50d4abd24c Add support for vector formal arguments.
llvm-svn: 39721
2007-07-10 00:28:12 +00:00
Chris Lattner 6eea886b9e implement support for llvm codegen of vectors. That was much easier than
I expected :)

llvm-svn: 39720
2007-07-10 00:23:39 +00:00
Steve Naroff 97b9e91eb7 Bug #:
Submitted by:
Reviewed by:
Added primitive support for 32-bit floating point literals.

llvm-svn: 39719
2007-07-09 23:53:58 +00:00
Chris Lattner 2ada32ed7d implement codegen support for FP literals
llvm-svn: 39718
2007-07-09 23:03:16 +00:00
Steve Naroff 84ff4b44b0 Bug #:
Submitted by:
Reviewed by:
Typechecking support for vectors...

- Added CheckVectorOperands(). Called from CheckAdditionOperands,
CheckMultiplyDivideOperands, CheckSubstractionOperands, and CheckBitwiseOperands.
- Added diagnostic for converting vector values of different size.
- Modified Type::isArithmeticType to include vectors.

Sould be ready for Chris to add code generation. I will continue testing/refining.

llvm-svn: 39717
2007-07-09 21:31:10 +00:00
Steve Naroff 4dddb6194b Bug #:
Submitted by:
Reviewed by:
Fix a bozo bug in HandleDeclAttribute...only install a new type when appropriate.
Also changed setType/setUnderlyingType to return void.

llvm-svn: 39716
2007-07-09 18:55:26 +00:00
Steve Naroff 4ae0ac6a06 Bug #:
Submitted by:
Reviewed by:
- Finished semantic analysis for vectors, added some diagnostics.
- Added AST for vectors (instantiation, installation into the decl).
- Fixed bug in ParseArraySubscriptExpr()...this crasher was introduced by me
when we added the range support.
- Turned pedantic off by default. Since vectors are gcc extensions, having
pedantic on by default was annoying. Turning it off by default is  also
consistent with gcc (but this wasn't my primary motivation).
- Tweaked some comments and diagnostics.

Note: The type checking code is still under construction (for vectors). This
will be my next check-in.

llvm-svn: 39715
2007-07-06 23:09:18 +00:00
Bill Wendling a69300375b Submitted by: Bill Wendling
Reviewed by: Chris Lattner

- Fix for C++ casting operators failing during parsing. Deriving the C++ cast
  expressions from CastExpr was the wrong way to go. Its constructor creates
  null QualTypes in one of its constructors. This doesn't work well with how
  the C++ casting expression class wanted to do things. Derive just from Expr
  instead.

llvm-svn: 39714
2007-06-29 18:21:34 +00:00
Chris Lattner 47c247e7bf add codegen support for <<= and >>=.
llvm-svn: 39713
2007-06-29 17:26:27 +00:00
Chris Lattner b25a94383a Implement the rest of the compound assignment operators, except shifts.
llvm-svn: 39712
2007-06-29 17:03:06 +00:00
Chris Lattner cd215f00ee refactor some code, implement -=
llvm-svn: 39711
2007-06-29 16:52:55 +00:00
Chris Lattner 9369a563b4 Rename ArithAssignBinaryOperator -> CompoundAssignOperator, implement
codegen support for +=.

llvm-svn: 39710
2007-06-29 16:31:29 +00:00
Bill Wendling 772996ab44 Submitted by: Bill Wendling
- The && at the end was causing this to fail. Removed.

llvm-svn: 39709
2007-06-29 09:54:25 +00:00