Commit Graph

38413 Commits

Author SHA1 Message Date
Evan Cheng 388f6f51a0 Fix a bug where splitting cause some unnecessary spilling.
llvm-svn: 44482
2007-12-01 04:42:39 +00:00
Owen Anderson 7f09c88977 Fixes for MachineLoopInfo, mostly from Evan. With these, it should be almost useable!
llvm-svn: 44480
2007-12-01 03:01:39 +00:00
Evan Cheng 69fda0a716 Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
llvm-svn: 44479
2007-12-01 02:07:52 +00:00
Eric Christopher e62b441b51 Add target triple to include/llvm/Config/config.h.in. Regenerate all files.
llvm-svn: 44478
2007-12-01 00:34:39 +00:00
Devang Patel c7d9af8d6d Change LinkTimeOptimizer.h install location.
llvm-svn: 44477
2007-12-01 00:24:50 +00:00
Devang Patel 0fceaea8be Change lib lto install location.
llvm-svn: 44476
2007-11-30 23:27:57 +00:00
Chris Lattner 4431a1b19b start partitioning the diagnostics into two classes: those
that are builtin and those that are aren't.  This is a bunch
of API refactoring that will make this possible, but there is
no functionality change yet.

llvm-svn: 44473
2007-11-30 22:53:43 +00:00
Anders Carlsson 7a9a38abe0 String literals are always valid LValues.
llvm-svn: 44472
2007-11-30 22:47:59 +00:00
Ted Kremenek c9bcda94ae Implemented serialization of SelectorTable and Selectors.
Modified serialization of IdentifierTable to self-register itself with
the Deserializer.

llvm-svn: 44471
2007-11-30 22:46:56 +00:00
Ted Kremenek 8ded669b04 Fixed subtle bug in Deserializer::JumpTo when jumping when the block-nesting
information matching did not exactly match the underlying stream's scoping
information.

llvm-svn: 44470
2007-11-30 22:45:05 +00:00
Ted Kremenek 1f80e8b6eb Fixed potential bug where CurWord is not zeroed out in JumpToBit.
llvm-svn: 44469
2007-11-30 22:39:46 +00:00
Chris Lattner e9c810c87c pass diagnostics into the rewrite test client.
llvm-svn: 44468
2007-11-30 22:25:36 +00:00
Evan Cheng b10dc27b20 Do not fold reload into an instruction with multiple uses. It issues one extra load.
llvm-svn: 44467
2007-11-30 21:23:43 +00:00
Anders Carlsson 3b754452eb Initialize CurMethodDecl to 0.
llvm-svn: 44463
2007-11-30 20:01:38 +00:00
Anders Carlsson 801c5c7467 GCC has an extension where the left hand side of the ? : operator can be omitted. Handle this in a few more places.
llvm-svn: 44462
2007-11-30 19:04:31 +00:00
Chris Lattner 907703cecd chain update requests properly.
llvm-svn: 44460
2007-11-30 18:52:58 +00:00
Anders Carlsson 452815a6b2 Initialize LaxVectorConversions.
llvm-svn: 44459
2007-11-30 18:29:41 +00:00
Duncan Sands d4d7f9d69e Small optimization of parameter attribute lookup.
llvm-svn: 44458
2007-11-30 18:20:58 +00:00
Duncan Sands b41f872013 Add a convenience method for modifying parameter
attributes.  While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.

llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Chris Lattner 1386de8757 fix a bug handling typedefs in member expr codegen. Patch
by Seo Sanghyeon

llvm-svn: 44455
2007-11-30 18:02:19 +00:00
Chris Lattner b6a7b582ee Fix a codegen crash on void ?: reported by Oliver
llvm-svn: 44454
2007-11-30 17:56:23 +00:00
Chris Lattner aa0b570dfb Support fully general case expressions, patch by Sanghyeon Seo!
llvm-svn: 44453
2007-11-30 17:44:57 +00:00
Duncan Sands 4e8c071612 Check that there are not more attributes than
function parameters.

llvm-svn: 44452
2007-11-30 15:52:20 +00:00
Christopher Lamb 0112f62bb9 Doh! Check in this long overdue test fix.
llvm-svn: 44450
2007-11-30 06:35:48 +00:00
Anders Carlsson e1af1d20ef Support lax vector conversions.
llvm-svn: 44449
2007-11-30 04:21:22 +00:00
Devang Patel cc45c338d1 Provide a way to update DescGlobals cache directly.
llvm-svn: 44446
2007-11-30 00:51:33 +00:00
Steve Naroff 205ec3d07a Yesterday, I simplified how we stream top-level decls.
After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).

TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
llvm-svn: 44445
2007-11-29 23:05:20 +00:00
Ted Kremenek bfcf8cdbd7 Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventually
be the new hook that ASTStreamer calls to feed top-level Decls to
ASTConsumers.

The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is
that "HandleTopLevelDecl" is currently called by ASTStreamer for every
top-level declaration, including those that appear within a Decl chain. Using
the new interface, ASTStreamer would only call HandleTopLevelDeclaration for
Decls that appear that the beginning of a Decl chain (i.e., a group of related
decls).

To preserve the behavior that all subclasses of ASTConsumer currently expect,
the default implementation of HandleTopLevelDeclaration simply calls
HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each
Decl* in a chain of Decls.

The advantage of this interface is that some subclasses of ASTConsumer only
really want the Decl chain, and not each individual Decl passed to them. This
extra level of indirection allows subclasses to override the default behavior
if they so desire.

llvm-svn: 44444
2007-11-29 23:05:17 +00:00
Evan Cheng d35b5acae4 Do not lose rematerialization info when spilling already split live intervals.
llvm-svn: 44443
2007-11-29 23:02:50 +00:00
Christopher Lamb 2ed9afd777 Update the initializer's type, in addition to the decl, if we've changed the type of the decl based on it.
llvm-svn: 44440
2007-11-29 19:09:19 +00:00
Ted Kremenek 22a0d616f6 Added "complex.c" (a copy of test/Codegen/complex.) to the serialization
test suite.

llvm-svn: 44439
2007-11-29 19:05:51 +00:00
Ted Kremenek 870600d625 Only serialize top-level decls that appear at the head of a decl chain.
llvm-svn: 44438
2007-11-29 19:04:54 +00:00
Owen Anderson ffa55112e0 Fix a miscompilation in spiff on PPC.
llvm-svn: 44437
2007-11-29 18:02:22 +00:00
Evan Cheng 8494ee175c Fix a major performance issue with splitting. If there is a def (not def/use)
in the middle of a split basic block, create a new live interval starting at
the def. This avoid artifically extending the live interval over a number of
cycles where it is dead. e.g.

bb1:
       = vr1204   (use / kill) <= new interval starts and ends here.
...
...
vr1204 =          (new def)   <= start a new interval here.
       = vr1204   (use)

llvm-svn: 44436
2007-11-29 10:12:14 +00:00
Evan Cheng 37ed3e6320 Update tests.
llvm-svn: 44435
2007-11-29 10:03:54 +00:00
Evan Cheng f85c063ec0 Replace the odd kill# hack with something less fragile.
llvm-svn: 44434
2007-11-29 09:49:23 +00:00
Duncan Sands 8dfcd5975e Small parameter attributes cleanup.
llvm-svn: 44433
2007-11-29 08:30:15 +00:00
Chris Lattner f5a095359e Pass the whole StringMapEntry into StringMapEntryInitializer::Initialize.
llvm-svn: 44432
2007-11-29 06:14:41 +00:00
Christopher Lamb 42e69f219d Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.
llvm-svn: 44431
2007-11-29 06:06:27 +00:00
Chris Lattner d1f0e3d791 provide an optional API to allow datatypes in a stringmap to be *gasp*
initialized with a value if they want, by specializing the 
StringMapEntryInitializer class.

llvm-svn: 44430
2007-11-29 06:04:41 +00:00
Ted Kremenek 1150e25901 Enhanced serialization testing by also pretty-printing CFGs constructed from ASTs
both before and after serialization/deserialization. If the CFGs between the pre-
and post- serialized/deserialized ASTs differ, the serialization has failed.

llvm-svn: 44429
2007-11-29 01:24:25 +00:00
Evan Cheng be255b0650 Fixed various live interval splitting bugs / compile time issues.
llvm-svn: 44428
2007-11-29 01:06:25 +00:00
Evan Cheng 147f7799c5 Kill info update bug.
llvm-svn: 44427
2007-11-29 01:05:47 +00:00
Ted Kremenek 2501c8294f Fixed test case to not expect a warning when one should not be emitted.
Removed redundant test case.

llvm-svn: 44426
2007-11-29 01:03:21 +00:00
Ted Kremenek 0865d8a5d0 Added test cases for -Wfloat-equal to test comparisons against literals that can be
represented exactly and inexactly by APFloats. For the former, we do not emit a
warning.

llvm-svn: 44425
2007-11-29 01:00:11 +00:00
Ted Kremenek eda40e273e Enhanced implementation of -Wfloat-equal to check for comparisons against
floating-point literals that are represented exactly by the APFloat in
FloatingLiteral. For such literals, we do not emit a warning since such checks are
often performed in real code to see if a variable has changed from its original
value. This heuristic clearly can lead to false negatives, but the hope is it will
significantly reduce false positives to help make the compiler flag more useful.

llvm-svn: 44424
2007-11-29 00:59:04 +00:00
Ted Kremenek 3a2c950401 Added "isExact" field to FloatingLiteral. This flag indicates whether or not
the APFloat representing the parsed literal can represent the literal value
exactly.  This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.

llvm-svn: 44423
2007-11-29 00:56:49 +00:00
Ted Kremenek 9924ca2e14 Removed potential buffer overrun (spotted by Neil Booth) when NumericLiteralParser
converts a parsed literal into an APFloat. We are still performing a copy of the
string, which hopefully will be removed eventually for performance reasons. This
version now is at least safe.

Changed rounding in APFloat construction in NumericLiteralParser from rmTowardsZero
to rmNearestTiesToEven.

llvm-svn: 44422
2007-11-29 00:54:29 +00:00
Steve Naroff 197616c3a8 Several fixes/simplifications surrounding how we stream top-level decl AST's.
The following code...

typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;

struct Y { int A; };

struct X { int A; } D; 

struct X E, F;

...now produces the following output...

> ../../Debug/bin/clang xx.c -ast-print
Read top-level tag decl: 'cssm_data'
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data *CSSM_DATA_PTR;
Read top-level tag decl: 'Y'
Read top-level tag decl: 'X'
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'F'

...which is much more accurate than the previous -ast-print output...

typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data CSSM_DATA;
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'E'

llvm-svn: 44421
2007-11-28 22:54:11 +00:00
Chris Lattner cee633a873 New testcase for PR1744
llvm-svn: 44418
2007-11-28 22:43:34 +00:00