Jim Grosbach
fba7fce5be
Remove trailing whitespace
...
llvm-svn: 96388
2010-02-16 21:07:46 +00:00
Bob Wilson
aff96b2132
Rename SuccessorNumber to GetSuccessorNumber.
...
llvm-svn: 96387
2010-02-16 21:06:42 +00:00
David Greene
9641d06809
Add support for emitting non-temporal stores for DAGs marked
...
non-temporal. Fix from r96241 for botched encoding of MOVNTDQ.
Add documentation for !nontemporal metadata.
Add a simpler movnt testcase.
llvm-svn: 96386
2010-02-16 20:50:18 +00:00
Bob Wilson
6bfacb7393
Testcase for critical edge splitting with load PRE.
...
llvm-svn: 96385
2010-02-16 20:48:55 +00:00
Jim Grosbach
2284ddab56
Update Thumb2 to not use CarryDefIsUnused or CarryDefIsUsed predicates, but
...
to have the predicate on the pattern itself instead. Support for the new
ISel. Remove definitions of CarryDefIsUnused and CarryDefIsUsed since they are
no longer used anywhere.
llvm-svn: 96384
2010-02-16 20:42:29 +00:00
Jim Grosbach
756ab53e60
Remove redundant setting of Defs. CPSR is already marked by the block level set of Defs.
...
llvm-svn: 96383
2010-02-16 20:35:59 +00:00
Dan Gohman
6deab96c81
Refactor rewriting for PHI nodes into a separate function.
...
llvm-svn: 96382
2010-02-16 20:25:07 +00:00
Jim Grosbach
0a334d0df9
First step in eliminating the CarryDefIsUnused and CarryDefIsUsed predicates.
...
They won't work with the new ISel mechanism, as Requires predicates are no
longer allowed to reference the node being selected. Moving the predicate to
the patterns instead solves the problem.
This patch handles ARM mode. Thumb2 will follow.
llvm-svn: 96381
2010-02-16 20:17:57 +00:00
Johnny Chen
46c39d4f1f
Added for disassembly the following instructions:
...
o Store Return State (SRSW, SRS)
o Load/Store Coprocessor (LDC/STC and friends)
o MSR (immediate)
llvm-svn: 96380
2010-02-16 20:04:27 +00:00
Bob Wilson
92cdb6eec5
Split critical edges as needed for load PRE.
...
llvm-svn: 96378
2010-02-16 19:51:59 +00:00
Bob Wilson
3de492ec35
Refactor to share code to find the position of a basic block successor in the
...
terminator's list of successors.
llvm-svn: 96377
2010-02-16 19:49:17 +00:00
Daniel Dunbar
fd09df7839
IRgen: Switch 'retval' to use CreateIRTemp.
...
llvm-svn: 96376
2010-02-16 19:45:20 +00:00
Daniel Dunbar
29a32dab4a
Disable warn_unused_function for now, its breaking various project builds due to
...
false positives.
llvm-svn: 96375
2010-02-16 19:44:56 +00:00
Daniel Dunbar
d004918ccb
IRgen: Add CreateIRTemp, which creates a temporary alloca but with type converted "not-for-memory". Dunno a better name.
...
llvm-svn: 96374
2010-02-16 19:44:13 +00:00
Daniel Dunbar
27bacafb71
IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.
...
llvm-svn: 96373
2010-02-16 19:43:39 +00:00
Dan Gohman
0849ed5e26
Fix whitespace.
...
llvm-svn: 96372
2010-02-16 19:42:34 +00:00
Douglas Gregor
71ad477ab3
Do not try to instantiate invalid declarations. It's a recipe for
...
disaster. Fixes PR6161.
llvm-svn: 96371
2010-02-16 19:28:15 +00:00
Kenneth Uildriks
10e3022b10
Function attributes have index ~0, not 0
...
llvm-svn: 96370
2010-02-16 19:28:02 +00:00
Chris Lattner
6c132331ee
simplify this code. In the new world order there is no
...
need to scan the entire subtree of the pattern anymore.
llvm-svn: 96369
2010-02-16 19:19:58 +00:00
Chris Lattner
f8695c1ee9
convert the new matcher to check intermediate nodes for a single
...
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does. This
substantially simplifies the code and improves opportunities for
sharing.
llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Douglas Gregor
fe17d2550b
Improve parsing and instantiation of destructor names, so that we can
...
now cope with the destruction of types named as dependent templates,
e.g.,
y->template Y<T>::~Y()
Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse
template<typename T, typename U>
X0<T, U>::~X0() { }
properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.
Fixes PR6152.
llvm-svn: 96367
2010-02-16 19:09:40 +00:00
Chris Lattner
300048631b
change dag isel emitter to only call 'IsProfitableToFold' on nodes
...
with chains. On interior nodes that lead up to them, we just directly
check that there is a single use. This generates slightly more
efficient code.
llvm-svn: 96366
2010-02-16 19:03:34 +00:00
Chris Lattner
fff5ed4b55
when a diagnostic is an extension and has no other -W flag,
...
indicate that it was enabled with -pedantic so people know
why they're getting them:
$ printf "int x;" | clang -xc - -pedantic
<stdin>:1:7: warning: no newline at end of file [-pedantic]
int x;
^
llvm-svn: 96365
2010-02-16 18:29:31 +00:00
Charles Davis
163855f46d
dllimport and dllexport are declspec attributes, too. They're also
...
Win32-specific.
Also, fix a test to use FileCheck instead of grepping LLVM IR.
llvm-svn: 96364
2010-02-16 18:27:26 +00:00
Chris Lattner
e983eae273
add two aliases for SSE functions we already have, fixing PR6316.
...
llvm-svn: 96363
2010-02-16 18:21:25 +00:00
Chris Lattner
db5c16bc9c
add freebsd/ppc[64] support, patch by Nathan Whitehorn, PR6318
...
llvm-svn: 96362
2010-02-16 18:14:57 +00:00
Fariborz Jahanian
b6a68c0465
Minor rewriter cleanup and a test for a block rewriting bug.
...
llvm-svn: 96361
2010-02-16 17:26:03 +00:00
Bob Wilson
70aa8d0745
Fix pr6111: Avoid using the LR register for the target address of an indirect
...
branch in ARM v4 code, since it gets clobbered by the return address before
it is used. Instead of adding a new register class containing all the GPRs
except LR, just use the existing tGPR class.
llvm-svn: 96360
2010-02-16 17:24:15 +00:00
Ted Kremenek
3eac2454dc
Add test case showing that a recursive block that captures a block pointer that
...
isn't marked '__block' is bad.
llvm-svn: 96357
2010-02-16 16:55:10 +00:00
Anders Carlsson
bc91b44a23
Add an extreme vbase offsets test. I'm kinda amazed that this works myself ;)
...
llvm-svn: 96356
2010-02-16 16:50:08 +00:00
Anders Carlsson
13f0f66223
Handle layout of vtables for virtual bases.
...
llvm-svn: 96355
2010-02-16 16:49:35 +00:00
Anders Carlsson
b716a543c9
Move some code around in preparation for virtual base vtables.
...
llvm-svn: 96354
2010-02-16 16:26:28 +00:00
Fariborz Jahanian
e1ff123214
Fix rewriter bug when function call inside block with block parameter
...
causes C++ compile error (radar 7651312).
llvm-svn: 96352
2010-02-16 16:21:26 +00:00
Anders Carlsson
14157939ab
Fix a bug where we would not emit secondary vtables for bases of a primary base.
...
llvm-svn: 96351
2010-02-16 16:02:57 +00:00
Duncan Sands
cbd43f89ac
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
...
methods to try to have the type predicates be more logically positioned.
llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
19d0b47b1f
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Benjamin Kramer
d7d8afabd0
Minor warning fixes (semicolons, newline at EOF).
...
llvm-svn: 96343
2010-02-16 10:25:04 +00:00
Benjamin Kramer
64aae50539
Rename argument so the name reflects what it's doing.
...
llvm-svn: 96342
2010-02-16 10:07:31 +00:00
Ted Kremenek
228639746a
Add simpler checker to check if variables captured by a block are uninitialized.
...
llvm-svn: 96341
2010-02-16 08:33:59 +00:00
Chris Lattner
52bfe24e2c
mark all the generated node predicates 'const'.
...
llvm-svn: 96337
2010-02-16 07:26:36 +00:00
Chris Lattner
5ce8303950
generate code for node and pattern predicates. Note that this won't
...
build if enabled, it will fail with constness issues. I'll resolve
these next.
llvm-svn: 96336
2010-02-16 07:21:10 +00:00
John McCall
d8d0d43fa3
Support local namespace aliases and permit them to be instantiated.
...
llvm-svn: 96335
2010-02-16 06:53:13 +00:00
Chris Lattner
1d689a09a9
refactor some code into a local class.
...
llvm-svn: 96334
2010-02-16 06:52:01 +00:00
Chris Lattner
812586ad2a
remove now dead code and fixme.
...
llvm-svn: 96333
2010-02-16 06:15:00 +00:00
Chris Lattner
f400fd6aec
remove dead code. This is never generated for any targets in mainline.
...
llvm-svn: 96332
2010-02-16 06:14:22 +00:00
Chris Lattner
aa7d3e096b
add support for the new isel matcher to generate
...
(isprofitable|islegal)tofold checks.
llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Chris Lattner
4964ef88c2
make pcrel immediate values relative to the start of the field,
...
not the end of the field, fixing rdar://7651978
llvm-svn: 96330
2010-02-16 05:03:17 +00:00
Anders Carlsson
77904f1d5b
Emit vbase offsets.
...
llvm-svn: 96329
2010-02-16 04:59:55 +00:00
Anders Carlsson
dc2dba306c
More work on the new layout code.
...
llvm-svn: 96328
2010-02-16 04:49:44 +00:00
John McCall
6ce747220a
When emitting complete destructors for classes with virtual bases, compute
...
the offset to the virtual bases statically inside of relying on the virtual
base offsets in the object's vtable(s). This is both more efficient and
sound against the destructor's manipulation of the vtables.
Also extract a few helper routines.
Oh and we seem to pass all tests with an optimized clang now.
llvm-svn: 96327
2010-02-16 04:15:37 +00:00