Commit Graph

39267 Commits

Author SHA1 Message Date
Chris Lattner 63fbcdf6ca add new smart pointer for clang.
llvm-svn: 45261
2007-12-20 19:14:02 +00:00
Evan Cheng c226ed0273 Type specification didn't match gcc's.
llvm-svn: 45260
2007-12-20 09:35:28 +00:00
Evan Cheng f989141d30 More accurate checks for two-address constraints.
llvm-svn: 45259
2007-12-20 09:25:31 +00:00
Seo Sanghyeon 58bdfda87c Add newline
llvm-svn: 45257
2007-12-20 07:22:20 +00:00
Christopher Lamb 7d82bc46b8 Implement review feedback, including additional transforms
(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)

and add testcase.

llvm-svn: 45256
2007-12-20 07:21:11 +00:00
Chris Lattner e2cf5b8c5c Add m_Zero().
llvm-svn: 45255
2007-12-20 04:47:44 +00:00
Evan Cheng ddc9af11f0 Remove xfail. This is fixed.
llvm-svn: 45254
2007-12-20 02:25:21 +00:00
Evan Cheng a509537e25 The physical register + virtual register joining requirement was much too strict.
llvm-svn: 45253
2007-12-20 02:23:25 +00:00
Evan Cheng 61bc51ee97 Bring back a burr scheduling heuristic that's still needed.
llvm-svn: 45252
2007-12-20 02:22:36 +00:00
Evan Cheng 26ee54eb05 Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv.
llvm-svn: 45251
2007-12-20 02:20:53 +00:00
Chris Lattner 16a51da0e2 simplify this code with the new m_Zero() pattern. Make sure the select only
has a single use, and generalize it to not require N to be a constant.

llvm-svn: 45250
2007-12-20 01:56:58 +00:00
Devang Patel c006744c38 Revert my previous check-in.
llvm-svn: 45249
2007-12-20 01:46:01 +00:00
Chris Lattner 8304df9024 Fix trivial self-infinite-recursion
llvm-svn: 45248
2007-12-20 01:38:17 +00:00
Anton Korobeynikov dce44d87f8 More eye-candy stuff :)
llvm-svn: 45247
2007-12-20 01:30:27 +00:00
Anton Korobeynikov 5ab614824d Add iterators for child traversal.
llvm-svn: 45246
2007-12-20 01:21:50 +00:00
Bill Wendling 65c001e6bc Updated comments to reflect what "side effects" means in this situation.
llvm-svn: 45245
2007-12-20 01:08:10 +00:00
Fariborz Jahanian 134cbefba2 More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.

llvm-svn: 45244
2007-12-20 01:06:58 +00:00
Chris Lattner 6c9ffe9529 Implement codegen for ordered comparison builtins.
llvm-svn: 45243
2007-12-20 00:44:32 +00:00
Scott Michel 5f1470f03a More working CellSPU tests:
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads

llvm-svn: 45242
2007-12-20 00:44:13 +00:00
Ted Kremenek 371efafb94 Created initial implementation of "BuildSerializer", and ASTConsumer
which serializes ASTs to a common output directory.  This ASTConsumer
is invoked using a combination of "-o" and "-serialize" from the driver.

llvm-svn: 45241
2007-12-20 00:34:58 +00:00
Ted Kremenek 62c462f9c5 Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"
llvm-svn: 45240
2007-12-20 00:29:44 +00:00
Chris Lattner 2da14fb84f implement semantic analysis for __builtin_islessequal and friends.
llvm-svn: 45239
2007-12-20 00:26:33 +00:00
Devang Patel 6d279d484a Add lto version check mechanism.
llvm-svn: 45238
2007-12-20 00:24:01 +00:00
Ted Kremenek 8babe3d9c4 Added method getFileEntryForID() to SourceManager.
llvm-svn: 45237
2007-12-20 00:15:17 +00:00
Gordon Henriksen 59db63d5fc Use a module to group calling convention values, too.
llvm-svn: 45236
2007-12-20 00:13:26 +00:00
Chris Lattner e202e6af48 simplify some code.
llvm-svn: 45235
2007-12-20 00:05:45 +00:00
Chris Lattner 43be2e6004 refactor some code that handles sema of direct function calls.
llvm-svn: 45234
2007-12-19 23:59:04 +00:00
Chris Lattner 9b65d3506e Add iterator interface to function/method parameters.
llvm-svn: 45233
2007-12-19 23:58:25 +00:00
Ted Kremenek ca07147851 Split serialization ASTConsumers into two consumers: SingleFileSerializer and
BuildSerializer. The former serializes a single translation unit to a
corresponding .ast file. The second serializes ASTs to a common emission
direction.  The latter is not fully implemented yet.

llvm-svn: 45232
2007-12-19 23:49:37 +00:00
Ted Kremenek 96e05d4f31 Added methods createMainFileID() and createMainFileIDForMemBuffer() to
SourceManager to allow SourceManager to directly intern the MainFileID
when it is created.  Removed setMainFileID().

llvm-svn: 45231
2007-12-19 23:48:45 +00:00
Evan Cheng e2a8ba7fec Allow iv reuse if the user is a PHI node which is in turn used as addresses.
llvm-svn: 45230
2007-12-19 23:33:23 +00:00
Gordon Henriksen eb4ce98f98 Using modules to group enumerations in Ocaml bindings.
llvm-svn: 45229
2007-12-19 22:54:12 +00:00
Ted Kremenek 230bd918b2 Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.

llvm-svn: 45228
2007-12-19 22:51:13 +00:00
Ted Kremenek f7bfae6b45 Typo fix.
llvm-svn: 45227
2007-12-19 22:32:34 +00:00
Gordon Henriksen 34eb6d877e Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Ted Kremenek 9a53275918 Added storage of the FileID of the the main source file of a translation unit
in SourceManager.

llvm-svn: 45225
2007-12-19 22:29:55 +00:00
Steve Naroff fa5751f842 Various tweaks to the get/lookup instance/class method API's.
llvm-svn: 45224
2007-12-19 22:27:04 +00:00
Ted Kremenek 6c7807716b Removed "SourceFile" from TranslationUnit. This same information will (soon)
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.

llvm-svn: 45223
2007-12-19 22:24:34 +00:00
Chris Lattner 7bd082e188 Describe Nico's script for gcc interception. Patch by Nico Weber.
llvm-svn: 45222
2007-12-19 22:17:19 +00:00
Dale Johannesen eadbf4b91c Enable EH on PPC Darwin. This basically works; there
are a couple of issues that show up with the optimizer,
but I don't think they're really EH problems.
(llvm-gcc testsuite users note:  By default the testsuite
uses the unwinding code that's built as part of your local
llvm-gcc, which does not work.  You need to trick it into
using the installed system unwinding code to get useful
results.)

llvm-svn: 45221
2007-12-19 21:54:36 +00:00
Scott Michel 5ecac82f71 CellSPU testcase, extract_elt.ll: extract vector element.
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands aa31b92508 When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.

llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Scott Michel a246e09aa0 More working CellSPU test cases:
- call.ll: Function call
- ctpop.ll: Count population
- dp_farith.ll: DP arithmetic
- eqv.ll: Equivalence primitives
- fcmp.ll: SP comparisons
- fdiv.ll: SP division
- fneg-fabs.ll: SP negation, aboslute value
- int2fp.ll: Integer -> SP conversion
- rotate_ops.ll: Rotation primitives
- select_bits.ll: (a & c) | (b & ~c) bit selection
- shift_ops.ll: Shift primitives
- sp_farith.ll: SP arithmentic

llvm-svn: 45217
2007-12-19 20:50:49 +00:00
Scott Michel 098c113bc8 Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions)

llvm-svn: 45216
2007-12-19 20:15:47 +00:00
Ted Kremenek aff2343af3 Cleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
doing clang --help.

llvm-svn: 45215
2007-12-19 19:50:41 +00:00
Chris Lattner f1be288617 fix formatting
llvm-svn: 45214
2007-12-19 19:48:49 +00:00
Ted Kremenek 6c0b224011 Added "-o" option to driver. ASTConsumers will need to be gradually
rewired to utilize this option.

Renamed option --serialize-ast --serialize.

llvm-svn: 45213
2007-12-19 19:47:59 +00:00
Chris Lattner c238331377 Add support for #pragma mark, which shouldn't warn about bogus tokens.
llvm-svn: 45212
2007-12-19 19:38:36 +00:00
Ted Kremenek 0061aeb316 Removed storing inode and device number in TranslationUnit.
Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.

llvm-svn: 45211
2007-12-19 19:27:38 +00:00
Chris Lattner 6a4f74593c fix some crazy indentation
llvm-svn: 45210
2007-12-19 19:23:28 +00:00