platform/upstream/llvm.git
11 years ago+ centered progress cells
Anton Yartsev [Tue, 12 Feb 2013 04:45:48 +0000 (04:45 +0000)]
+ centered progress cells
+ added progress information for several checkers

llvm-svn: 174941

11 years agoCall __cxa_begin_catch with the current exception before
John McCall [Tue, 12 Feb 2013 03:51:46 +0000 (03:51 +0000)]
Call __cxa_begin_catch with the current exception before
calling std::terminate().  rdar://11904428

llvm-svn: 174940

11 years agoChange some CGF parameters to CGMs.
John McCall [Tue, 12 Feb 2013 03:51:38 +0000 (03:51 +0000)]
Change some CGF parameters to CGMs.

llvm-svn: 174939

11 years agoAdd a hidden option to PHIElimination to split all critical edges. This is
Cameron Zwarich [Tue, 12 Feb 2013 03:49:25 +0000 (03:49 +0000)]
Add a hidden option to PHIElimination to split all critical edges. This is
particularly useful for catching issues with architectures that have exotic
terminators like MIPS.

llvm-svn: 174938

11 years agoRenumber SlotIndexes locally when a new block is inserted.
Cameron Zwarich [Tue, 12 Feb 2013 03:49:22 +0000 (03:49 +0000)]
Renumber SlotIndexes locally when a new block is inserted.

llvm-svn: 174937

11 years agoAdd blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
Cameron Zwarich [Tue, 12 Feb 2013 03:49:20 +0000 (03:49 +0000)]
Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
a critical edge.

llvm-svn: 174936

11 years agoFix the updating of LiveIntervals after splitting a critical edge. PHI operand
Cameron Zwarich [Tue, 12 Feb 2013 03:49:17 +0000 (03:49 +0000)]
Fix the updating of LiveIntervals after splitting a critical edge. PHI operand
live ranges should always be extended, and the only successor that should be
considered for extension of other ranges is the target of the split edge.

llvm-svn: 174935

11 years agoCheck type for legality before forming a select from loads.
Pete Cooper [Tue, 12 Feb 2013 03:14:50 +0000 (03:14 +0000)]
Check type for legality before forming a select from loads.

Sorry for the lack of a test case.  I tried writing one for i386 as i know selects are illegal on this target, but they are actually considered legal by isel and expanded later.

I can't see any targets to trigger this, but checking for the legality of a node before forming it is general goodness.

llvm-svn: 174934

11 years agoARM cost model: Add vector reverse shuffle costs
Arnold Schwaighofer [Tue, 12 Feb 2013 02:40:39 +0000 (02:40 +0000)]
ARM cost model: Add vector reverse shuffle costs

A reverse shuffle is lowered to a vrev and possibly a vext instruction (quad
word).

radar://13171406

llvm-svn: 174933

11 years agoCost model: Add check for reverse shuffles to CostModel analysis
Arnold Schwaighofer [Tue, 12 Feb 2013 02:40:37 +0000 (02:40 +0000)]
Cost model: Add check for reverse shuffles to CostModel analysis

Check for reverse shuffles in the CostModel analysis pass and query
TargetTransform info accordingly. This allows us we can write test cases for
reverse shuffles.

radar://13171406

llvm-svn: 174932

11 years agoRemove an assert which triggers when a decl context in a module hits the 'has
Richard Smith [Tue, 12 Feb 2013 02:32:35 +0000 (02:32 +0000)]
Remove an assert which triggers when a decl context in a module hits the 'has
lexical storage but not visible storage' case in C++. It's unclear whether we
even need the special-case handling for C++, since it seems to be working
around our not serializing a lookup table for the TU in C. But in any case,
the assertion is incorrect.

llvm-svn: 174931

11 years agoPerform placeholder conversions on the controller of a _Generic
John McCall [Tue, 12 Feb 2013 02:08:12 +0000 (02:08 +0000)]
Perform placeholder conversions on the controller of a _Generic
expression.

llvm-svn: 174930

11 years agoARM NEON: Handle v16i8 and v8i16 reverse shuffles
Arnold Schwaighofer [Tue, 12 Feb 2013 01:58:32 +0000 (01:58 +0000)]
ARM NEON: Handle v16i8 and v8i16 reverse shuffles

Lower reverse shuffles to a vrev64 and a vext instruction instead of the default
legalization of storing and loading to the stack. This is important because we
generate reverse shuffles in the loop vectorizer when we reverse store to an
array.

  uint8_t Arr[N];
  for (i = 0; i < N; ++i)
    Arr[N - i - 1] = ...

radar://13171760

llvm-svn: 174929

11 years agoDiagnose loads of 'half' l-values in OpenCL.
John McCall [Tue, 12 Feb 2013 01:29:43 +0000 (01:29 +0000)]
Diagnose loads of 'half' l-values in OpenCL.
Patch by Joey Gouly!

llvm-svn: 174928

11 years agoUpdate error message due to previous commit, r174926.
Chad Rosier [Tue, 12 Feb 2013 01:12:24 +0000 (01:12 +0000)]
Update error message due to previous commit, r174926.

llvm-svn: 174927

11 years ago[ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Chad Rosier [Tue, 12 Feb 2013 01:00:01 +0000 (01:00 +0000)]
[ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Part of rdar://12470373

llvm-svn: 174926

11 years agoBacking out r174919 while I investigate a self-host bug on Takumi's builder.
Lang Hames [Tue, 12 Feb 2013 00:44:43 +0000 (00:44 +0000)]
Backing out r174919 while I investigate a self-host bug on Takumi's builder.

llvm-svn: 174925

11 years agoDIBuilder: make the return type of createBasicType more specific
David Blaikie [Tue, 12 Feb 2013 00:40:41 +0000 (00:40 +0000)]
DIBuilder: make the return type of createBasicType more specific

llvm-svn: 174924

11 years agoMinor update to Vim frontend: simplify breakpoints display (and list unresolved break...
Daniel Malea [Tue, 12 Feb 2013 00:31:40 +0000 (00:31 +0000)]
Minor update to Vim frontend: simplify breakpoints display (and list unresolved breakpoints)

llvm-svn: 174923

11 years agoIn ARC, emit non-peepholed +1s within the full-expression instead
John McCall [Tue, 12 Feb 2013 00:25:08 +0000 (00:25 +0000)]
In ARC, emit non-peepholed +1s within the full-expression instead
of immediately afterwards.

llvm-svn: 174922

11 years agoSplit a couple of tests out into their own file.
John McCall [Tue, 12 Feb 2013 00:25:02 +0000 (00:25 +0000)]
Split a couple of tests out into their own file.

llvm-svn: 174921

11 years agoAdded 0x0D to 2-byte opcode extension table for prefetch* variants
Kay Tiong Khoo [Tue, 12 Feb 2013 00:19:12 +0000 (00:19 +0000)]
Added 0x0D to 2-byte opcode extension table for prefetch* variants
Fixed decode of existing 3dNow prefetchw instruction
Intel is scheduled to add a compatible prefetchw (same encoding) to future CPUs

llvm-svn: 174920

11 years agoWhen generating IR for default copy-constructors, copy-assignment operators,
Lang Hames [Mon, 11 Feb 2013 23:44:11 +0000 (23:44 +0000)]
When generating IR for default copy-constructors, copy-assignment operators,
move-constructors and move-assignment operators, use memcpy to copy adjacent
POD members.

Previously, classes with one or more Non-POD members would fall back on
element-wise copies for all members, including POD members. This often
generated a lot of IR. Without padding metadata, it wasn't often possible
for the LLVM optimizers to turn the element-wise copies into a memcpy.

This code hasn't yet received any serious tuning. I didn't see any serious
regressions on a self-hosted clang build, or any of the nightly tests, but
I think it's important to get this out in the wild to get more testing.
Insights, feedback and comments welcome.

Many thanks to David Blaikie, Richard Smith, and especially John McCall for
their help and feedback on this work.

llvm-svn: 174919

11 years agoTiming data was removed years ago. Remove these links.
Tanya Lattner [Mon, 11 Feb 2013 23:32:10 +0000 (23:32 +0000)]
Timing data was removed years ago. Remove these links.

llvm-svn: 174918

11 years ago[ELF] Add support for reading dynamic libraries.
Michael J. Spencer [Mon, 11 Feb 2013 23:03:35 +0000 (23:03 +0000)]
[ELF] Add support for reading dynamic libraries.

llvm-svn: 174916

11 years agoBBVectorize: Don't over-search when building the dependency map
Hal Finkel [Mon, 11 Feb 2013 23:02:17 +0000 (23:02 +0000)]
BBVectorize: Don't over-search when building the dependency map

When building the pairable-instruction dependency map, don't search
past the last pairable instruction. For large blocks that have been
divided into multiple instruction groups, searching past the last
instruction in each group is very wasteful. This gives a 32% speedup
on the csa.ll test case from PR15222 (when using 50 instructions
in each group).

No functionality change intended.

llvm-svn: 174915

11 years agoBBVectorize: Omit unnecessary entries in PairableInstUsers
Hal Finkel [Mon, 11 Feb 2013 23:02:09 +0000 (23:02 +0000)]
BBVectorize: Omit unnecessary entries in PairableInstUsers

This map is queried only for instructions in pairs of pairable
instructions; so make sure that only pairs of pairable
instructions are added to the map. This gives a 3.5% speedup
on the csa.ll test case from PR15222.

No functionality change intended.

llvm-svn: 174914

11 years ago[Support][Compiler] Add LLVM_HAS_VARIADIC_TEMPLATES.
Michael J. Spencer [Mon, 11 Feb 2013 22:51:07 +0000 (22:51 +0000)]
[Support][Compiler] Add LLVM_HAS_VARIADIC_TEMPLATES.

llvm-svn: 174913

11 years ago[mips] Expand pseudo instructions before they are emitted in
Akira Hatanaka [Mon, 11 Feb 2013 22:35:40 +0000 (22:35 +0000)]
[mips] Expand pseudo instructions before they are emitted in
MipsCodeEmitter.cpp.

JALR and NOP are expanded by function emitPseudoExpansionLowering, which is not
called when the old JIT is used.

This fixes the following tests which have been failing on
llvm-mips-linux builder:

LLVM :: ExecutionEngine__2003-01-04-LoopTest.ll
LLVM :: ExecutionEngine__2003-05-06-LivenessClobber.ll
LLVM :: ExecutionEngine__2003-06-04-bzip2-bug.ll
LLVM :: ExecutionEngine__2005-12-02-TailCallBug.ll
LLVM :: ExecutionEngine__2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
LLVM :: ExecutionEngine__hello2.ll
LLVM :: ExecutionEngine__stubs.ll
LLVM :: ExecutionEngine__test-branch.ll
LLVM :: ExecutionEngine__test-call.ll
LLVM :: ExecutionEngine__test-common-symbols.ll
LLVM :: ExecutionEngine__test-loadstore.ll
LLVM :: ExecutionEngine__test-loop.ll

llvm-svn: 174912

11 years agoRename AttributeSets to AttributeGroups so that it's more meaningful.
Bill Wendling [Mon, 11 Feb 2013 22:33:26 +0000 (22:33 +0000)]
Rename AttributeSets to AttributeGroups so that it's more meaningful.

llvm-svn: 174911

11 years agoUse a std::map so that we record the group ID.
Bill Wendling [Mon, 11 Feb 2013 22:32:29 +0000 (22:32 +0000)]
Use a std::map so that we record the group ID.

llvm-svn: 174910

11 years agoRename to something more sensible. No functionality change.
Bill Wendling [Mon, 11 Feb 2013 22:31:34 +0000 (22:31 +0000)]
Rename to something more sensible. No functionality change.

llvm-svn: 174909

11 years ago[mips] Fix indentation.
Akira Hatanaka [Mon, 11 Feb 2013 22:03:52 +0000 (22:03 +0000)]
[mips] Fix indentation.

llvm-svn: 174907

11 years agoDon't bother reconciling external visible decls against our current set of
Richard Smith [Mon, 11 Feb 2013 22:02:16 +0000 (22:02 +0000)]
Don't bother reconciling external visible decls against our current set of
declarations if we didn't have a lookup map when the external decls were added.

llvm-svn: 174906

11 years agoOptimization: bitcast (<1 x ...> insertelement ..., X, ...) to ... ==> bitcast X...
Michael Ilseman [Mon, 11 Feb 2013 21:41:44 +0000 (21:41 +0000)]
Optimization: bitcast (<1 x ...> insertelement ..., X, ...) to ... ==> bitcast X to ...

llvm-svn: 174905

11 years agoExtend Hexagon hardware loop generation to handle various additional cases:
Krzysztof Parzyszek [Mon, 11 Feb 2013 21:37:55 +0000 (21:37 +0000)]
Extend Hexagon hardware loop generation to handle various additional cases:
- variety of compare instructions,
- loops with no preheader,
- arbitrary lower and upper bounds.

llvm-svn: 174904

11 years agoRemove trailing whitespace
Michael Ilseman [Mon, 11 Feb 2013 21:36:49 +0000 (21:36 +0000)]
Remove trailing whitespace

llvm-svn: 174903

11 years ago[tests] Another batch of timeout increases.
Daniel Dunbar [Mon, 11 Feb 2013 21:04:34 +0000 (21:04 +0000)]
[tests] Another batch of timeout increases.

llvm-svn: 174902

11 years agoImplement HexagonInstrInfo::analyzeCompare.
Krzysztof Parzyszek [Mon, 11 Feb 2013 20:04:29 +0000 (20:04 +0000)]
Implement HexagonInstrInfo::analyzeCompare.

llvm-svn: 174901

11 years ago*fixed disassembly of some i386 system insts with intel syntax
Kay Tiong Khoo [Mon, 11 Feb 2013 19:46:36 +0000 (19:46 +0000)]
*fixed disassembly of some i386 system insts with intel syntax
*added file for test cases for i386 intel syntax

llvm-svn: 174900

11 years agoobjective-C modern translator: Fixes a mistranslation
Fariborz Jahanian [Mon, 11 Feb 2013 19:30:33 +0000 (19:30 +0000)]
objective-C modern translator: Fixes a mistranslation
of @throw statement by finding location of the ';'
correctly. // rdar://13186010

llvm-svn: 174898

11 years agoForgot to add the testsuite for the changes I checked in on Friday.
Jim Ingham [Mon, 11 Feb 2013 19:05:29 +0000 (19:05 +0000)]
Forgot to add the testsuite for the changes I checked in on Friday.

llvm-svn: 174897

11 years ago[NVPTX] Remove NoCapture from address space conversion intrinsics. NoCapture is not...
Justin Holewinski [Mon, 11 Feb 2013 18:56:35 +0000 (18:56 +0000)]
[NVPTX] Remove NoCapture from address space conversion intrinsics. NoCapture is not valid in this case, and was causing incorrect optimizations.

llvm-svn: 174896

11 years ago[Modules] Cope better with top-level declarations loaded after being declared in...
Douglas Gregor [Mon, 11 Feb 2013 18:16:18 +0000 (18:16 +0000)]
[Modules] Cope better with top-level declarations loaded after being declared in the current translation unit <rdar://problem/13189985>.

These two related tweaks to keep the information associated with a
given identifier correct when the identifier has been given some
top-level information (say, a top-level declaration) and more
information is then loaded from a module. The first ensures that an
identifier that was "interesting" before being loaded from an AST is
considered to be different from its on-disk counterpart. Otherwise, we
lose such changes when writing the current translation unit as a
module.

Second, teach the code that injects AST-loaded names into the
identifier chain for name lookup to keep the most recent declaration,
so that we don't end up confusing our declaration chains by having a
different declaration in there.

llvm-svn: 174895

11 years ago[isl-codegen]: Fix off by one in getNumberOfIterations
Tobias Grosser [Mon, 11 Feb 2013 17:52:36 +0000 (17:52 +0000)]
[isl-codegen]: Fix off by one in getNumberOfIterations

We need to remove one dimension. Any is correct as long as it exists. We have
choosen for whatever reason the dimension #dims - 2. This is incorrect if
there is just one dimension. For CLooG this case did never happen. For isl
however, the case can happen and causes undefined behavior including crashes.
We choose now always the last dimension #dims - 1. We could have choosen
dimension '0' but the last dimension is what we remove conceptionally in the
algorithm, so it seems better to actually program it that way.

While at it remove another piece of undefined behavior.

llvm-svn: 174894

11 years agoBBVectorize: Eliminate one more restricted linear search
Hal Finkel [Mon, 11 Feb 2013 17:19:34 +0000 (17:19 +0000)]
BBVectorize: Eliminate one more restricted linear search

This eliminates one more linear search over a range of
std::multimap entries. This gives a 22% speedup on the
csa.ll test case from PR15222.

No functionality change intended.

llvm-svn: 174893

11 years agoAdd Vim frontend to LLDB.
Daniel Malea [Mon, 11 Feb 2013 17:18:14 +0000 (17:18 +0000)]
Add Vim frontend to LLDB.
- Access any LLDB CLI command in Vim by typing ":L<command>". Tab-completion
  works too!
- See source locations for breakpoints and the current PC with vim "marks"
  and highlights.
- Examine backtraces, locals, disassembly, registers, and breakpoints in
  dedicated Vim windows.
- See when in-scope variables and registers change by watching for (red)
  highlights.

This plugin opens multiple Vim "windows" to display debugger information.
To quit all windows at the same time use ":qa". The alternative would be
":q" to close each window separately.

This plugin is known to work on Mac OS X (Mountain Lion) with MacVim and
the system-provided terminal Vim, and on Linux (Ubuntu 12.04 and 12.10)
with GVim and the terminal Vim from the "vim-gnome" package.

llvm-svn: 174892

11 years agoAArch64: generate dwarfdump test rather than include .o in subversion
Tim Northover [Mon, 11 Feb 2013 16:28:12 +0000 (16:28 +0000)]
AArch64: generate dwarfdump test rather than include .o in subversion

llvm-svn: 174891

11 years agoR600/SI: Use V_ADD_F32 instead of V_MOV_B32 for clamp/neg/abs modifiers.
Michel Danzer [Mon, 11 Feb 2013 15:58:21 +0000 (15:58 +0000)]
R600/SI: Use V_ADD_F32 instead of V_MOV_B32 for clamp/neg/abs modifiers.

The modifiers don't seem to have any effect with V_MOV_B32, supposedly it's
meant to just move bits untouched.

Fixes 46 piglit tests with radeonsi, though unfortunately 11 of those had
just regressed because they started using the clamp modifier.

NOTE: This is a candidate for the Mesa stable branch.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174890

11 years agoFormatter: Detect ObjC message expressions after 'in' in loop
Nico Weber [Mon, 11 Feb 2013 15:32:15 +0000 (15:32 +0000)]
Formatter: Detect ObjC message expressions after 'in' in loop

Before:
  for (id foo in[self getStuffFor : bla]) {
  }

Now:
  for (id foo in [self getStuffFor:bla]) {
  }

"in" is treated as loop keyword if the line starts with "for", and as a
regular identifier else. To check for "in", its IdentifierInfo is handed
through a few layers.

llvm-svn: 174889

11 years ago[sanitizer] clang-format pass over scanf code.
Evgeniy Stepanov [Mon, 11 Feb 2013 15:22:34 +0000 (15:22 +0000)]
[sanitizer] clang-format pass over scanf code.

llvm-svn: 174888

11 years ago[sanitizer] scanf: don't report stores that did not happen.
Evgeniy Stepanov [Mon, 11 Feb 2013 15:16:48 +0000 (15:16 +0000)]
[sanitizer] scanf: don't report stores that did not happen.

Respect REAL(scanf) return value and don't report memory stores that
could potentially happen, but did not.

llvm-svn: 174887

11 years ago[asan] added a flag -mllvm asan-short-64bit-mapping-offset=1 (0 by default)
Kostya Serebryany [Mon, 11 Feb 2013 14:36:01 +0000 (14:36 +0000)]
[asan] added a flag -mllvm asan-short-64bit-mapping-offset=1 (0 by default)
This flag makes asan use a small (<2G) offset for 64-bit asan shadow mapping.
On x86_64 this saves us a register, thus achieving ~2/3 of the
zero-base-offset's benefits in both performance and code size.

Thanks Jakub Jelinek for the idea.

llvm-svn: 174886

11 years agoAArch64: fix build on some MSVC versions
Tim Northover [Mon, 11 Feb 2013 14:25:52 +0000 (14:25 +0000)]
AArch64: fix build on some MSVC versions

This does two things:

It removes a call to abs() which may have "long long" parameter on Windows,
which is not necessarily available in C++03.

It also corrects the signedness of Amount, which was relying on
implementation-defined conversions previously.

Code was already tested (albeit in an implemnetation defined way) so no extra
tests.

llvm-svn: 174885

11 years agoRestore the resurrected doc link previously deleted
Bill Schmidt [Mon, 11 Feb 2013 14:14:32 +0000 (14:14 +0000)]
Restore the resurrected doc link previously deleted

llvm-svn: 174884

11 years ago[sanitizer] Remove an extra va_copy.
Evgeniy Stepanov [Mon, 11 Feb 2013 14:08:12 +0000 (14:08 +0000)]
[sanitizer] Remove an extra va_copy.

llvm-svn: 174883

11 years ago[sanitizer] Scanf parser improvements.
Evgeniy Stepanov [Mon, 11 Feb 2013 14:04:24 +0000 (14:04 +0000)]
[sanitizer] Scanf parser improvements.

Handle %a in cases when it is unambiguous.
Handle %m.

Patch by Jakub Jelinek.

llvm-svn: 174882

11 years agoRemove a dead PowerPC doc link
Bill Schmidt [Mon, 11 Feb 2013 13:16:30 +0000 (13:16 +0000)]
Remove a dead PowerPC doc link

llvm-svn: 174881

11 years agoGet rid of manual debug output, now that the test runner supports it.
Manuel Klimek [Mon, 11 Feb 2013 12:37:30 +0000 (12:37 +0000)]
Get rid of manual debug output, now that the test runner supports it.

You can run tests with -debug instead now.

llvm-svn: 174880

11 years agoFix invalid formatting with spaces before trailing comments.
Daniel Jasper [Mon, 11 Feb 2013 12:36:37 +0000 (12:36 +0000)]
Fix invalid formatting with spaces before trailing comments.

In google style, trailing comments are separated by two spaces. This
patch fixes the counting of these spaces and prevents clang-format from
creating a line with 81 columns.

llvm-svn: 174879

11 years agoFixes handling of empty lines in macros.
Manuel Klimek [Mon, 11 Feb 2013 12:33:24 +0000 (12:33 +0000)]
Fixes handling of empty lines in macros.

Now correctly formats:
 #define A \
   \
   b;
to
 #define A b;

Added the state whether an unwrapped line is a macro to the debug
output.

llvm-svn: 174878

11 years agoAArch64: Simplify logic in deciding whether bfi is valid
Tim Northover [Mon, 11 Feb 2013 12:32:18 +0000 (12:32 +0000)]
AArch64: Simplify logic in deciding whether bfi is valid

Previous code had a confusing comment which was mostly an implementation
detail. This condition corresponds to "lsb up to register width" and "width not
ridiculous".

llvm-svn: 174877

11 years ago[msan] Lit tests for MemorySanitizer.
Evgeniy Stepanov [Mon, 11 Feb 2013 11:34:26 +0000 (11:34 +0000)]
[msan] Lit tests for MemorySanitizer.

Build system setup for MSan lit tests (build with freshly-built clang, run,
check output) - a nearly exact copy from ASan.
First 2 lit tests for MSan.

llvm-svn: 174876

11 years ago[tsan] added tsan-vs-gvn test
Kostya Serebryany [Mon, 11 Feb 2013 11:28:03 +0000 (11:28 +0000)]
[tsan] added tsan-vs-gvn test

llvm-svn: 174875

11 years agoAArch64: Add basic relocation processing for llvm-dwarfdump.
Tim Northover [Mon, 11 Feb 2013 11:16:02 +0000 (11:16 +0000)]
AArch64: Add basic relocation processing for llvm-dwarfdump.

This allows llvm-dwarfdump to handle the relocations needed, at least
for LLVM-produced code.

llvm-svn: 174874

11 years agoAArch64: Undo change to how test was run
Tim Northover [Mon, 11 Feb 2013 10:51:41 +0000 (10:51 +0000)]
AArch64: Undo change to how test was run

This broke on Windows, presumably due to interleaving of output streams.

llvm-svn: 174873

11 years ago[cmake] Make CLooG optional
Tobias Grosser [Mon, 11 Feb 2013 10:36:19 +0000 (10:36 +0000)]
[cmake] Make CLooG optional

CLooG is already optional in the autoconf build.

llvm-svn: 174872

11 years agoMake use of DiagnosticType to provide better AArch64 diagnostics.
Tim Northover [Mon, 11 Feb 2013 09:29:37 +0000 (09:29 +0000)]
Make use of DiagnosticType to provide better AArch64 diagnostics.

This gives a DiagnosticType to all AsmOperands in sight. This replaces all
"invalid operand" diagnostics with something more specific. The messages given
should still be sufficiently vague that they're not usually actively misleading
when LLVM guesses your instruction incorrectly.

llvm-svn: 174871

11 years agoAdd support for updating LiveIntervals to MachineBasicBlock::SplitCriticalEdge().
Cameron Zwarich [Mon, 11 Feb 2013 09:24:47 +0000 (09:24 +0000)]
Add support for updating LiveIntervals to MachineBasicBlock::SplitCriticalEdge().
This is currently a bit hairier than it needs to be, since depending on where the
split block resides the end ListEntry of the split block may be the end ListEntry
of the original block or a new entry. Some changes to the SlotIndexes updating
should make it possible to eliminate the two cases here.

This also isn't as optimized as it could be. In the future Liveinterval should
probably get a flag that indicates whether the LiveInterval is within a single
basic block. We could ignore all such intervals when splitting an edge.

llvm-svn: 174870

11 years agoUpdate SlotIndexes after updateTerminator() possibly removes instructions. I am
Cameron Zwarich [Mon, 11 Feb 2013 09:24:45 +0000 (09:24 +0000)]
Update SlotIndexes after updateTerminator() possibly removes instructions. I am
really trying to avoid piping SlotIndexes through to RemoveBranch() and friends.

llvm-svn: 174869

11 years agoFix some problems with the updating of SlotIndexes after adding a new MBB. In
Cameron Zwarich [Mon, 11 Feb 2013 09:24:42 +0000 (09:24 +0000)]
Fix some problems with the updating of SlotIndexes after adding a new MBB. In
particular, holes were being left between two blocks after splitting an edge.

llvm-svn: 174868

11 years agoAdd support for printing out the attribute groups.
Bill Wendling [Mon, 11 Feb 2013 08:43:33 +0000 (08:43 +0000)]
Add support for printing out the attribute groups.

This emits the attribute groups that are used by the functions. (It currently
doesn't print out return type or parameter attributes within attribute groups.)

Note: The functions still retrieve their attributes from the "old" bitcode
format (using the deprecated 'Raw()' method). This means that string attributes
within an attribute group will not show up during a disassembly. This will be
addressed in a future commit.

llvm-svn: 174867

11 years agoUpdate test to not fail with attribute groups.
Bill Wendling [Mon, 11 Feb 2013 08:35:52 +0000 (08:35 +0000)]
Update test to not fail with attribute groups.

llvm-svn: 174866

11 years agoFileCheck-ize the tests.
Bill Wendling [Mon, 11 Feb 2013 08:34:57 +0000 (08:34 +0000)]
FileCheck-ize the tests.

llvm-svn: 174865

11 years ago[tsan/msan] adding thread_safety and uninitialized_checks attributes
Kostya Serebryany [Mon, 11 Feb 2013 08:13:54 +0000 (08:13 +0000)]
[tsan/msan] adding thread_safety and uninitialized_checks attributes

llvm-svn: 174864

11 years agoFix formatting of overloaded operator definitions.
Daniel Jasper [Mon, 11 Feb 2013 08:01:18 +0000 (08:01 +0000)]
Fix formatting of overloaded operator definitions.

Before:
operatorvoid*();
operator vector< A< A>>();

After:
operator void *();
operator vector<A<A> >();

llvm-svn: 174863

11 years agoDo not use VariadicDynCastAllOfMatcher where VariadicAllOfMatcher works.
Manuel Klimek [Mon, 11 Feb 2013 07:45:01 +0000 (07:45 +0000)]
Do not use VariadicDynCastAllOfMatcher where VariadicAllOfMatcher works.

llvm-svn: 174862

11 years ago[sanitizer] Fix line numbers in a sanitizer lit test.
Evgeniy Stepanov [Mon, 11 Feb 2013 07:19:24 +0000 (07:19 +0000)]
[sanitizer] Fix line numbers in a sanitizer lit test.

llvm-svn: 174861

11 years agoRevert "Rename LLVMContext diagnostic handler types and functions."
Bob Wilson [Mon, 11 Feb 2013 05:37:07 +0000 (05:37 +0000)]
Revert "Rename LLVMContext diagnostic handler types and functions."

This reverts my commit 171047. Now that I've removed my misguided attempt to
support backend warnings, these diagnostics are only about inline assembly.
It would take quite a bit more work to generalize them properly, so I'm
just reverting this.

llvm-svn: 174860

11 years agoBBVectorize: Remove the linear searches from pair connection searching
Hal Finkel [Mon, 11 Feb 2013 05:29:51 +0000 (05:29 +0000)]
BBVectorize: Remove the linear searches from pair connection searching

This removes the last of the linear searches over ranges of std::multimap
iterators, giving a 7% speedup on the doduc.bc input from PR15222.

No functionality change intended.

llvm-svn: 174859

11 years agoBBVectorize: Avoid linear searches within the load-move set
Hal Finkel [Mon, 11 Feb 2013 05:29:49 +0000 (05:29 +0000)]
BBVectorize: Avoid linear searches within the load-move set

This is another cleanup aimed at eliminating linear searches
in ranges of std::multimap.

No functionality change intended.

llvm-svn: 174858

11 years agoBBVectorize: isa/cast cleanup in getInstructionTypes
Hal Finkel [Mon, 11 Feb 2013 05:29:48 +0000 (05:29 +0000)]
BBVectorize: isa/cast cleanup in getInstructionTypes

Profiling suggests that getInstructionTypes is performance-sensitive,
this cleans up some double-casting in that function in favor of
using dyn_cast.

No functionality change intended.

llvm-svn: 174857

11 years agoBBVectorize: Make the bookkeeping to support full cycle checking less expensive
Hal Finkel [Mon, 11 Feb 2013 05:29:41 +0000 (05:29 +0000)]
BBVectorize: Make the bookkeeping to support full cycle checking less expensive

By itself, this does not have much of an effect, but only because in the default
configuration the full cycle checks are used only for small problem sizes.
This is part of a general cleanup of uses of iteration over std::multimap
ranges only for the purpose of checking membership.

No functionality change intended.

llvm-svn: 174856

11 years agoCurrently, codegen may spent some time in SDISel passes even if an entire
Evan Cheng [Mon, 11 Feb 2013 01:27:15 +0000 (01:27 +0000)]
Currently, codegen may spent some time in SDISel passes even if an entire
function is successfully handled by fast-isel. That's because function
arguments are *always* handled by SDISel. Introduce FastLowerArguments to
allow each target to provide hook to handle formal argument lowering.

As a proof-of-concept, add ARMFastIsel::FastLowerArguments to handle
functions with 4 or fewer scalar integer (i8, i16, or i32) arguments. It
completely eliminates the need for SDISel for trivial functions.

rdar://13163905

llvm-svn: 174855

11 years agoRemove unnecessary code.
Evan Cheng [Mon, 11 Feb 2013 01:18:26 +0000 (01:18 +0000)]
Remove unnecessary code.

llvm-svn: 174854

11 years agoFix unnecessary removal of const through cast machinery
David Blaikie [Mon, 11 Feb 2013 01:16:51 +0000 (01:16 +0000)]
Fix unnecessary removal of const through cast machinery

I have some uncommitted changes to the cast code that catch this sort of thing
at compile-time but I still need to do some other cleanup before I can enable
it.

llvm-svn: 174853

11 years agoSpelling correction
Joel Jones [Sun, 10 Feb 2013 23:56:30 +0000 (23:56 +0000)]
Spelling correction

llvm-svn: 174852

11 years agoFix the unused but nearly correct method SlotIndexes::insertMBBInMaps() and add
Cameron Zwarich [Sun, 10 Feb 2013 23:29:54 +0000 (23:29 +0000)]
Fix the unused but nearly correct method SlotIndexes::insertMBBInMaps() and add
support for updating SlotIndexes to MachineBasicBlock::SplitCriticalEdge(). This
calls renumberIndexes() every time; it should be improved to only renumber
locally.

llvm-svn: 174851

11 years agoAbstract the liveness checking in PHIElimination::SplitPHIEdges() to support
Cameron Zwarich [Sun, 10 Feb 2013 23:29:49 +0000 (23:29 +0000)]
Abstract the liveness checking in PHIElimination::SplitPHIEdges() to support
both LiveVariables and LiveIntervals.

llvm-svn: 174850

11 years agoAdd support in the bitcode reader to read the attribute groups.
Bill Wendling [Sun, 10 Feb 2013 23:24:25 +0000 (23:24 +0000)]
Add support in the bitcode reader to read the attribute groups.

This reads the attribute groups. It currently doesn't do anything with them.

NOTE: In the commit to the bitcode writer, the format *may* change in the near
future. Which means that this code would also change.

llvm-svn: 174849

11 years agoThe 'Raw' method cannot handle 'string' attributes. Don't even try.
Bill Wendling [Sun, 10 Feb 2013 23:18:05 +0000 (23:18 +0000)]
The 'Raw' method cannot handle 'string' attributes. Don't even try.

llvm-svn: 174848

11 years agoUpdate with attribute group IDs.
Bill Wendling [Sun, 10 Feb 2013 23:17:10 +0000 (23:17 +0000)]
Update with attribute group IDs.

llvm-svn: 174847

11 years agoEat the alignment keyword if we're in an attribute group.
Bill Wendling [Sun, 10 Feb 2013 23:15:51 +0000 (23:15 +0000)]
Eat the alignment keyword if we're in an attribute group.

llvm-svn: 174846

11 years agoAdd code for emitting the attribute groups.
Bill Wendling [Sun, 10 Feb 2013 23:09:32 +0000 (23:09 +0000)]
Add code for emitting the attribute groups.

This is some initial code for emitting the attribute groups into the bitcode.

NOTE: This format *may* change! Do not rely upon the attribute groups' bitcode
not changing.

llvm-svn: 174845

11 years agoAdd support for attribute groups in the value enumerator.
Bill Wendling [Sun, 10 Feb 2013 23:06:02 +0000 (23:06 +0000)]
Add support for attribute groups in the value enumerator.

Attribute groups are essentially all AttributeSets which are used by the
program. Enumerate them here.

llvm-svn: 174844

11 years agoFormatter: Remove now-unneeded code for formatting ':'s in ObjC method decls.
Nico Weber [Sun, 10 Feb 2013 21:08:31 +0000 (21:08 +0000)]
Formatter: Remove now-unneeded code for formatting ':'s in ObjC method decls.

The more general code for formatting ObjC method exprs does this and more,
it's no longer necessary to special-case this. No behavior change.

llvm-svn: 174843

11 years agoFormatter: Add a test for multi-line ObjC dict literals.
Nico Weber [Sun, 10 Feb 2013 20:48:24 +0000 (20:48 +0000)]
Formatter: Add a test for multi-line ObjC dict literals.

As it turns out, this already works reasonably well.

This example from http://clang.llvm.org/docs/ObjectiveCLiterals.html
NSDictionary *dictionary = @{
    @"name" : NSUserName(),
    @"date" : [NSDate date],
    @"processInfo" : [NSProcessInfo processInfo]
};

is formatted like
NSDictionary *dictionary = @{ @"name" : NSUserName(), @"date" : [NSDate date],
                              @"processInfo" : [NSProcessInfo processInfo] };

There's already a FIXME in NestedStaticInitializers about supporting one
initializer per line, which is really all that's missing here too.

llvm-svn: 174842

11 years agoFormatter: Add another ObjC literal test.
Nico Weber [Sun, 10 Feb 2013 20:39:05 +0000 (20:39 +0000)]
Formatter: Add another ObjC literal test.

(From http://clang.llvm.org/docs/ObjectiveCLiterals.html.)

llvm-svn: 174841

11 years agoFormatter: Initial support for ObjC dictionary literals.
Nico Weber [Sun, 10 Feb 2013 20:35:35 +0000 (20:35 +0000)]
Formatter: Initial support for ObjC dictionary literals.

Before:
  @{
  foo:
    bar
  }
  ;

Now:
  @{ foo : bar };

parseBracedList() already does the right thing from an UnwrappedLineParser
perspective, so check for "@{" in all loops that process constructs that can
contain expressions and call parseBracedList() if found.

llvm-svn: 174840

11 years agoTest Commit - Remove some trailing whitespace in R600Instructions.td
Vincent Lejeune [Sun, 10 Feb 2013 17:57:33 +0000 (17:57 +0000)]
Test Commit - Remove some trailing whitespace in R600Instructions.td

llvm-svn: 174839