Commit Graph

40853 Commits

Author SHA1 Message Date
Andrew Lenharth 9b254eed32 llvm.memory.barrier, and impl for x86 and alpha
llvm-svn: 47204
2008-02-16 01:24:58 +00:00
Chris Lattner 27055194b7 Fix CheckEndOfDirective to diagnose lines that contain macros that expand to
zero tokens.  This fixes PR2045, thanks to Neil for finding another 
incredibly subtle corner case :)

llvm-svn: 47203
2008-02-16 01:20:36 +00:00
Anders Carlsson 3ea23a45d9 Make sizeof and __alignof work correctly with packed structs.
llvm-svn: 47202
2008-02-16 01:20:23 +00:00
Ted Kremenek 074965c5cb Further cleanup. Moved definitions for SymbolManager and ValueManager into
their own [.cpp;.h] files.

llvm-svn: 47201
2008-02-16 01:12:31 +00:00
Bill Wendling f861fbaae8 Fix typos.
llvm-svn: 47200
2008-02-16 01:09:25 +00:00
Anders Carlsson 4b93979008 Fix typo
llvm-svn: 47199
2008-02-16 00:39:40 +00:00
Dan Gohman 27ae573900 Rename CountMemOperands to ComputeMemOperandsEnd to reflect what
it actually does. Simplify CountOperands a little by reusing
ComputeMemOperandsEnd. And reword some comments for both.

llvm-svn: 47198
2008-02-16 00:36:48 +00:00
Anders Carlsson 28e7108142 Handle packed attribute correctly
llvm-svn: 47197
2008-02-16 00:29:18 +00:00
Dan Gohman 856c01204b Revert 47177, which was incorrect.
llvm-svn: 47196
2008-02-16 00:25:40 +00:00
Anders Carlsson 214260e04a Address comments from Chris.
llvm-svn: 47195
2008-02-16 00:24:09 +00:00
Chris Lattner 8f51fa82c0 upgrade this test, which wasn't testing the right thing since llvm-upgrade came around.
llvm-svn: 47194
2008-02-15 23:58:25 +00:00
Anders Carlsson 8321a155a5 Store attributes in a global hash map instead.
llvm-svn: 47193
2008-02-15 23:57:38 +00:00
Chris Lattner e1f41fc68e rename llx -> ll
llvm-svn: 47192
2008-02-15 23:51:48 +00:00
Anders Carlsson e5070069c8 Store attributes in a global hash map instead.
llvm-svn: 47191
2008-02-15 23:30:50 +00:00
Ted Kremenek 6698cb8aa3 Refactored code for transfer functions for binary operators involving two LValues.
Fixed bug in transfer functions for sizeof(*); we were incorrectly evaluating to
a value of the wrong type.

Fixed bug in transfer functions for compound assignments where we did not properly
handle assignments involving dereferences of symbolic values.

llvm-svn: 47190
2008-02-15 23:15:23 +00:00
Evan Cheng 6edbbe0c25 This test is not interesting.
llvm-svn: 47189
2008-02-15 23:06:21 +00:00
Scott Michel a3cefeaf0c Make tblgen a little smarter about constants smaller than i32. Currently,
tblgen will complain if a sign-extended constant does not fit into a
data type smaller than i32, e.g., i16. This causes a problem when certain
hex constants are used, such as 0xff for byte masks or immediate xor
values.

tblgen will try the sign-extended value first and, if the sign extended
value would overflow, it tries to see if the unsigned value will fit.
Consequently, a software developer can now safely incant:

	(XORHIr16 R16C:$rA, 0xffff)

which is somewhat clearer and more informative than incanting:

	(XORHIr16 R16C:$rA, (i16 -1))

even if the two are bitwise equivalent.

Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
when getTargetConstant() is invoked.

llvm-svn: 47188
2008-02-15 23:05:48 +00:00
Chris Lattner 0c46309b02 simplify this.
llvm-svn: 47187
2008-02-15 22:57:17 +00:00
Lauro Ramos Venancio 10984b2ee9 Set Ubuntu 7.10 c++ include path.
llvm-svn: 47186
2008-02-15 22:36:38 +00:00
Lauro Ramos Venancio ace55dac39 Add c++ to "inferlanguage"
llvm-svn: 47185
2008-02-15 22:35:25 +00:00
Ted Kremenek 8db4b110c3 Added transfer function support for conditional branches with a NULL condition (e.g., "for(;;)").
Fixed bug in transfer function for compound assignment operators when both operands where variables but had a non-pointer type (we fired an assertion).

llvm-svn: 47184
2008-02-15 22:29:00 +00:00
Ted Kremenek e81734b01c Simplified transfer function logic for ++/-- operators.
Added more boilerplate transfer function support for pointer arithmetic.
Added more pretty-printing support for symbolic constraints.
Added transfer function support for handling enum values.
Minor pointer types cleanup in ExplodedGraphImpl.

llvm-svn: 47183
2008-02-15 22:09:30 +00:00
Dale Johannesen d2fd6b84c7 Modify test to expect improved code.
llvm-svn: 47182
2008-02-15 22:05:15 +00:00
Ted Kremenek c4bf7ef744 Added predicate function "UnaryOperator::isIncrementOp()".
llvm-svn: 47181
2008-02-15 22:04:52 +00:00
Evan Cheng 803bb6d699 The copy instruction being coalesced will be removed, it is not a kill.
llvm-svn: 47179
2008-02-15 21:36:51 +00:00
Ted Kremenek d66c791904 Fixed bug in FoldingSetIteratorImpl where we did not correctly check if
we had reached the "fake bucket" after the last bucket, allowing the iterator
in some cases to run off the end of the hashtable.

llvm-svn: 47178
2008-02-15 21:12:46 +00:00
Dan Gohman c278c4aba0 Skip over the defs and start at the uses when looking for operands
with the TIED_TO attribute.

llvm-svn: 47177
2008-02-15 20:59:17 +00:00
Dan Gohman 0340d1e2cd Use the TargetInstrDescr to determine the number of operands
that should be checked for the TIED_TO attribute instead of
using CountOperands.

llvm-svn: 47176
2008-02-15 20:50:13 +00:00
Eli Friedman 5c9490924c Don't call non-existent method... sorry about the spam; the fix seemed
trivial, but I forgot that method doesn't exist yet.

llvm-svn: 47175
2008-02-15 19:53:52 +00:00
Eli Friedman b26be3d053 Get rid of unused variable warning.
llvm-svn: 47174
2008-02-15 19:49:39 +00:00
Duncan Sands a69c2f86b4 Fix this test on linux, which returns S242
using sret.

llvm-svn: 47173
2008-02-15 19:42:13 +00:00
Duncan Sands 5560281c06 Teach LegalizeTypes how to promote the flags
in a ret node.  These are created as i32 constants
but on some platforms i32 is not legal.  This
fixes 26 "make check" failures, for example
Alpha/2005-07-12-TwoMallocCalls.ll.

llvm-svn: 47172
2008-02-15 19:34:17 +00:00
Chris Lattner 7b1431785b Handle \n's in value names for more targets. The asm printers
really really really need refactoring :(

llvm-svn: 47171
2008-02-15 19:04:54 +00:00
Chris Lattner 318c41f9e8 If the llvm name contains an unprintable character, don't print it in
the global comment.  This prevents printing things like:

...  # foo
bar

when the name is "foo\nbar".

llvm-svn: 47170
2008-02-15 18:56:05 +00:00
Chris Lattner 536ddedea3 targets that support quotes for mangled names still need to escape newlines
when they occur in the name, just like " is escaped.

llvm-svn: 47169
2008-02-15 18:54:56 +00:00
Dale Johannesen 2e01912f1a Cosmetics.
llvm-svn: 47168
2008-02-15 18:40:53 +00:00
Evan Cheng 2ff2da89ab - Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
register defs and uses after each successful coalescing.
- Also removed a number of hacks and fixed some subtle kill information bugs.

llvm-svn: 47167
2008-02-15 18:24:29 +00:00
Evan Cheng 9215129f4e Added CommuteChangesDestination(). This returns true if commuting the specified
machine instr will change its definition register.

llvm-svn: 47166
2008-02-15 18:21:33 +00:00
Eli Friedman bd258284e0 Split out incomplete arrays from VariableArrayType into
IncompleteArrayType.  This should make code dealing with both incomplete 
and variable length arrays much more readable, plus it allows properly 
making the distinction between isVariableArrayType() and 
isVariablyModifiedType().  The patch is a little big, but it's 
strightforward. so I don't think there should be any issues.

llvm-svn: 47165
2008-02-15 18:16:39 +00:00
Evan Cheng 78b0edb957 Remove unnecessary #include.
llvm-svn: 47164
2008-02-15 18:12:09 +00:00
Dan Gohman a36ade5595 Use StoreSDNode::getValue instead of calling getOperand directly
with a hard-coded operand number.

llvm-svn: 47163
2008-02-15 18:11:59 +00:00
Dale Johannesen 67b818f503 Remove warning about 64-bit code on processor
that doesn't support it.  Per Chris.

llvm-svn: 47162
2008-02-15 18:09:51 +00:00
Lauro Ramos Venancio eab51d3a04 It is not safe to call fork in PrintStackTrace. Sometimes it freezes the program.
llvm-svn: 47161
2008-02-15 18:05:54 +00:00
Chris Lattner 287c734075 Fix PR2041: restrict is not a keyword in c90.
llvm-svn: 47160
2008-02-15 18:02:59 +00:00
Eli Friedman 9e805b24fd Part of clearing up the whole VariableArrayType + incomplete arrays
thing.  Some cleanups that can be done independently of the fix.

llvm-svn: 47158
2008-02-15 12:53:51 +00:00
Eli Friedman 783a5c262b Remove unnecessary references to VariableArrayType from Analysis.
llvm-svn: 47157
2008-02-15 12:28:27 +00:00
Eli Friedman a682d39639 Remove useless parameter from isConstantSizeType.
llvm-svn: 47156
2008-02-15 12:20:59 +00:00
Anders Carlsson 1a84106117 Get rid of AttributeList in the AST and use the new Attr class instead
llvm-svn: 47155
2008-02-15 07:04:12 +00:00
Eli Friedman 78e47634b2 Get rid of outdated code that masks type errors. Fixes PR2036.
llvm-svn: 47154
2008-02-15 06:56:02 +00:00
Eli Friedman e9d0954c06 Nevermind, these tests work... I messed up my testing.
llvm-svn: 47153
2008-02-15 06:29:53 +00:00