Commit Graph

41285 Commits

Author SHA1 Message Date
Ted Kremenek f3a4b9617e Major cleanup of the transfer function logic for '&&', '||', and '?'. We
now store in the state essentially which branch we took.  This removes
a bunch of bogus assumptions (and likely bugs), reduces the complexity of
the implementation, and facilitates more optimizations.

llvm-svn: 47613
2008-02-26 19:05:15 +00:00
Dan Gohman 9db0aa86d9 Avoid aborting on invalid shift counts.
llvm-svn: 47612
2008-02-26 18:50:50 +00:00
Devang Patel c38eb52787 Unify to ReturnInst::init() member functions.
llvm-svn: 47611
2008-02-26 18:49:29 +00:00
Eli Friedman 666bbe34f4 Fix for pr2093: direct operands aren't necessarily addresses, so don't
try to simplify them.

llvm-svn: 47610
2008-02-26 18:37:49 +00:00
Lauro Ramos Venancio c9fbd7301a Convert x86 target specific inline asm constraints to LLVM.
llvm-svn: 47609
2008-02-26 18:33:46 +00:00
Chris Lattner a39cff3aaa fix this test so that the fn name doesn't match the regex
llvm-svn: 47608
2008-02-26 18:13:51 +00:00
Devang Patel ae682fb940 Optimize most common case by using single RetVal in ReturnInst.
llvm-svn: 47607
2008-02-26 17:56:20 +00:00
Arnold Schwaighofer 1f17bf6171 Correct function comments.
llvm-svn: 47606
2008-02-26 17:50:59 +00:00
Chris Lattner 07c83cc86e Fix PR2096, a regression introduced with my patch last night. This
also fixes cfrac, flops, and 175.vpr

llvm-svn: 47605
2008-02-26 17:09:59 +00:00
Gabor Greif 3d9755f6ca Really feed llvm-as with the testcase, do not let it read from stdin. This fixes the hangs seen on solaris10.
llvm-svn: 47604
2008-02-26 13:37:13 +00:00
Gabor Greif 0a43601153 unbreak check-one
by supplying a dummy
"verbose" procedure

llvm-svn: 47603
2008-02-26 13:27:49 +00:00
Gabor Greif d5691031f5 While hunting for two hanging tests,
(on solaris10, which are:
  CodeGen/PowerPC/frounds.ll
  Transforms/InstCombine/2008-02-23-MulSub.ll)

I needed a tool to figure out which one is the guilty.

To this end I have added a verbosity
option to the test/Makefile.

It can be invoked thus:

gmake check TESTSUITE=CodeGen/PowerPC VERBOSE="-v -v"

(The number of "-v"s specifies the verbosity level.
 Instead of "-v" other aliases can be specified,
 please consult the dejagnu docs for info.)

At level >= 2 following line is logged for each
test, before running it:

ABOUT TO RUN: <test>.ll

llvm-svn: 47602
2008-02-26 12:08:55 +00:00
Duncan Sands 7cdbbfd067 Fix a nasty bug in LegalizeTypes (spotted in
CodeGen/PowerPC/illegal-element-type.ll): suppose
a node X is processed, and processing maps it to
a node Y.  Then X continues to exist in the DAG,
but with no users.  While processing some other
node, a new node may be created that happens to
be equal to X, and thus X will be reused rather
than a truly new node.  This can cause X to
"magically reappear", and since it is in the
Processed state in will not be reprocessed, so
at the end of type legalization the illegal node
X can still be present.  The solution is to replace
X with Y whenever X gets resurrected like this.

llvm-svn: 47601
2008-02-26 11:21:42 +00:00
Bill Wendling 80d6b87934 De-tabify
llvm-svn: 47600
2008-02-26 10:57:23 +00:00
Bill Wendling d188e03715 De-tabify.
llvm-svn: 47599
2008-02-26 10:53:30 +00:00
Bill Wendling 7bb51dfbb1 De-tabify.
llvm-svn: 47598
2008-02-26 10:51:52 +00:00
Bill Wendling 293285f883 Detabify
llvm-svn: 47597
2008-02-26 10:49:39 +00:00
Bill Wendling 8ff4320071 Detabify.
llvm-svn: 47596
2008-02-26 10:46:10 +00:00
Bill Wendling e65d2afdb1 De-tabify.
llvm-svn: 47595
2008-02-26 10:45:29 +00:00
Arnold Schwaighofer 69a10f4112 Add support for intermodule tail calls on x86/32bit with
GOT-style position independent code. Before only tail calls to
protected/hidden functions within the same module were optimized.
Now all function calls are tail call optimized.

llvm-svn: 47594
2008-02-26 10:21:54 +00:00
Arnold Schwaighofer b01b99ec78 Change the lowering of arguments for tail call optimized
calls. Before arguments that could overwrite each other were
explicitly lowered to a stack slot, not giving the register allocator
a chance to optimize. Now a sequence of copyto/copyfrom virtual
registers ensures that arguments are loaded in (virtual) registers
before they are lowered to the stack slot (and might overwrite each
other). Also parameter stack slots are marked mutable for
(potentially) tail calling functions.

llvm-svn: 47593
2008-02-26 09:19:59 +00:00
Evan Cheng 2ff0b0e681 This is possible:
vr1 = extract_subreg vr2, 3
...
vr3 = extract_subreg vr1, 2
The end result is vr3 is equal to vr2 with subidx 2.

llvm-svn: 47592
2008-02-26 08:03:41 +00:00
Chris Lattner e7c14013f5 Fix isNegatibleForFree to not return true for ConstantFP nodes
after legalize.  Just because a constant is legal (e.g. 0.0 in SSE) 
doesn't mean that its negated value is legal (-0.0).  We could make
this stronger by checking to see if the negated constant is actually
legal post negation, but it doesn't seem like a big deal.

llvm-svn: 47591
2008-02-26 07:04:54 +00:00
Ted Kremenek ce3563445c Fixed inverted condition.
llvm-svn: 47590
2008-02-26 03:44:25 +00:00
Evan Cheng 1da250097b Fix PR2076. CodeGenPrepare now sinks address computation for inline asm memory
operands into inline asm block.

llvm-svn: 47589
2008-02-26 02:42:37 +00:00
Ted Kremenek 5affb58dd6 Do include ParenExpr in the CFG; only include their subexpression.
llvm-svn: 47588
2008-02-26 02:37:08 +00:00
Evan Cheng ccc0c996a4 Refactor inline asm constraint matching code out of SDIsel into TargetLowering.
llvm-svn: 47587
2008-02-26 02:33:44 +00:00
Ted Kremenek 06b671097d Added lazy "symbolication" of parameter variables and global variables.
Added recording of divide-by-zero and divide-by-uninitialized nodes.

llvm-svn: 47586
2008-02-26 02:15:56 +00:00
Devang Patel 443018e55e Remove debugging help.
llvm-svn: 47585
2008-02-26 01:42:38 +00:00
Nick Kledzik 7d870df864 test svn commit capability
llvm-svn: 47584
2008-02-26 01:36:52 +00:00
Devang Patel bbfd874cb4 Update bitcode reader and writer to handle multiple return values.
Take 2.

llvm-svn: 47583
2008-02-26 01:29:32 +00:00
Chris Lattner b7e656b177 add parsing, ast building and pretty printing support for C++ throw expressions.
Patch by Mike Stump!

llvm-svn: 47582
2008-02-26 00:51:44 +00:00
Chris Lattner 7768313c13 Fix PR2092 by making sure the sign of the enum value follows the
sign of its type in the early exit case.  No testcase, because this
doesn't manifest as a failure.

llvm-svn: 47581
2008-02-26 00:33:57 +00:00
Chris Lattner a3343a86ea fix const correctness.
llvm-svn: 47580
2008-02-26 00:32:36 +00:00
Ted Kremenek f699882a76 Fixed bug in CFG construction when a CompoundStmt ended with a NullStmt.
This caused the whole body to get dropped from the CFG.

llvm-svn: 47579
2008-02-26 00:22:58 +00:00
Ted Kremenek 733f810600 Added FIXME.
llvm-svn: 47578
2008-02-26 00:20:52 +00:00
Devang Patel 767338ccec Pass const vectors by reference.
llvm-svn: 47577
2008-02-26 00:12:13 +00:00
Eli Friedman ad7d8edeeb Add missing include (for ptrdiff_t).
llvm-svn: 47576
2008-02-25 23:35:32 +00:00
Dan Gohman a790af3a88 Revert the assert for MUL_LOHI with an unused high result; Chris
pointed out that this isn't correct at -O0.

llvm-svn: 47575
2008-02-25 22:43:48 +00:00
Andrew Lenharth dddb68c63a when making bytecode modules, link as library
llvm-svn: 47574
2008-02-25 22:41:55 +00:00
Dale Johannesen 65b404d61c Revise previous patch per review.
llvm-svn: 47573
2008-02-25 22:29:22 +00:00
Ted Kremenek 7845b2607a Minor bug fix in LiveVariables: don't "kill" decls referenced by a DeclStmt
that aren't VarDecls.

llvm-svn: 47572
2008-02-25 22:28:54 +00:00
Dan Gohman 8c7a9228de Factor the assert for indexed loads/stores out of LoadSDNode
and StoreSDNode into LSBaseSDNode.

llvm-svn: 47570
2008-02-25 22:16:29 +00:00
Dan Gohman 0be2f3b941 Add an assert to verify that we don't see an
{S,U}MUL_LOHI with an unused high value.

llvm-svn: 47569
2008-02-25 22:15:55 +00:00
Eli Friedman 0992b38a78 Fix a little typo... per cfe-dev, this was apparently causing test
failures on OS X in some cases.  (Thank you valgrind.)

llvm-svn: 47568
2008-02-25 22:11:40 +00:00
Dan Gohman 2ff975e749 Remove the hack that turned an {S,U}MUL_LOHI with an unused high
result into a MUL late in the X86 codegen process. ISD::MUL is
once again Legal on X86, so this is no longer needed. And, the
hack was suboptimal; see PR1874 for details.

llvm-svn: 47567
2008-02-25 21:57:04 +00:00
Dan Gohman 432e4a6742 Make some static variables const.
llvm-svn: 47566
2008-02-25 21:39:34 +00:00
Chris Lattner f5c619f98c clarify comment, this is undefined behavior in any case, even if it only
bits VC++ right now.

llvm-svn: 47565
2008-02-25 21:38:21 +00:00
Ted Kremenek 3ed28de5cc doxygenify some comments.
llvm-svn: 47564
2008-02-25 21:33:32 +00:00
Chris Lattner 0f5a7ddc39 add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar
llvm-svn: 47563
2008-02-25 21:28:46 +00:00