Anders Carlsson
9a97e2ef95
Add the thunks needed by this vtable.
...
llvm-svn: 99793
2010-03-29 01:38:05 +00:00
Anders Carlsson
848d86e5c4
Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully.
...
llvm-svn: 99792
2010-03-29 01:28:05 +00:00
Anders Carlsson
948d3f4ec6
Fix another thinko, so that flags don't depend on previous bases.
...
llvm-svn: 99791
2010-03-29 01:16:41 +00:00
Anders Carlsson
74d7dfcf8e
When generating base ctors/dtors, we need to lookup virtual bases using the vtable.
...
llvm-svn: 99790
2010-03-29 01:14:25 +00:00
Johnny Chen
c86256fa5d
Add NVTBLFrm to represent A8.6.406 VTBL, VTBX Vector Table Lookup Instructions.
...
These instructions use byte index in a control vector (M:Vm) to lookup byte
values in a table and generate a new vector (D:Vd). The table is specified via
a list of vectors, which can be:
{Dn}
{Dn D<n+1>}
{Dn D<n+1> D<n+2>}
{Dn D<n+1> D<n+2> D<n+3>}
llvm-svn: 99789
2010-03-29 01:14:22 +00:00
Anders Carlsson
27d86bddfe
Fix thinko.
...
llvm-svn: 99788
2010-03-29 01:12:13 +00:00
Anders Carlsson
5889027ccc
Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)
...
llvm-svn: 99787
2010-03-29 01:08:49 +00:00
Anders Carlsson
8baeaf0a26
Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.
...
llvm-svn: 99786
2010-03-29 01:04:16 +00:00
Rafael Espindola
3e69c3ed31
Make default arguments to getFunctionNoProtoType an all or nothing option (as they already are in practise).
...
llvm-svn: 99785
2010-03-28 22:48:23 +00:00
Rafael Espindola
2ac0582419
Drop default arguments no one is using.
...
llvm-svn: 99783
2010-03-28 22:19:17 +00:00
Devang Patel
1e8ccb5f8b
Revert 99772.
...
llvm-svn: 99778
2010-03-28 21:23:37 +00:00
Anders Carlsson
d589593c93
Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)
...
llvm-svn: 99777
2010-03-28 21:07:49 +00:00
Anders Carlsson
fcc9f91287
Looks like I broke self-host again :(.
...
llvm-svn: 99776
2010-03-28 20:55:21 +00:00
Anders Carlsson
74eab715ae
More improvements to setting the vtable pointer. We now no longer set the vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.
...
llvm-svn: 99775
2010-03-28 20:34:31 +00:00
Chris Lattner
03719af41d
add a statistic for the # times isel has to backtrack.
...
llvm-svn: 99774
2010-03-28 19:46:56 +00:00
Anders Carlsson
e87fae9afa
Factor vtable pointer setting code out into a separate function.
...
llvm-svn: 99773
2010-03-28 19:40:00 +00:00
Devang Patel
32bdaef3fe
Refactoring. Push DILocation processing in to DwarfDebug from AsmPrinter.
...
llvm-svn: 99772
2010-03-28 18:57:09 +00:00
Chris Lattner
11f85ccf7d
zap an extra line that Eli noticed!
...
llvm-svn: 99770
2010-03-28 18:52:28 +00:00
Anton Korobeynikov
c2747d068e
Properly quote the quotes :) during cmdline construction on Windows.
...
Otherwise, e.g. in the invocation like clang -DFOO=\"bar\" FOO macro
got the bar value, not "bar".
Patch by Alexander Esilevich!
llvm-svn: 99763
2010-03-28 15:07:02 +00:00
Torok Edwin
07f0adc2a6
Fix use-of-uninitialized value when RWX memory can't be allocated (PR6701).
...
SELinux doesn't allow 'execmem', returning MAP_FAILED and 'Permission denied'
for mmap or RWX memory. In this case AllocateRWX was returning a MemoryBlock
with uninitialized fields, which sometimes caused crashes.
This patch initializes MemoryBlock fields to 0, so that the RWX-failure check
works.
It doesn't fix the SELinux 'execmem' issues though (the JIT will not work when
SELinux is in enforcing mode).
llvm-svn: 99762
2010-03-28 11:07:36 +00:00
Chris Lattner
135091bd9d
improve type checking of SDNode operand count. This rejects all cases
...
where an incorrect number of operands is provided to an sdnode instead
of just a few cases.
llvm-svn: 99761
2010-03-28 08:48:47 +00:00
Chris Lattner
b7c48433df
fix a type contradition: XCoreISD::RETSP has one argument, not zero.
...
llvm-svn: 99760
2010-03-28 08:47:39 +00:00
Chris Lattner
6642118e83
finally remove the immAllOnesV_bc/immAllZerosV_bc patterns
...
and those derived from them. These are obnoxious because
they were written as: PatLeaf<(bitconvert). Not having an
argument was foiling adding better type checking for operand
count matching up with what was required (in this case,
bitconvert always requires an operand!)
llvm-svn: 99759
2010-03-28 08:43:23 +00:00
Chris Lattner
505849d277
remove a pattern with no testcase that doesn't appear to be
...
matchable: it seems like it would always constant fold.
llvm-svn: 99758
2010-03-28 08:40:48 +00:00
Chris Lattner
3dad5fbeb9
fix integer negates to use the proper type for the zero vectors,
...
this also depends on the new "bitconvert dropping" behavior just
added to tblgen.
llvm-svn: 99757
2010-03-28 08:39:10 +00:00
Chris Lattner
a787c9e23a
teach tblgen to allow patterns like (add (i32 (bitconvert (i32 GPR))), 4),
...
transforming it into (add (i32 GPR), 4). This allows us to write type
generic multi patterns and have tblgen automatically drop the bitconvert
in the case when the types align. This allows us to fold an extra load
in the changed testcase.
llvm-svn: 99756
2010-03-28 08:38:32 +00:00
Chris Lattner
240154e633
fix a typo, bitconvert from node to itself isn't valid.
...
llvm-svn: 99755
2010-03-28 08:36:45 +00:00
Chris Lattner
6c223ee0e9
fix vnot matching to explicitly specify the type of the
...
input to be v8i8 or v16i8, which buildvectors get canonicalized to.
This allows the patterns that were previously using a bare 'vnot' to
match, before they couldn't.
llvm-svn: 99754
2010-03-28 08:08:07 +00:00
Chris Lattner
1c85e3476d
fix up vnot matching, eliminating a dead pattern, correcting a couple of
...
patterns that would never match because of bitcast, and eliminating use
of vnot_conv.
llvm-svn: 99753
2010-03-28 08:00:23 +00:00
Chris Lattner
6bba2f3c69
add some nounwinds
...
llvm-svn: 99752
2010-03-28 07:58:37 +00:00
Chris Lattner
108667f3ec
this takes an insane amount of time to run, disable it for now (PR6727)
...
llvm-svn: 99751
2010-03-28 07:58:09 +00:00
Chris Lattner
e549d9b1f2
stop using vnot_conv
...
llvm-svn: 99750
2010-03-28 07:48:17 +00:00
Chris Lattner
227a83d6ed
revert r99743, this is saying that the repmovs instructinos have an
...
*input* of other type, which is the VT.
llvm-svn: 99749
2010-03-28 07:38:39 +00:00
Chris Lattner
be980f2df7
remove a bunch of dead patterns.
...
llvm-svn: 99748
2010-03-28 07:38:00 +00:00
Chris Lattner
2e9eae1fa2
validate that input sdnodes don't exist in an output pattern.
...
llvm-svn: 99747
2010-03-28 06:57:56 +00:00
Chris Lattner
adf7ecf9d3
eliminate a bunch of code duplication in ParseTreePattern
...
by rotating it.
llvm-svn: 99746
2010-03-28 06:50:34 +00:00
Chris Lattner
58ff45cbef
add some node definitions.
...
llvm-svn: 99745
2010-03-28 06:16:41 +00:00
Chris Lattner
ffdac7b76a
SDTCisVT<0, isVoid> is not valid, reject it.
...
llvm-svn: 99744
2010-03-28 06:04:39 +00:00
Chris Lattner
cba70c8162
claiming to return other is pointless.
...
llvm-svn: 99743
2010-03-28 05:57:36 +00:00
Chris Lattner
89ad2f1d60
comply with the wishes of a fixme.
...
llvm-svn: 99742
2010-03-28 05:55:17 +00:00
Chris Lattner
4d8786b5cc
now that (parallel) is gone and a variety of bugs in targets
...
are cleaned up, we can remove an old fixme.
llvm-svn: 99741
2010-03-28 05:54:03 +00:00
Chris Lattner
49e2773dd8
add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
...
1, 1 cases which are by-far the most frequent. This shrinks the X86
isel table from 77014 -> 74657 bytes.
llvm-svn: 99740
2010-03-28 05:50:16 +00:00
Chris Lattner
e01f7e33ac
don't add nodes to the now-dead nodes list multiple times, this
...
can cause a crash on crazy situations in msp430 when morph-node-to
is disabled.
llvm-svn: 99739
2010-03-28 05:28:31 +00:00
Chris Lattner
a520b166dc
Improve systemz to model cmp and ucmp nodes as returning
...
their flags correctly.
llvm-svn: 99738
2010-03-28 05:21:52 +00:00
Chris Lattner
e83591c616
the FPCmp node returns an i32.
...
llvm-svn: 99737
2010-03-28 05:12:57 +00:00
Chris Lattner
ec5fe65838
fix some modelling problems exposed by a patch I'm working on. bsr/bsf/ptest
...
nodes all have an EFLAGS result when made by isel lowering.
llvm-svn: 99736
2010-03-28 05:07:17 +00:00
Chris Lattner
7aed1fb69d
don't add flag nodes with chain results to the NowDeadNodes
...
list multiple times when MorphNodeTo can't be applied.
llvm-svn: 99735
2010-03-28 04:54:33 +00:00
Douglas Gregor
d5cb1ddb2c
After performing template argument deduction for a function template,
...
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.
Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.
Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.
llvm-svn: 99734
2010-03-28 02:42:43 +00:00
Jeffrey Yasskin
3f28c8809d
Oops, r98447 dropped the reference to ForwardType in the wrong place in
...
Type::destroy(), so it got skipped for FunctionTypes, StructTypes, and
UnionTypes. This fixes the resulting leaks in test/Feature/opaquetypes.ll and
test/Integer/opaquetypes_bt.ll.
llvm-svn: 99732
2010-03-28 01:03:47 +00:00
Benjamin Kramer
c048322523
Checker: random include cleanup.
...
llvm-svn: 99731
2010-03-27 21:19:47 +00:00