Chris Lattner
00d7cb9942
llvm.sqrt(-0.0) is defined.
...
llvm-svn: 46500
2008-01-29 07:00:44 +00:00
Chris Lattner
17819d971e
eliminate additions of 0.0 when they are obviously dead. This has to be careful to
...
avoid turning -0.0 + 0.0 -> -0.0 which is incorrect.
llvm-svn: 46499
2008-01-29 06:52:45 +00:00
Owen Anderson
95bf1d4d7b
Add a testcase for eliminating memcpy's at the end of functions. Forgot to commit this with my last commit.
...
llvm-svn: 46497
2008-01-29 06:40:32 +00:00
Chris Lattner
f4e5e556fd
Add target triples to these so they don't fail on linux.
...
llvm-svn: 46496
2008-01-29 06:26:07 +00:00
Duncan Sands
05837edae7
Use getPreferredAlignmentLog or getPreferredAlignment
...
to get the alignment of global variables, rather than
using hand-made versions.
llvm-svn: 46495
2008-01-29 06:23:44 +00:00
Owen Anderson
48d37806e2
Add support for eliminating memcpy's at the end of functions. Also fix some errors I noticed in
...
the handling of eliminating stores to byval arguments.
llvm-svn: 46494
2008-01-29 06:18:36 +00:00
Duncan Sands
1e7ec74ad3
This would be better done as an executable test.
...
llvm-svn: 46493
2008-01-29 06:04:54 +00:00
Duncan Sands
aaaeee2ac0
After recent changes we fail to optimize this test
...
sufficiently to have it pass. I'm removing it from
the testsuite and adding it to PR452 instead.
llvm-svn: 46492
2008-01-29 05:57:23 +00:00
Ted Kremenek
75bc4cd620
Fixed bug where not all dead subexpressions were being pruned from the analysis
...
state.
llvm-svn: 46491
2008-01-29 05:25:31 +00:00
Ted Kremenek
8ff7705a6c
Modified LiveVariables to perform all of its base initialization in the ctor,
...
and now we require a FunctionDecl* object so that we can also keep track of
all of the ParmDecls.
Modified clients of LiveVariables to conform to the new interface.
llvm-svn: 46490
2008-01-29 05:13:23 +00:00
Steve Naroff
31daee11be
Tweak Sema::DefaultArgumentPromotion() to call UsualUnaryConversions(). This makes sure function calls that don't have a prototype get the default function/array conversion.
...
Patch by Eli Friedman!
llvm-svn: 46489
2008-01-29 02:42:22 +00:00
Owen Anderson
5aa1615add
RegAllocBigBlock doesn't need LiveVariables either.
...
llvm-svn: 46488
2008-01-29 02:32:13 +00:00
Scott Michel
167502a508
Fix to bug 1951: tblgen gratuitously renames variables when no temporary was
...
generated. This feature would only show up in fairly complex patterns, such
as this one in CellSPU:
def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)),
(IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>;
which generated the following emit code:
SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE {
SDOperand N0 = N.getOperand(0);
SDOperand N00 = N0.getOperand(0);
SDOperand N01 = N0.getOperand(1);
SDOperand N1 = N.getOperand(1);
SDOperand N10 = N1.getOperand(0);
SDOperand N11 = N1.getOperand(1);
SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0);
return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */
}
Tested against the test suites without incident.
llvm-svn: 46487
2008-01-29 02:29:31 +00:00
Nate Begeman
ef33767efb
Properly expand extract-element for non-power-of-2 codegen
...
llvm-svn: 46486
2008-01-29 02:24:00 +00:00
Dale Johannesen
2b3bc30420
Handle 'X' constraint in asm's better.
...
llvm-svn: 46485
2008-01-29 02:21:21 +00:00
Devang Patel
67fa0521b6
Filter loops that subtract induction variables.
...
These loops are not yet handled.
Fix PR 1912.
llvm-svn: 46484
2008-01-29 02:20:41 +00:00
Scott Michel
ceae3bbf4d
Overhaul Cell SPU's addressing mode internals so that there are now
...
only two addressing mode nodes, SPUaform and SPUindirect (vice the
three previous ones, SPUaform, SPUdform and SPUxform). This improves
code somewhat because we now avoid using reg+reg addressing when
it can be avoided. It also simplifies the address selection logic,
which was the main point for doing this.
Also, for various global variables that would be loaded using SPU's
A-form addressing, prefer D-form offs[reg] addressing, keeping the
base in a register if the variable is used more than once.
llvm-svn: 46483
2008-01-29 02:16:57 +00:00
Anders Carlsson
ce0740e1f5
Handle binary or in constant expressions.
...
llvm-svn: 46482
2008-01-29 01:33:32 +00:00
Anders Carlsson
0674a7417f
Correctly handle constants that refer to enums.
...
llvm-svn: 46481
2008-01-29 01:28:48 +00:00
Anders Carlsson
6f2a10e8c9
Correctly handle scalars in braces.
...
llvm-svn: 46480
2008-01-29 01:15:48 +00:00
Devang Patel
7bcf58f8a4
New test.
...
llvm-svn: 46479
2008-01-29 01:10:04 +00:00
Ted Kremenek
e3d965f4b1
Added skeleton code for tracking the values of function parameters.
...
llvm-svn: 46477
2008-01-29 00:43:03 +00:00
Bill Wendling
f0b7d4993f
Add test to make sure that #pragma mark/error doesn't error if there are
...
unbalanced quotes.
llvm-svn: 46476
2008-01-29 00:41:29 +00:00
Ted Kremenek
997d872375
Driver now passes the top-level FunctionDecl* to GRConstants.
...
Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext,
and the top-level FunctionDecl into ExplodedGraphImpl.
llvm-svn: 46475
2008-01-29 00:33:40 +00:00
Steve Naroff
f06b5ba047
Fix bz1950. ASTContext::functionTypesAreCompatible() needs to operate on the unqualified parameter types (per C99 6.7.5.3p15).
...
llvm-svn: 46472
2008-01-29 00:15:50 +00:00
Ted Kremenek
64d9524dcb
Added RValue class "UninitializedValue".
...
llvm-svn: 46471
2008-01-28 22:51:57 +00:00
Ted Kremenek
fe9cf4f38b
Added transfer function logic for "%=" operator.
...
llvm-svn: 46470
2008-01-28 22:28:54 +00:00
Ted Kremenek
7e67036f2f
Added transfer function hookups for "modulo" operator.
...
llvm-svn: 46468
2008-01-28 22:26:15 +00:00
Ted Kremenek
5b8cd80897
Minor tweaking with hierarchy of NonLValue objects: SymbolValue is
...
now SymbolicNonLValue.
Cleaned up some casts.
llvm-svn: 46467
2008-01-28 22:25:21 +00:00
Ted Kremenek
17a739681c
Some additional cleanups with method names.
...
Renamed ExprValue to RValue, as all expression values are RValues, and this
keeps with the C terminology (renamed old "RValue" class to "NonLValue").
Introduced "ConcreteInt", a class that represents a concrete, integer
constant as an RValue.
Temporarily removed classes to represent set of possible constants and set of !=
constants. Will replace with a more general class representing a set of
constraints.
Added some foundational code to track "symbolic" values, which are used to
accrue constraints on an abstract value that is shared between multiple
variables. e.g:
x = y; // at this point "x" and "y" share the same "value"
if (x > 1)
... // at this point, the value shared by "x" and "y" is "> 1".
llvm-svn: 46466
2008-01-28 22:09:13 +00:00
Ted Kremenek
9fd577a22c
Added destructor for template class FoldingSetNodeWrapper.
...
Added getValue() to FoldingSetNodeWrapper.
llvm-svn: 46465
2008-01-28 22:05:23 +00:00
Steve Naroff
1f7f6929f4
Implement "private extern" on function decls!
...
llvm-svn: 46464
2008-01-28 21:57:15 +00:00
Steve Naroff
909651a6ed
Add -Wno-rewrite-macros to silence the following warning when using -rewrite-test:
...
xx.m:10:3: warning: rewriting sub-expression within a macro (may not be correct)
llvm-svn: 46462
2008-01-28 21:34:52 +00:00
Lauro Ramos Venancio
0f54a09163
Simplify the code and fix a typo.
...
llvm-svn: 46458
2008-01-28 20:02:51 +00:00
Duncan Sands
2a80ba8c7c
Pure/const functions with ByVal parameters cannot
...
be marked readonly either.
llvm-svn: 46456
2008-01-28 19:25:47 +00:00
Lauro Ramos Venancio
99929d20e7
Fix fpcmp infinite loop when comparing "29-266" with "29-268".
...
llvm-svn: 46455
2008-01-28 18:23:23 +00:00
Chris Lattner
a116071547
this test is now compiled into the right thing.
...
llvm-svn: 46454
2008-01-28 17:38:46 +00:00
Duncan Sands
9f6f4d39f7
Unbreak builds with differing object and source
...
directories. Patch by Sam Bishop.
llvm-svn: 46453
2008-01-28 17:38:30 +00:00
Duncan Sands
54af54fe08
Make this more likely to be passed byval.
...
llvm-svn: 46451
2008-01-28 10:35:11 +00:00
Bill Wendling
96a1b810ec
If the function has no machine instructions, then emit a "nop" so that
...
the function label isn't associated with something it shouldn't be.
llvm-svn: 46449
2008-01-28 09:15:03 +00:00
Chris Lattner
a8b4a56061
Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman.
...
llvm-svn: 46433
2008-01-28 04:41:43 +00:00
Chris Lattner
6379fc68ff
reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE
...
output. Patch contributed by Sam Bishop!
llvm-svn: 46432
2008-01-28 04:18:41 +00:00
Nick Lewycky
8ea81e8ba4
Handle some more combinations of extend and icmp. Fixes PR1940.
...
llvm-svn: 46431
2008-01-28 03:48:02 +00:00
Steve Naroff
aeb6b30f64
Fix a bug with struct initializers (in Sema::CheckInitializerListTypes()).
...
Test case included from bz1948 (thanks Neil!).
Also fixed an 80 column violation...
llvm-svn: 46430
2008-01-28 02:00:41 +00:00
Chris Lattner
710b441174
Fix PR1932 by disabling an xform invalid for fdiv.
...
llvm-svn: 46429
2008-01-28 00:58:18 +00:00
Chris Lattner
2f2427e5aa
make handling of overflow and undefined results much more clear.
...
Patch by Eli Friedman, thanks!
llvm-svn: 46428
2008-01-28 00:36:27 +00:00
Chris Lattner
1b706dd680
Fix PR1938 by forcing the code that uses an undefined value to branch one
...
way or the other. Rewriting the code itself prevents subsequent analysis
passes from making contradictory conclusions about the code that could
cause an infeasible path to be made feasible.
llvm-svn: 46427
2008-01-28 00:32:30 +00:00
Chris Lattner
02bf44436f
Make -o work with -E, patch contributed by Shantonu Sen!
...
llvm-svn: 46426
2008-01-27 23:55:11 +00:00
Chris Lattner
9422fb70fe
Always for PACKAGEVERSION to 'mainline' for teh llvm web page.
...
llvm-svn: 46425
2008-01-27 23:43:26 +00:00
Chris Lattner
2ee91f4300
Fix PowerPC/./2007-10-18-PtrArithmetic.ll
...
llvm-svn: 46424
2008-01-27 23:32:17 +00:00