Commit Graph

37576 Commits

Author SHA1 Message Date
Chris Lattner 149c55aba4 Add the first half of chapter 5: if/then/else.
To come: for statement.

llvm-svn: 43546
2007-10-31 06:30:21 +00:00
Chris Lattner da1988477d __main is dead along with llvm-gcc3.
llvm-svn: 43545
2007-10-31 05:53:31 +00:00
Chris Lattner 5087e267c2 temporarily revert devang's patch to link in the llvm codegen etc.
llvm-svn: 43544
2007-10-31 04:53:03 +00:00
Steve Naroff 37e011ce43 Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".
llvm-svn: 43543
2007-10-31 04:38:33 +00:00
Owen Anderson 0b59fa0605 Add the skeleton of a better PHI elimination pass.
llvm-svn: 43542
2007-10-31 03:37:57 +00:00
Owen Anderson 9b8f34f2ac Some fixes to get MachineDomTree working better.
llvm-svn: 43541
2007-10-31 03:30:14 +00:00
Anders Carlsson f56a7aee2f Encode Class, SEL and Objective-C objects.
llvm-svn: 43540
2007-10-31 02:53:19 +00:00
Devang Patel df62bc067a Keep track of field offsets during structure layout.
llvm-svn: 43539
2007-10-31 01:23:10 +00:00
Devang Patel 46c7003052 Make target info available to clang code generator.
This is far from complete but this helps clang codegen module
make progress.

llvm-svn: 43536
2007-10-31 00:59:29 +00:00
Dale Johannesen b066c1f216 Make i64=expand_vector_elt(v2i64) work in 32-bit mode.
llvm-svn: 43535
2007-10-31 00:32:36 +00:00
Fariborz Jahanian ca5338196f Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
Added initialization of Class/SEMA types.

llvm-svn: 43534
2007-10-31 00:12:35 +00:00
Evan Cheng 240c1adade At end of LSR, replace uses of now constant (as result of SplitCriticalEdge) PHI node with the constant value.
llvm-svn: 43533
2007-10-30 23:45:15 +00:00
Ted Kremenek 4f4c3f9fd5 Added member function "size()" to FoldingSet to return the number of
nodes in the FoldingSet.

llvm-svn: 43531
2007-10-30 23:35:55 +00:00
Devang Patel 82ae5f255f Avoid unnecessary PATypeHolder copy.
llvm-svn: 43530
2007-10-30 23:22:14 +00:00
Steve Naroff 5cdcd9b61c Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I generate these declaration on the fly when rewriting a message expression.
llvm-svn: 43529
2007-10-30 23:14:51 +00:00
Devang Patel 17833d7068 New test.
llvm-svn: 43527
2007-10-30 23:07:47 +00:00
Ted Kremenek e26f3c50c5 Updated some comments.
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.

llvm-svn: 43526
2007-10-30 22:57:35 +00:00
Chris Lattner 595db86c9d __real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
llvm-svn: 43525
2007-10-30 22:53:42 +00:00
Evan Cheng c2dbfee43f It's not safe to tell SplitCriticalEdge to merge identical edges. It may delete the phi instruction that's being processed.
llvm-svn: 43524
2007-10-30 22:27:26 +00:00
Dale Johannesen d50c8bcef6 Add missing SSE builtins: CVTPD2PI, CVTPS2PI,
CVTTPD2PI, CVTTPS2PI, CVTPI2PD, CVTPI2PS.

llvm-svn: 43523
2007-10-30 22:15:38 +00:00
Ted Kremenek 4c0ef37fbb Refactored CFG construction code that processes DeclStmts to use StmtIterator.
Now CFG construction transparently supports Variable Length Array declarations
with expressions for their sizes, and typedefs that include VLAs.

llvm-svn: 43520
2007-10-30 21:48:34 +00:00
Devang Patel 73721a12ca Refactor code into a separate method.
llvm-svn: 43519
2007-10-30 21:27:20 +00:00
Ted Kremenek c08bca6ae8 Removed SrcMgr::FileInfo and SrcMgr::InfoRec and replaced them with a
single class: ContentCache.  This simplifies the logic in
SourceManager and makes the ownership of MemoryBuffers clearer.

llvm-svn: 43518
2007-10-30 21:08:08 +00:00
Ted Kremenek 78036cdd5c Tightened IgnoreParen.
llvm-svn: 43517
2007-10-30 21:03:09 +00:00
Devang Patel ffe1e218f2 Fix 80 col violations.
llvm-svn: 43516
2007-10-30 20:59:40 +00:00
Chris Lattner 0b11172e8c minor tweaks
llvm-svn: 43515
2007-10-30 20:57:56 +00:00
Devang Patel f5bda316c5 Use
+  llvm::DenseMap<Type *, llvm::PATypeHolder> TypeHolderMap;
instead of
-  llvm::DenseMap<Type *, llvm::PATypeHolder *> TypeHolderMap;

llvm-svn: 43514
2007-10-30 20:46:47 +00:00
Fariborz Jahanian 4d5b2baa1c Fixed tests.
llvm-svn: 43513
2007-10-30 20:41:57 +00:00
Chris Lattner e0218997ab minor code cleanup
llvm-svn: 43512
2007-10-30 20:27:44 +00:00
Evan Cheng 0747bc1df6 Typo.
llvm-svn: 43511
2007-10-30 20:11:21 +00:00
Dan Gohman 9f39660c20 Add support for folding binary operators with vector zero operands.
llvm-svn: 43510
2007-10-30 19:00:49 +00:00
Chris Lattner de21d55e70 shrinkify storage class to a bitfield, add a fixme about merging it in the future.
llvm-svn: 43509
2007-10-30 18:54:50 +00:00
Devang Patel fa0cb1ef3a Remove commented out line.
llvm-svn: 43508
2007-10-30 18:31:12 +00:00
Fariborz Jahanian 18d7b30241 Revisited my last patch to be able to do encoding of ivar types with 'id'.
llvm-svn: 43507
2007-10-30 18:27:03 +00:00
Chris Lattner 74a0ae2c2a update some comments.
llvm-svn: 43506
2007-10-30 17:46:51 +00:00
Chris Lattner 39afd571a0 Avoid using macro expansions, which causes these to come out in -E mode.
llvm-svn: 43505
2007-10-30 17:45:43 +00:00
Fariborz Jahanian 509d8d6fc6 Added type encoding for 'id' type.
llvm-svn: 43504
2007-10-30 17:06:23 +00:00
Steve Naroff f921385f40 Rewrite protocols.
llvm-svn: 43503
2007-10-30 16:42:30 +00:00
Ted Kremenek 9139310c76 Added vector to ASTContext to store references to "complete" VLA types
(VLAs with a specified size expresssion).  This vector owns the
references to these type objects.

llvm-svn: 43502
2007-10-30 16:41:53 +00:00
Steve Naroff 5448cf6d61 - Add location info to category/protocol AST's
- Rewrite categories.

llvm-svn: 43501
2007-10-30 13:30:57 +00:00
Duncan Sands b508c53c63 Fix for visibility warnings generated by gcc-4.2.
llvm-svn: 43500
2007-10-30 13:14:37 +00:00
Duncan Sands 9ad5465005 Add support for expanding trunc stores. Consider
storing an i170 on a 32 bit machine.  This is first
promoted to a trunc-i170 store of an i256.  On a
little-endian machine this expands to a store of
an i128 and a trunc-i42 store of an i128.  The
trunc-i42 store is further expanded to a trunc-i42
store of an i64, then to a store of an i32 and a
trunc-i10 store of an i32.  At this point the operand
type is legal (i32) and expansion stops (legalization
of the trunc-i10 needs to be handled in LegalizeDAG.cpp).
On big-endian machines the high bits are stored first,
and some bit-fiddling is needed in order to generate
aligned stores.

llvm-svn: 43499
2007-10-30 12:50:39 +00:00
Duncan Sands 341f093bb1 If a call to getTruncStore is for a normal store,
offload to getStore rather than trying to handle
both cases at once (the assertions for example
assume the store really is truncating).

llvm-svn: 43498
2007-10-30 12:40:58 +00:00
Steve Naroff 4cd61acc33 Remove a couple FIXME's for rewriting ObjC interfaces (which are now being rewritten properly).
llvm-svn: 43494
2007-10-30 03:43:13 +00:00
Steve Naroff c54840433f More support for rewriting ObjC intefaces. Still some edge cases to handle...
llvm-svn: 43493
2007-10-30 02:23:23 +00:00
Dale Johannesen 3f156de60d Fix argument types for PSLLQ, PSRLQ.
llvm-svn: 43490
2007-10-30 01:44:33 +00:00
Dale Johannesen 6aa304e529 Add missing MMX PSUBQ.
llvm-svn: 43488
2007-10-30 01:18:38 +00:00
Anders Carlsson df4cc6160f Handle function types.
llvm-svn: 43485
2007-10-30 00:06:20 +00:00
Fariborz Jahanian 31d05db565 Assert if isObjcIdType is called before 'id' type is built.
llvm-svn: 43484
2007-10-30 00:00:49 +00:00
Ted Kremenek 843ebedde4 VariableArrayTypes (VLAs) without a size expression are now uniqued
and inserted into a FoldingSet owned by ASTContext.

llvm-svn: 43482
2007-10-29 23:37:31 +00:00