Commit Graph

40179 Commits

Author SHA1 Message Date
Christopher Lamb 0592cf7e74 Allow ComplexExpressions in InstrInfo.td files to be slightly more... complex! ComplexExpressions can now have attributes which affect how TableGen interprets
the pattern when generating matchin code. 

The first (and currently, only) attribute causes the immediate parent node of the ComplexPattern operand to be passed into the matching code rather than the node at the root of the entire DAG containing the pattern.

llvm-svn: 46606
2008-01-31 07:27:46 +00:00
Christopher Lamb 58ffa8c57a Add more thorough error checking for NULL register classes.
llvm-svn: 46605
2008-01-31 07:09:08 +00:00
Ted Kremenek 6f4a9ef4b6 Fixed misspelling of "LLVM" due to some editor+Ted madness.
llvm-svn: 46604
2008-01-31 06:49:09 +00:00
Chris Lattner 7f024fe0c6 Fix PR1965: missing diagnostics for parameters that are missing
type specifiers.  This required updating some (buggy) tests, and the
testcase was previously accidentally committed.

llvm-svn: 46603
2008-01-31 06:10:07 +00:00
Chris Lattner 4973fb9273 Fix a bogus test
llvm-svn: 46602
2008-01-31 06:06:29 +00:00
Nate Begeman 4cd6689d1f Remainder of the __builtin_overload feedback
llvm-svn: 46601
2008-01-31 05:38:29 +00:00
Chris Lattner a779d69029 Fix a rewriter crash when the whole body of a foreach is itself
rewritten, as in Sema/rewrite-foreach-6.m.  Fariborz/Steve,
please review this to see if it is sane.

llvm-svn: 46600
2008-01-31 05:10:40 +00:00
Chris Lattner a94035bbb8 Fix PR1921 by promoting negative indices to intptrty.
llvm-svn: 46599
2008-01-31 04:12:50 +00:00
Evan Cheng 6332dbec69 Add x86 specific getFrameIndexOffset(). This fixes local variable debugging info.
llvm-svn: 46598
2008-01-31 04:06:00 +00:00
Evan Cheng a41d3bcb12 MRegisterInfo::getLocation() is a really bad idea. Its function is to calculate the offset from frame pointer to a stack slot and then storing the delta in a MachineLocation object. The name is bad (it implies a getter), and MRegisterInfo doesn't need to know about MachineLocation.
Replace getLocation() with getFrameIndexOffset() which returns the delta from frame pointer to stack slot. Dwarf writer can then use the information for whatever it wants.

llvm-svn: 46597
2008-01-31 03:37:28 +00:00
Evan Cheng 3c0486fb38 Makes the same change in ppc backend: avoid inserting prologue before debug labels.
llvm-svn: 46596
2008-01-31 03:33:38 +00:00
Ted Kremenek a0be8264b5 Added transfer function support for unary '&' and '*', providing basic
(local) aliasing support.

Modified ExplodedGraph pretty-printer (for GRConstants) to also print out the
pointer value of the state associated with a node.  This way one can easily
see that two states are identical.

llvm-svn: 46595
2008-01-31 02:35:41 +00:00
Anders Carlsson fbcf676a65 Make CallExpr::isBuiltinConstantExpr slightly more efficient.
llvm-svn: 46594
2008-01-31 02:13:57 +00:00
Steve Naroff f6e3b32964 Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is used to support CFConstantStrings. Can be extended to support other built-in functions.
This allows the following code to compile without error...

#include <CoreFoundation/CoreFoundation.h>

#define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V);

CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification")

llvm-svn: 46592
2008-01-31 01:07:12 +00:00
Dan Gohman a65951fef0 Avoid unnecessarily casting away const, fixing a FIXME.
llvm-svn: 46591
2008-01-31 01:05:10 +00:00
Dan Gohman ed346f2ed5 Avoid unnecessarily casting away const.
llvm-svn: 46590
2008-01-31 01:01:48 +00:00
Dan Gohman c2fdeee1ed Fix a typo in a comment.
llvm-svn: 46588
2008-01-31 00:44:33 +00:00
Dan Gohman 9ba4d76816 Rename ISD::FLT_ROUNDS to ISD::FLT_ROUNDS_ to avoid conflicting
with the real FLT_ROUNDS (defined in <float.h>).

llvm-svn: 46587
2008-01-31 00:41:03 +00:00
Evan Cheng 4863fcc3eb Also avoid adding callee save code before debug labels.
llvm-svn: 46586
2008-01-31 00:27:49 +00:00
Dan Gohman 3646fdda67 Create a new class, MemOperand, for describing memory references
in the backend. Introduce a new SDNode type, MemOperandSDNode, for
holding a MemOperand in the SelectionDAG IR, and add a MemOperand
list to MachineInstr, and code to manage them. Remove the offset
field from SrcValueSDNode; uses of SrcValueSDNode that were using
it are all all using MemOperandSDNode now.

Also, begin updating some getLoad and getStore calls to use the
PseudoSourceValue objects.

Most of this was written by Florian Brander, some
reorganization and updating to TOT by me.

llvm-svn: 46585
2008-01-31 00:25:39 +00:00
Ted Kremenek b5474fc529 Added 'SymbolicLValue' class to represent LValues whose value is symbolic.
Improved pretty-printing of LValues.
Parameters whose values are pointers/references are now assigned SymbolicLValues.

llvm-svn: 46584
2008-01-31 00:09:56 +00:00
Steve Naroff e101f9548e Hack Sema::MergeTypeDefDecl() to silently ignore duplicate typedef's in system headers files.
A bizarre, non-standard hook that many compilers appear to implement (sigh:-).

llvm-svn: 46583
2008-01-30 23:46:05 +00:00
Ted Kremenek 2531fce319 We now delay adding nodes created by GRBranchNodeBuilder to the analysis
worklist until the dstor of GRBranchNodeBuilderImpl. This way clients can mark
creates nodes as "sinks" before they are added to the worklist.

llvm-svn: 46582
2008-01-30 23:24:39 +00:00
Ted Kremenek a50d98565f Implemented some branch pruning in GRConstants using != and == for
constant integers.

llvm-svn: 46581
2008-01-30 23:03:39 +00:00
Ted Kremenek 1564763b8e Added method "printTerminator" to CFGBlock so that external clients can
pretty-print a block's terminator.

When building CFGs, for IfStmts ('if'), we no longer add the ParenExpr
that is the subexpression of the IfStmt to the CFG; instead we add its
first descendant subexpression that is not a ParenExpr.

llvm-svn: 46580
2008-01-30 23:02:42 +00:00
Evan Cheng b9b740119d Fixed a bug in MergeValueInAsValue() pointed out by David Greene. Replace val# with previous liverange's.
llvm-svn: 46579
2008-01-30 22:44:55 +00:00
Steve Naroff 2a2c5b98ee Fix test case and add a FIXME.
llvm-svn: 46577
2008-01-30 21:50:43 +00:00
Lauro Ramos Venancio 86b99c1b79 getLLVMFieldNo can't be called before emitting the base value.
llvm-svn: 46576
2008-01-30 21:23:20 +00:00
Lauro Ramos Venancio f5291d2871 A pointer to an opaque type is an "opaque type definition".
llvm-svn: 46575
2008-01-30 21:21:08 +00:00
Chris Lattner 8f39876ac3 On an unexpected @foo keyword, return failure instead of a 'successful' null AST. This fixes a segfault
on things like @foo.

llvm-svn: 46574
2008-01-30 21:20:25 +00:00
Nate Begeman 936b207407 Implement first round of feedback on __builtin_overload
llvm-svn: 46572
2008-01-30 20:50:20 +00:00
Evan Cheng a3395a61cc Treat the label for the first @llvm.dbg.stoppoint the same way as the dbg_func_start label. Make sure nothing else is inserted before them.
Note this solution might be somewhat fragile since ISD::LABEL may be used for other
purposes. If that ends up to be an issue, we may need to introduce a different node
for debug labels.

llvm-svn: 46571
2008-01-30 20:08:35 +00:00
Fariborz Jahanian ca2565ce9a Typo.
llvm-svn: 46570
2008-01-30 20:03:29 +00:00
Dale Johannesen 19cf69ff9d Adjust loop per review feedback.
llvm-svn: 46569
2008-01-30 19:44:39 +00:00
Evan Cheng a3ff8e6110 A semi-gross fix for a debug info issue. When inserting the "function start" label (i.e. first label in the entry block) take care to insert it at the beginning of the block.
llvm-svn: 46568
2008-01-30 19:35:32 +00:00
Devang Patel 540d03bda9 Supply appropriate arch info to darwin assembler.
llvm-svn: 46567
2008-01-30 19:19:31 +00:00
Steve Naroff 7b3579b8de Abolish a bunch of Xcode inserted tabs.
llvm-svn: 46566
2008-01-30 19:17:43 +00:00
Dale Johannesen 56d4903db5 Accept getelementptr starting at GV with all 0 indices as a
legitimate way of representing global variable GV in debug info.

llvm-svn: 46565
2008-01-30 19:00:21 +00:00
Ted Kremenek 90962af0e8 Minor cosmetic cleanups: replaced some integer literals with constants and
more cleanups with pretty-printing of analysis results.

llvm-svn: 46564
2008-01-30 18:54:06 +00:00
Devang Patel ebde4b34aa Always put version numbers at the end because they are optional.
llvm-svn: 46563
2008-01-30 18:30:11 +00:00
Evan Cheng 29cfb67e28 Even though InsertAtEndOfBasicBlock is an ugly hack it still deserves a proper name. Rename it to EmitInstrWithCustomInserter since it does not necessarily insert
instruction at the end.

llvm-svn: 46562
2008-01-30 18:18:23 +00:00
Devang Patel 57412cacb6 Add TODO marker so that it is easier to search.
llvm-svn: 46561
2008-01-30 18:00:07 +00:00
Devang Patel b432c9e866 Enable exception handling if it is supported.
llvm-svn: 46560
2008-01-30 17:43:03 +00:00
Eli Friedman 3780d35306 Ignore __aligned__ with zero arguments in addition to __aligned__ with
one argument.  Lets stuff using pthread.h compile.

llvm-svn: 46559
2008-01-30 17:38:42 +00:00
Fariborz Jahanian 049fa58d0d Fixed misc. issues raised by Chris L. on @synchronized implementation.
llvm-svn: 46558
2008-01-30 17:38:29 +00:00
Eli Friedman 1bc0fed9a5 Fix codegen for conditionals with incommpatible pointer types. Code
that causes this isn't really correct, but if we're going to accept 
this, it should come up with a consistent AST.

llvm-svn: 46557
2008-01-30 17:02:03 +00:00
Dan Gohman 02b6792dd4 Add a new PseudoSourceValue class, which will be used to help track
memory reference information in the backend. Most of this was written by
Florian Brander, cleanup and updating to TOT by me.

llvm-svn: 46556
2008-01-30 16:35:31 +00:00
Nick Lewycky 6b016703a9 Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty.

llvm-svn: 46555
2008-01-30 08:01:28 +00:00
Nick Lewycky 625e89c8b0 Use empty() instead of comparing size() with zero.
llvm-svn: 46554
2008-01-30 07:54:16 +00:00
Nick Lewycky 0e3a5cb14a Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
llvm-svn: 46553
2008-01-30 07:45:37 +00:00