Rafael Espindola
2569885963
Add a test to the previous commit.
...
llvm-svn: 105596
2010-06-08 03:59:28 +00:00
Rafael Espindola
895e51de4a
Fix what looks like a merge problem that broke __clear_cache.
...
llvm-svn: 105595
2010-06-08 03:52:53 +00:00
Rafael Espindola
85dc7e0909
Add test for previous commit.
...
llvm-svn: 105594
2010-06-08 03:29:31 +00:00
Nate Begeman
4904e32d46
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules.
...
llvm-svn: 105593
2010-06-08 02:47:44 +00:00
Rafael Espindola
bbd44ef673
Fix passing and returning of objects with non trivial copy constructors on
...
ARM.
Fixes PR7310.
llvm-svn: 105592
2010-06-08 02:42:08 +00:00
Bob Wilson
0271c5928e
Fix up a comment.
...
llvm-svn: 105591
2010-06-08 00:42:08 +00:00
Nate Begeman
16372afeab
Implement ARM NEON up through vcvt, alphabetically.
...
llvm-svn: 105590
2010-06-08 00:17:19 +00:00
Nate Begeman
a011002195
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.
...
llvm-svn: 105589
2010-06-08 00:16:34 +00:00
Nate Begeman
fe123268a9
ARM NEON:
...
fix vcvt naming
handle vdup, vcombine with generic vector code
llvm-svn: 105588
2010-06-08 00:14:42 +00:00
Bob Wilson
846bd7992c
Further changes for Neon vector shuffles:
...
- change isShuffleMaskLegal to show that all shuffles with 32-bit and 64-bit
elements are legal
- the Neon shuffle instructions do not support 64-bit elements, but we were
not checking for that before lowering shuffles to use them
- remove some 64-bit element vduplane patterns that are no longer needed
llvm-svn: 105586
2010-06-07 23:53:38 +00:00
Bob Wilson
7149cfcda3
Fix a mistake in my previous change r105437: don't access operand 2 and assume
...
that it is an immediate before checking that the instruction is an
EXTRACT_SUBREG.
llvm-svn: 105585
2010-06-07 23:48:46 +00:00
Daniel Dunbar
24e52992c0
Driver: Support invoking Clang on .ll or .bc inputs.
...
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').
It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.
*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.
llvm-svn: 105584
2010-06-07 23:28:45 +00:00
Daniel Dunbar
6f8362c6bf
Frontend: Add CodeGenAction support for handling LLVM IR.
...
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.
For example, 'llvm-as' is:
$ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
$ clang -cc1 -emit-llvm FOO.bc -o -
and 'opt' is, e.g.:
$ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
$ clang -cc1 -S -o - FOO.ll
The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).
llvm-svn: 105583
2010-06-07 23:27:59 +00:00
Daniel Dunbar
9507f9cc05
Frontend: Add FrontendAction support for handling LLVM IR inputs.
...
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.
llvm-svn: 105582
2010-06-07 23:26:47 +00:00
Daniel Dunbar
fcb2e6ddea
FrontendAction: Track active file kind.
...
llvm-svn: 105581
2010-06-07 23:25:49 +00:00
Daniel Dunbar
fa6214c952
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
...
llvm-svn: 105580
2010-06-07 23:24:43 +00:00
Daniel Dunbar
aed46fcbe9
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.
...
llvm-svn: 105579
2010-06-07 23:23:50 +00:00
Daniel Dunbar
8654638b23
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
...
llvm-svn: 105578
2010-06-07 23:23:06 +00:00
Daniel Dunbar
9b491e79fc
Frontend: Lift InputKind enumeration to top level.
...
llvm-svn: 105577
2010-06-07 23:22:09 +00:00
Daniel Dunbar
3e11152de3
Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
...
create modules which have target data strings.
llvm-svn: 105576
2010-06-07 23:21:04 +00:00
Daniel Dunbar
f976d1b205
Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.
...
llvm-svn: 105575
2010-06-07 23:20:08 +00:00
Daniel Dunbar
6d5824f5bf
Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.
...
llvm-svn: 105574
2010-06-07 23:19:17 +00:00
Dan Gohman
8b3b3a1035
Add an svn:ignore.
...
llvm-svn: 105573
2010-06-07 23:15:15 +00:00
Dan Gohman
7398758719
Add some basic debug output.
...
llvm-svn: 105561
2010-06-07 22:32:10 +00:00
Fariborz Jahanian
be21aa34a0
When using property-dot assignment syntax to call a setter method,
...
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778
llvm-svn: 105560
2010-06-07 22:02:01 +00:00
Stuart Hastings
8612940357
Tweak test for debug/metadata change, update to FileCheck. Radar 7424645.
...
llvm-svn: 105559
2010-06-07 21:50:54 +00:00
Jim Grosbach
723d242a95
Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
...
rdar://7797940
llvm-svn: 105557
2010-06-07 21:48:47 +00:00
Nick Lewycky
4ecf2cc5ea
Plug a leak in the non-error case by removing one level of indirection.
...
llvm-svn: 105556
2010-06-07 21:42:19 +00:00
Jim Grosbach
6201b991a2
Cleanup. Process the dbg_values separately
...
llvm-svn: 105554
2010-06-07 21:28:55 +00:00
Dan Gohman
22e1adbb11
Fix this test to work under lit.
...
llvm-svn: 105553
2010-06-07 20:58:11 +00:00
Dan Gohman
fa9ad13002
Run dead type elimination after dead argument elimination.
...
llvm-svn: 105552
2010-06-07 20:28:37 +00:00
Dan Gohman
fb8ed43349
Make bugpoint dead-argument-hacking actually work, and actually test it.
...
llvm-svn: 105551
2010-06-07 20:20:33 +00:00
Dan Gohman
34a2249fde
Use ->isVoidTy().
...
llvm-svn: 105550
2010-06-07 20:19:26 +00:00
Fariborz Jahanian
a2d7c34e93
Fixed a block regression caused by trying to use
...
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.
llvm-svn: 105549
2010-06-07 19:39:39 +00:00
Dan Gohman
ebf2e977cf
The FoldingSet hash data includes pointer values, so it isn't
...
determinstic. Instead, give SCEV objects an arbitrary sequence
number.
llvm-svn: 105548
2010-06-07 19:36:14 +00:00
Jordy Rose
3597b21f20
Catch free()s on non-regions and regions known to be not from malloc(), by checking the symbol type and memory space.
...
llvm-svn: 105547
2010-06-07 19:32:37 +00:00
Dan Gohman
3553feed79
Optimize this code somewhat by taking advantage of the fact
...
that the operands are sorted.
llvm-svn: 105546
2010-06-07 19:20:57 +00:00
Bill Wendling
cfcd0e12cf
Another place where the code wanted to access the argument list and not all of
...
the operands.
llvm-svn: 105545
2010-06-07 19:18:58 +00:00
Dan Gohman
a2effb6452
Micro-optimize this, to speed up this hotspot in debug builds a little.
...
llvm-svn: 105544
2010-06-07 19:16:37 +00:00
Dan Gohman
18a4b46404
Micro-optimize this.
...
llvm-svn: 105542
2010-06-07 19:12:54 +00:00
Jim Grosbach
0f445f328e
Move exit check where it really belongs.
...
llvm-svn: 105541
2010-06-07 19:12:21 +00:00
Dan Gohman
70910a6ab6
Optimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
...
scrounging through SCEVUnknown contents and SCEVNAryExpr operands;
instead just do a simple deterministic comparison of the precomputed
hash data.
Also, since this is more precise, it eliminates the need for the slow
N^2 duplicate detection code.
llvm-svn: 105540
2010-06-07 19:06:13 +00:00
Bill Wendling
a3bba3371a
Create new accessors to get arguments for call/invoke instructions. It breaks
...
encapsulation to force the users of these classes to know about the internal
data structure of the Operands structure. It also can lead to errors, like in
the MSIL writer.
llvm-svn: 105539
2010-06-07 19:05:06 +00:00
Rafael Espindola
a54062ef0c
Implement __clear_cache on ARM.
...
llvm-svn: 105537
2010-06-07 17:26:50 +00:00
Rafael Espindola
c4dca3aeb6
Misc cleanups to the gold plugin.
...
llvm-svn: 105534
2010-06-07 16:45:22 +00:00
Fariborz Jahanian
28ed927ddf
Use MaybeCreateCXXExprWithTemporaries for potential destruction of
...
created temporary. Use own initialized entity for copied in block
variables.
llvm-svn: 105533
2010-06-07 16:14:00 +00:00
Nate Begeman
5968eb270a
weekend checkpoint of arm neon builtins codegen.
...
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.
llvm-svn: 105532
2010-06-07 16:01:56 +00:00
Nate Begeman
12d1f62f6c
clang codegen support
...
llvm-svn: 105531
2010-06-07 16:00:37 +00:00
Jeffrey Yasskin
caa710dfd2
PR7245: Make binding a reference to a temporary without a usable copy
...
constructor into an extension warning into the error that C++98 requires.
llvm-svn: 105529
2010-06-07 15:58:05 +00:00
Kenneth Uildriks
1850444000
Partial specialization was not checking the callsite to make sure it was using the same constants as the specialization, leading to calls to the wrong specialization. Patch by Takumi Nakamura\!
...
llvm-svn: 105528
2010-06-05 14:50:21 +00:00