Commit Graph

104188 Commits

Author SHA1 Message Date
Sebastian Redl eb931c6b0e The ASTReader created by -chain-include used the generated PCH buffers in the wrong order. The effect was that all but the first chain-include files was ignored for subsequent compilations.
llvm-svn: 129513
2011-04-14 14:07:41 +00:00
Mon P Wang 0f6bad7b6e Cleanup r129472 by using a utility routine as suggested by Eli.
llvm-svn: 129509
2011-04-14 08:04:01 +00:00
Andrew Trick bfbd972b1f In the pre-RA scheduler, maintain cmp+br proximity.
This is done by pushing physical register definitions close to their
use, which happens to handle flag definitions if they're not glued to
the branch. This seems to be generally a good thing though, so I
didn't need to add a target hook yet.

The primary motivation is to generate code closer to what people
expect and rule out missed opportunity from enabling macro-op
fusion. As a side benefit, we get several 2-5% gains on x86
benchmarks. There is one regression:
SingleSource/Benchmarks/Shootout/lists slows down be -10%. But this is
an independent scheduler bug that will be tracked separately.
See rdar://problem/9283108.

Incidentally, pre-RA scheduling is only half the solution. Fixing the
later passes is tracked by:
<rdar://problem/8932804> [pre-RA-sched] on x86, attempt to schedule CMP/TEST adjacent with condition jump

Fixes:
<rdar://problem/9262453> Scheduler unnecessary break of cmp/jump fusion

llvm-svn: 129508
2011-04-14 05:15:06 +00:00
Andrew Trick d175c98d41 Documented bugpoint --compile-custom --compile-command.
I've used it a few times to reduce unit tests and gotten one request for information on it. It's not easy to use correctly because bugpoint doesn't tell you when you're doing it wrong.

llvm-svn: 129507
2011-04-14 05:05:36 +00:00
Chris Lattner 1d313c6f6d add a minor missed dag combine that is blocking mid-level optimization
improvements, that will lead to fixing PR6627.

llvm-svn: 129504
2011-04-14 04:21:42 +00:00
Chris Lattner 493b3e72f2 sink a call into its only use.
llvm-svn: 129503
2011-04-14 04:12:47 +00:00
Chris Lattner fba5cdfce1 rework FoldBranchToCommonDest to exit earlier when there is a bonus
instruction around, reducing work.

Greatly simplify handling of debug instructions.  There is no need to
build up a vector of them and then move them into the one predecessor
if we're processing a block.  Instead just rescan the block and *copy*
them into the pred.  If a block gets merged into multiple preds, this
will retain more debug info.

llvm-svn: 129502
2011-04-14 02:44:53 +00:00
Chris Lattner 35a65b2aa6 fix a couple -Wsign-compare warnings.
llvm-svn: 129501
2011-04-14 02:27:25 +00:00
Sean Callanan 1b1bf6e982 Updated LLVM to pick up fixes to the ARM instruction
tables.

llvm-svn: 129500
2011-04-14 02:01:31 +00:00
Ted Kremenek 9eb0b7d2f1 Return the correct lastly populated block from CFGBuilder::VisitUnaryExprOrTypeTraitExpr().
llvm-svn: 129499
2011-04-14 01:50:50 +00:00
Bill Wendling 410ec4aad1 As Dan pointed out, movzbl, movsbl, and friends are nicer than their alias
(movzx/movsx) because they give more information. Revert that part of the patch.

llvm-svn: 129498
2011-04-14 01:46:37 +00:00
Bill Wendling 7e07d6fb69 Have the X86 back-end emit the alias instead of what's being aliased. In most
cases, it's much nicer and more informative reading the alias.

llvm-svn: 129497
2011-04-14 01:11:51 +00:00
Ken Dyck 3563aa6520 Replace a couple of divide-by-8s with divide-by-charwidths. No change in
functionality intended.

llvm-svn: 129496
2011-04-14 01:00:39 +00:00
Eli Friedman 6620ddeaa4 Re-fix r129481 and r129465 properly. Nulls fixits shouldn't be dropped in
DiagnosticBuilder::AddFixItHint: they will be dropped along with any
other (possibly valid) fixits later.

llvm-svn: 129495
2011-04-14 00:51:41 +00:00
Argyrios Kyrtzidis 36e4ae3e57 When creating an implicit member expression through a qualified-id, check that the class
named by the nested-name-specifier is same or base of the class in which the member expression appears.

It seems we also had an ill-formed test case, mon dieu! Fixes rdar://8576107.

llvm-svn: 129493
2011-04-14 00:46:47 +00:00
Nick Kledzik 19b826011e <rdar://problem/9282305> install an archive for dyld and fix missing -static
llvm-svn: 129492
2011-04-14 00:45:01 +00:00
Ken Dyck c5ca87675e Replace a couple of divisions-by-'8' with divisions-by-charwidth. No change
in functionality intended.

llvm-svn: 129491
2011-04-14 00:43:09 +00:00
Anders Carlsson d162fb83f2 In C++, when initializing an array from a pascal string, it's OK if the array
is 1 element smaller than the string, because we can just strip off the last
null character. This matches GCC.

llvm-svn: 129490
2011-04-14 00:41:11 +00:00
Nick Kledzik e7e288c805 don't add version info for static library
llvm-svn: 129489
2011-04-14 00:40:20 +00:00
Anders Carlsson 752454092c Add a flag to StringLiteral to keep track of whether the string is a pascal string or not.
llvm-svn: 129488
2011-04-14 00:40:03 +00:00
Nick Kledzik 012323dee9 <rdar://problem/9173756> enable CC.Release to be used always
llvm-svn: 129487
2011-04-14 00:39:01 +00:00
Anders Carlsson a5a9bafeb9 Rename test.
llvm-svn: 129486
2011-04-13 23:55:47 +00:00
Bill Wendling 6dd69d9241 Add an option to not print the alias of an instruction. It defaults to "print
the alias".

llvm-svn: 129485
2011-04-13 23:36:21 +00:00
Owen Anderson 9c12834eed During post-legalization DAG combining, be careful to only create shifts where the RHS is of the legal type for the new operation.
llvm-svn: 129484
2011-04-13 23:22:23 +00:00
Greg Clayton ab65b34fdc Added auto completion for architecture names and for platforms.
Modified the OptionGroupOptions to be able to specify only some of the options
that should be appended by using the usage_mask in the group defintions and
also provided a way to remap them to a new usage mask after the copy. This 
allows options to be re-used and also targetted for specific option groups.

Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration.
Taught the option parser to be able to automatically use the appropriate
auto completion for a given options if nothing is explicitly specified
in the option definition. So you don't have to specify it in the option
definition tables.

Renamed the default host platform name to "host", and the default platform
hostname to be "localhost".

Modified the "file" and "platform select" commands to make sure all options
and args are good prior to creating a new platform. Also defer the computation
of the architecture in the file command until all options are parsed and the
platform has either not been specified or reset to a new value to avoid
computing the arch more than once.

Switch the PluginManager code over to using llvm::StringRef for string
comparisons and got rid of all the AccessorXXX functions in lieu of the newer
mutex + collection singleton accessors.

llvm-svn: 129483
2011-04-13 22:47:15 +00:00
Chandler Carruth a7773f719e Add -no-canonical-prefixes to tests which assert on the name of the
built clang binary that is used by the test. Build systems that use
symlinks for build outputs will fail these assertions otherwise.

llvm-svn: 129482
2011-04-13 22:28:36 +00:00
Fariborz Jahanian 38675543c5 Issue the 2nd fixit even if fix-it hint is supressed.
// rdar://9091893

llvm-svn: 129481
2011-04-13 22:18:37 +00:00
Johnny Chen d0fb04f437 Thumb disassembler did not handle tBRIND (indirect branch) properly.
rdar://problem/9280370

llvm-svn: 129480
2011-04-13 21:59:01 +00:00
Ted Kremenek 13b5a2c2f8 Add Objective-C++ files to those accepted by ccc-analyzer.
llvm-svn: 129475
2011-04-13 21:52:05 +00:00
Caroline Tice 17f5fa2b1c Fix bug where source & target registers were swapped in an
emulation function.

llvm-svn: 129474
2011-04-13 21:49:04 +00:00
Ted Kremenek 7114954232 Update public analyzer build to checker-256.
llvm-svn: 129473
2011-04-13 21:48:34 +00:00
Mon P Wang 2e5528f0b2 Vectors with different number of elements of the same element type can have
the same allocation size but different primitive sizes(e.g., <3xi32> and
<4xi32>).  When ScalarRepl promotes them, it can't use a bit cast but
should use a shuffle vector instead.

llvm-svn: 129472
2011-04-13 21:40:02 +00:00
Johnny Chen b6a37bff21 Check for unallocated instruction encodings when disassembling Thumb Branch instructions (tBcc and t2Bcc).
rdar://problem/9280470

llvm-svn: 129471
2011-04-13 21:35:49 +00:00
Jim Ingham 5d3e822926 Have "-h" print just the command arguments, and "-h -v" print the examples as well.
llvm-svn: 129470
2011-04-13 21:11:41 +00:00
Johnny Chen ffa6378fd6 The LDR*T/STR*T (unpriviledged load/store) operations don't take SP or PC as Rt.
rdar://problem/9279440

llvm-svn: 129469
2011-04-13 21:04:32 +00:00
Cameron Zwarich 415b5e8341 Fix a typo in an ARM-specific DAG combine. This fixes <rdar://problem/9278274>.
llvm-svn: 129468
2011-04-13 21:01:19 +00:00
Benjamin Kramer aabc142fce Fix format string warning.
llvm-svn: 129467
2011-04-13 20:41:43 +00:00
Cameron Zwarich 9398197ef1 Fix a regression caused by r102515 where explicit alignment on globals is
ignored. There was a test to catch this, but it was just blindly updated in
a large change. This fixes another part of <rdar://problem/9275290>.

llvm-svn: 129466
2011-04-13 20:36:04 +00:00
Fariborz Jahanian e72509c10c No fixit hint for builtin expressions which are
defined in a macro. // rdar://9091893

llvm-svn: 129465
2011-04-13 20:31:26 +00:00
Bill Wendling a865185ad6 Removing the unaligned load tests from builtins-x86.c since they're generated by a regular 'load' now.
llvm-svn: 129464
2011-04-13 20:17:22 +00:00
Devang Patel 2772f662da Fix debug message.
llvm-svn: 129463
2011-04-13 19:47:41 +00:00
Johnny Chen 70591cbc60 Check the corner cases for t2LDRSHi12 correctly and mark invalid encodings as such.
rdar://problem/9276651

llvm-svn: 129462
2011-04-13 19:46:05 +00:00
Devang Patel e141234940 Remove extra bytes that were added for gdb. We do not have good poiner to understand actual reason behind this fixme. Spot checking suggest that newer gdb does not need this.
llvm-svn: 129461
2011-04-13 19:41:17 +00:00
Nick Lewycky 58d11415c1 Use positive values since the value type is unsigned. Fixes a warning on the
llvm-gcc-native-mingw32 builder.

llvm-svn: 129457
2011-04-13 18:46:22 +00:00
Johnny Chen 0d306a7840 Fix a bug where for t2MOVCCi disassembly, the TIED_TO register operand was not properly handled.
rdar://problem/9276427

llvm-svn: 129456
2011-04-13 17:51:02 +00:00
Johnny Chen b2f9fa1fce Forgot to add this change for http://llvm.org/viewvc/llvm-project?view=rev&revision=129387.
llvm-svn: 129451
2011-04-13 16:56:08 +00:00
Junjie Gu 377cc31a74 Fixed the revision 129449.
llvm-svn: 129450
2011-04-13 16:45:49 +00:00
Junjie Gu 7c3b4593b5 Passing unroll parameters (unroll-count, threshold, and partial unroll) via LoopUnroll class's ctor. Doing so
will allow multiple context with different loop unroll parameters to run.  This is a minor change and no effect 
on existing application.

llvm-svn: 129449
2011-04-13 16:15:29 +00:00
Jim Grosbach 7cb41d787d Load multiple object files and link them via RuntimeDyld in llvm-rtdyld.
Relocations between the object modules are properly resolved, as in the
following trivial example:

$ cat t.c
int foo();
int main() {
    return foo();
}
$ cat foo.c
int foo() {
    return 65;
}
$ clang -c t.c -fno-asynchronous-unwind-tables
$ clang -c foo.c -fno-asynchronous-unwind-tables
$ llvm-rtdyld t.o foo.o ; echo $?
loaded '_main' at: 0x10015c000
65

llvm-svn: 129448
2011-04-13 15:49:40 +00:00
Rafael Espindola 6aafb64daf Add the alias analysis to the C api.
llvm-svn: 129447
2011-04-13 15:44:58 +00:00