Benjamin Kramer
16634c2c5a
Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.
...
llvm-svn: 90033
2009-11-28 10:07:24 +00:00
Benjamin Kramer
435ef9b383
Remove unneeded includes.
...
llvm-svn: 90032
2009-11-28 09:41:31 +00:00
Kovarththanan Rajaratnam
b1034f7a24
Don't call exit(). llvm::llvm_report_error() will do just that
...
llvm-svn: 90031
2009-11-28 09:11:46 +00:00
Alexis Hunt
ed0530f694
Fix test and handle IK_LiteralOperatorId in a few more places.
...
llvm-svn: 90030
2009-11-28 08:58:14 +00:00
Kovarththanan Rajaratnam
15e9a9df83
Move program actions implications to clang::InitializeFrontendOptions which already contains such logic.
...
llvm-svn: 90029
2009-11-28 07:52:34 +00:00
Kovarththanan Rajaratnam
65c6566b5b
lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespace
...
llvm-svn: 90028
2009-11-28 06:07:30 +00:00
Alexis Hunt
344585006c
Add Parser support for C++0x literal operators ('operator "" i').
...
DeclarationName can't handle them yet, so right now Parser just errors out on them.
llvm-svn: 90027
2009-11-28 04:44:28 +00:00
Eli Friedman
c9e3e6ff29
Tests now pass with the assertion.
...
llvm-svn: 90026
2009-11-28 03:35:45 +00:00
Eli Friedman
78910a508a
Add a much more thorough test of casts to virtual bases, and fix
...
GetCXXBaseClassOffset to actually pass the test.
llvm-svn: 90025
2009-11-28 03:31:34 +00:00
Anders Carlsson
548cc9d143
We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.
...
llvm-svn: 90024
2009-11-28 03:03:52 +00:00
Anders Carlsson
182498df65
Add an iterator for walking the primary base chain.
...
llvm-svn: 90023
2009-11-28 00:50:23 +00:00
Chris Lattner
cf0b198827
disable value insertion for now, I need to figure out how
...
to inform GVN about the newly inserted values. This fixes
PR5631.
llvm-svn: 90022
2009-11-27 22:50:07 +00:00
Anders Carlsson
d598850203
Move the vtable builder to an anonymous namespace.
...
llvm-svn: 90021
2009-11-27 22:21:51 +00:00
Anders Carlsson
a30c0d3ace
Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!
...
llvm-svn: 90020
2009-11-27 22:14:40 +00:00
Chris Lattner
2be52e72ae
Rework InsertPHITranslatedPointer to handle the recursive case, this
...
fixes PR5630 and sets the stage for the next phase of goodness (testcase
pending).
llvm-svn: 90019
2009-11-27 22:05:15 +00:00
Anders Carlsson
03ff379911
Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.
...
llvm-svn: 90018
2009-11-27 22:05:05 +00:00
Anders Carlsson
f942ee0297
Don't build the entire vtable when all we want is the index of a virtual method.
...
llvm-svn: 90017
2009-11-27 20:47:55 +00:00
Chris Lattner
4ee17e1482
recursively phi translate bitcast operands too, for consistency.
...
llvm-svn: 90016
2009-11-27 20:25:30 +00:00
Nick Lewycky
6e0525141f
Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias Grosser
...
for pointing this out.
llvm-svn: 90015
2009-11-27 19:57:53 +00:00
Chris Lattner
d141f885a1
I accidentally implemented this :)
...
llvm-svn: 90014
2009-11-27 19:56:00 +00:00
Chris Lattner
2f0354ecf0
add support for recursive phi translation and phi
...
translation of add with immediate. This allows us
to optimize this function:
void test(int N, double* G) {
long j;
G[1] = 1;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
to only do one load every iteration of the loop.
llvm-svn: 90013
2009-11-27 19:11:31 +00:00
Chris Lattner
e66f84e012
add two simple test cases we now optimize (to one load in the loop each) and one we don't (corresponding to the fixme I added yesterday).
...
llvm-svn: 90012
2009-11-27 18:08:30 +00:00
Chris Lattner
3d9823b9cf
factor some logic out of instcombine into a new SimplifyAddInst method.
...
llvm-svn: 90011
2009-11-27 17:42:22 +00:00
Chris Lattner
83a4a9868f
add a deadargelim note.
...
llvm-svn: 90009
2009-11-27 17:12:30 +00:00
Chris Lattner
ca9e0e83b3
This testcase is actually only partially redundant, and requires
...
the FIXME I added yesterday to be implemented.
llvm-svn: 90008
2009-11-27 16:53:57 +00:00
Chris Lattner
2226db66ab
fix PR5436 by making the 'simple' case of SRoA not promote out of range
...
array indexes. The "complex" case of SRoA still handles them, and correctly.
This fixes a weirdness where we'd correctly avoid transforming A[0][42] if
the 42 was too large, but we'd only do it if it was one gep, not two separate
ones.
llvm-svn: 90007
2009-11-27 16:37:41 +00:00
Chris Lattner
92ba18e9e4
filecheckize
...
llvm-svn: 90006
2009-11-27 16:31:59 +00:00
Duncan Sands
b56334b4f2
While this test is testing a problem in the generic part of codegen,
...
the problem only shows for msp430 and pic16 which is why it specifies
them using -march. But it is wrong to put such tests in CodeGen/Generic,
since not everyone builds these targets. Put a copy of the test in each
of the target test directories.
llvm-svn: 90005
2009-11-27 16:04:14 +00:00
Duncan Sands
31c0e0ee35
Vector types are no longer required to have a power-of-two length.
...
llvm-svn: 90004
2009-11-27 13:38:03 +00:00
Duncan Sands
ee7425cc56
These code generator limitations have been removed.
...
llvm-svn: 90003
2009-11-27 12:33:22 +00:00
Chris Lattner
6d294de548
add comment.
...
llvm-svn: 90002
2009-11-27 08:40:14 +00:00
Chris Lattner
ac323297e0
reduce nesting, no functionality change.
...
llvm-svn: 90001
2009-11-27 08:37:22 +00:00
Chris Lattner
8e62d0a93d
limit the recursion depth of GetLinearExpression. This
...
fixes a crash analyzing consumer-lame, which had an "%X = add %X, 1"
in unreachable code.
llvm-svn: 90000
2009-11-27 08:32:52 +00:00
Daniel Dunbar
c9bc8708d2
Fix typo, thanks Sebastian!
...
llvm-svn: 89999
2009-11-27 08:26:07 +00:00
Daniel Dunbar
cc0ba6a9d6
Simplify.
...
llvm-svn: 89998
2009-11-27 08:26:00 +00:00
Chris Lattner
25be93dfed
teach GVN's load PRE to insert computations of the address in predecessors
...
where it is not available. It's unclear how to get this inserted
computation into GVN's scalar availability sets, Owen, help? :)
llvm-svn: 89997
2009-11-27 08:25:10 +00:00
Chris Lattner
41a5bba4e0
add some tests for memdep phi translation + PRE.
...
llvm-svn: 89996
2009-11-27 06:42:42 +00:00
Chris Lattner
fa76d23c1d
this test is failing, and is expected to.
...
llvm-svn: 89995
2009-11-27 06:36:28 +00:00
Chris Lattner
4f1552bde7
filecheckize
...
llvm-svn: 89994
2009-11-27 06:33:09 +00:00
Chris Lattner
66426c70e6
rename test.
...
llvm-svn: 89993
2009-11-27 06:31:55 +00:00
Chris Lattner
a9a76ccf56
Fix phi translation in load PRE to agree with the phi
...
translation done by memdep, and reenable gep translation
again.
llvm-svn: 89992
2009-11-27 06:31:14 +00:00
Chris Lattner
b018bda665
redisable this, my bootstrap worked because it wasn't an optimized build, whoops.
...
llvm-svn: 89991
2009-11-27 05:53:01 +00:00
Chris Lattner
fb8a718fc3
try again.
...
llvm-svn: 89990
2009-11-27 05:19:56 +00:00
Eli Friedman
2adc9abd51
Some member pointer casting tests.
...
llvm-svn: 89989
2009-11-27 04:56:40 +00:00
Eli Friedman
7eb0ccaa58
Add case for CK_DerivedToBaseMemberPointer cast kind to
...
AggExprEmitter::VisitCastExpr.
llvm-svn: 89988
2009-11-27 04:46:20 +00:00
Eli Friedman
e96f1d3b2f
More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
...
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.
The change in SemaExprCXX makes sure the cast kinds are getting set correctly.
llvm-svn: 89987
2009-11-27 04:41:50 +00:00
Eli Friedman
0dfc6804ff
Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.
...
llvm-svn: 89986
2009-11-27 02:07:44 +00:00
Chris Lattner
14444f5c1a
this is causing buildbot failures, disable for now.
...
llvm-svn: 89985
2009-11-27 01:52:22 +00:00
Eli Friedman
250534cf9a
Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that
...
we check whether the vtable needs to be generated.
llvm-svn: 89984
2009-11-27 01:42:12 +00:00
Anders Carlsson
5a4f772bc8
Fix thinko.
...
llvm-svn: 89983
2009-11-27 01:26:58 +00:00