oota-llvm.git
9 years ago[Hexagon] Organizing tests and adding a few missing jump instruction encodings.
Colin LeMahieu [Thu, 29 Jan 2015 21:47:15 +0000 (21:47 +0000)]
[Hexagon] Organizing tests and adding a few missing jump instruction encodings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227498 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding missing instruction encodings and tests.
Colin LeMahieu [Thu, 29 Jan 2015 21:30:22 +0000 (21:30 +0000)]
[Hexagon] Adding missing instruction encodings and tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227495 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding alu vector instructions
Colin LeMahieu [Thu, 29 Jan 2015 21:09:30 +0000 (21:09 +0000)]
[Hexagon] Adding alu vector instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227493 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[GVN] don't propagate equality comparisons of FP zero (PR22376)
Sanjay Patel [Thu, 29 Jan 2015 20:51:49 +0000 (20:51 +0000)]
[GVN] don't propagate equality comparisons of FP zero (PR22376)

In http://reviews.llvm.org/D6911, we allowed GVN to propagate FP equalities
to allow some simple value range optimizations. But that introduced a bug
when comparing to -0.0 or 0.0: these compare equal even though they are not
bitwise identical.

This patch disallows propagating zero constants in equality comparisons.
Fixes: http://llvm.org/bugs/show_bug.cgi?id=22376
Differential Revision: http://reviews.llvm.org/D7257

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227491 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAll signal handlers are required to have C language linkage in C++. This does not...
Aaron Ballman [Thu, 29 Jan 2015 20:48:34 +0000 (20:48 +0000)]
All signal handlers are required to have C language linkage in C++. This does not fix all signal handlers, but does fix the most recent one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227490 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd missing test from r227488
David Blaikie [Thu, 29 Jan 2015 20:25:46 +0000 (20:25 +0000)]
Add missing test from r227488

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227489 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMatching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug...
David Blaikie [Thu, 29 Jan 2015 20:23:47 +0000 (20:23 +0000)]
Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227488 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactor test to be reused across architectures
David Blaikie [Thu, 29 Jan 2015 20:21:24 +0000 (20:21 +0000)]
Refactor test to be reused across architectures

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227487 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove erroneous REQUIRES: object-emission for asm test.
David Blaikie [Thu, 29 Jan 2015 20:17:15 +0000 (20:17 +0000)]
Remove erroneous REQUIRES: object-emission for asm test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227486 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMissing test case for r227481
David Blaikie [Thu, 29 Jan 2015 19:40:02 +0000 (19:40 +0000)]
Missing test case for r227481

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227485 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Implement enableAggressiveFMAFusion
Matt Arsenault [Thu, 29 Jan 2015 19:34:32 +0000 (19:34 +0000)]
R600/SI: Implement enableAggressiveFMAFusion

Add tests for the various combines. This should
always be at least cycle neutral on all subtargets for f64,
and faster on some. For f32 we should prefer selecting
v_mad_f32 over v_fma_f32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227484 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Add subtarget feature for if f32 fma is fast
Matt Arsenault [Thu, 29 Jan 2015 19:34:25 +0000 (19:34 +0000)]
R600/SI: Add subtarget feature for if f32 fma is fast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227483 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix tonga's basic scheduling model
Matt Arsenault [Thu, 29 Jan 2015 19:34:18 +0000 (19:34 +0000)]
R600/SI: Fix tonga's basic scheduling model

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227482 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps
David Blaikie [Thu, 29 Jan 2015 19:09:18 +0000 (19:09 +0000)]
DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps

The use of the DbgLoc in FastISel is probably something we should fix.
It's prone to leaking the wrong location into instructions - we should
have a clear chain of custody from the debug location of an IR
Instruction to that of a MachineInstr to avoid such leakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227481 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDisable compilation of llvm-pdbdump for versions of MSVC < 2013.
Zachary Turner [Thu, 29 Jan 2015 18:44:14 +0000 (18:44 +0000)]
Disable compilation of llvm-pdbdump for versions of MSVC < 2013.

Certain aspects of llvm-pdbdump require language support only present in
MSVC 2013 and higher.  Since this is strictly a utility, and since we hope
to drop support for MSVC 2012 soon, don't build this unless MSVC 2013 or
higher.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227479 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[fuzzer] fix warning in a test
Kostya Serebryany [Thu, 29 Jan 2015 18:13:36 +0000 (18:13 +0000)]
[fuzzer] fix warning in a test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227478 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCompute the ELF SectionKind from the flags.
Rafael Espindola [Thu, 29 Jan 2015 17:33:21 +0000 (17:33 +0000)]
Compute the ELF SectionKind from the flags.

Any code creating an MCSectionELF knows ELF and already provides the flags.

SectionKind is an abstraction used by common code that uses a plain
MCSection.

Use the flags to compute the SectionKind. This removes a lot of
guessing and boilerplate from the MCSectionELF construction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227476 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Deleting old variants of intrinsics and adding missing tests.
Colin LeMahieu [Thu, 29 Jan 2015 17:26:56 +0000 (17:26 +0000)]
[Hexagon] Deleting old variants of intrinsics and adding missing tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227474 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[lto] Disable dialog boxes on crash on Windows.
Michael J. Spencer [Thu, 29 Jan 2015 17:20:41 +0000 (17:20 +0000)]
[lto] Disable dialog boxes on crash on Windows.

This has to be done in the DLL because the state doesn't cross DLL boundaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227471 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Support][Windows] Unify dialog box suppression and print stack traces on abort.
Michael J. Spencer [Thu, 29 Jan 2015 17:20:29 +0000 (17:20 +0000)]
[Support][Windows] Unify dialog box suppression and print stack traces on abort.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227470 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[fuzzer] minor cleanup based on reviews: remove redundant includes, fix a copy-pasto...
Kostya Serebryany [Thu, 29 Jan 2015 17:16:23 +0000 (17:16 +0000)]
[fuzzer] minor cleanup based on reviews: remove redundant includes, fix a copy-pasto in tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227468 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[fuzzer] add FAQ section to the README.txt
Kostya Serebryany [Thu, 29 Jan 2015 17:11:30 +0000 (17:11 +0000)]
[fuzzer] add FAQ section to the README.txt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227466 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReverting r227452, which adds back the fuzzer library. Now excluding the fuzzer libra...
Aaron Ballman [Thu, 29 Jan 2015 16:58:29 +0000 (16:58 +0000)]
Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227464 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding CR intrinsic tests.
Colin LeMahieu [Thu, 29 Jan 2015 16:55:37 +0000 (16:55 +0000)]
[Hexagon] Adding CR intrinsic tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227463 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Remove stray debug statements
Tom Stellard [Thu, 29 Jan 2015 16:55:28 +0000 (16:55 +0000)]
R600/SI: Remove stray debug statements

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227462 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Define a schedule model and enable the generic machine scheduler
Tom Stellard [Thu, 29 Jan 2015 16:55:25 +0000 (16:55 +0000)]
R600/SI: Define a schedule model and enable the generic machine scheduler

The schedule model is not complete yet, and could be improved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227461 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Deleting unused classes.
Colin LeMahieu [Thu, 29 Jan 2015 16:35:38 +0000 (16:35 +0000)]
[Hexagon] Deleting unused classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227460 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOops -- accidentally commit some debug code! Removing that code; NFC (this time for...
Aaron Ballman [Thu, 29 Jan 2015 16:18:59 +0000 (16:18 +0000)]
Oops -- accidentally commit some debug code! Removing that code; NFC (this time for real).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227459 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Use single add/sub for large stack offsets
Robert Lougher [Thu, 29 Jan 2015 16:18:29 +0000 (16:18 +0000)]
[X86] Use single add/sub for large stack offsets

For large stack offsets the compiler generates multiple immediate mode
sub/add instructions in the prologue/epilogue.  This patch makes the
compiler place the final amount to be added/subtracted into a register,
which is then added/substracted with a single operation.

Differential Revision: http://reviews.llvm.org/D7226

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227458 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding XTYPE/PRED intrinsic tests. Converting predicate types to i32 inste...
Colin LeMahieu [Thu, 29 Jan 2015 16:08:43 +0000 (16:08 +0000)]
[Hexagon] Adding XTYPE/PRED intrinsic tests.  Converting predicate types to i32 instead of i1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227457 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAttempting to fix a build issue with MSVC 2012; NFC
Aaron Ballman [Thu, 29 Jan 2015 16:02:06 +0000 (16:02 +0000)]
Attempting to fix a build issue with MSVC 2012; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227456 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Complete setting the baseline for ppc64le
Bill Schmidt [Thu, 29 Jan 2015 15:59:09 +0000 (15:59 +0000)]
[PowerPC] Complete setting the baseline for ppc64le

Patch by Nemanja Ivanovic.

As was uncovered by the failing test case (when run on non-PPC
platforms), the feature set when compiling with -march=ppc64le was not
being picked up. This change ensures that if the -mcpu option is not
specified, the correct feature set is picked up regardless of whether
we are on PPC or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227455 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTemporarily reverting the fuzzer library as it causes too many build issues for MSVC...
Aaron Ballman [Thu, 29 Jan 2015 15:49:22 +0000 (15:49 +0000)]
Temporarily reverting the fuzzer library as it causes too many build issues for MSVC users. This reverts: 227445, 227395, 227389, 227357, 227254, 227252

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227452 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the test actually test what it's supposed to test. Add a test for the from memor...
Alex Rosenberg [Thu, 29 Jan 2015 15:19:54 +0000 (15:19 +0000)]
Make the test actually test what it's supposed to test. Add a test for the from memory variant of vcvtph2ps for 256-bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227446 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdding missing #includes to try to get this to compile on Windows with Visual Studio.
Aaron Ballman [Thu, 29 Jan 2015 15:19:13 +0000 (15:19 +0000)]
Adding missing #includes to try to get this to compile on Windows with Visual Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227445 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused tokens in the ll lexer.
Sean Silva [Thu, 29 Jan 2015 14:45:09 +0000 (14:45 +0000)]
Remove unused tokens in the ll lexer.

Patch by Robin Eklind!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227442 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse isMergeableConst now that it is sane.
Rafael Espindola [Thu, 29 Jan 2015 14:23:28 +0000 (14:23 +0000)]
Use isMergeableConst now that it is sane.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227441 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove MergeableConst.
Rafael Espindola [Thu, 29 Jan 2015 14:12:41 +0000 (14:12 +0000)]
Remove MergeableConst.

Only the specific ones (MergeableConst4, MergeableConst8, MergeableConst16) are
handled specially.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227440 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LoopReroll] Refactor most of reroll() into a helper class
James Molloy [Thu, 29 Jan 2015 13:48:05 +0000 (13:48 +0000)]
[LoopReroll] Refactor most of reroll() into a helper class

reroll() was slightly monolithic and a pain to modify. Refactor
a bunch of its state from local variables to member variables
of a helper class, and do some trivial simplification while we're
there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227439 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCleanup a few tests on sse4a machines and FileCheckize along the way.
Alex Rosenberg [Thu, 29 Jan 2015 13:31:32 +0000 (13:31 +0000)]
Cleanup a few tests on sse4a machines and FileCheckize along the way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227437 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoEHPrepare: Remove leftover initialization code for DomTrees.
Benjamin Kramer [Thu, 29 Jan 2015 13:26:50 +0000 (13:26 +0000)]
EHPrepare: Remove leftover initialization code for DomTrees.

While there modernize some loops. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227436 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse enum values. NFC.
Rafael Espindola [Thu, 29 Jan 2015 13:25:44 +0000 (13:25 +0000)]
Use enum values. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227435 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't create multiple mergeable sections with -fdata-sections.
Rafael Espindola [Thu, 29 Jan 2015 12:43:28 +0000 (12:43 +0000)]
Don't create multiple mergeable sections with -fdata-sections.

ELF has support for sections that can be split into fixed size or
null terminated entities.

Since these sections can be split by the linker, it is not necessary
to split them in codegen.

This reduces the combined .o size in a llvm+clang build from
202,394,570 to 173,819,098 bytes.

The time for linking clang with gold (on a VM, on a laptop) goes
from 2.250089985 to 1.383001792 seconds.

The flip side is the size of rodata in clang goes from 10,926,785
to 10,929,345 bytes.

The increase seems to be because of http://sourceware.org/bugzilla/show_bug.cgi?id=17902.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227431 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Mips][Disassembler] When disassembler meets cache/pref instructions for r6 it crashe...
Vladimir Medic [Thu, 29 Jan 2015 11:33:41 +0000 (11:33 +0000)]
[Mips][Disassembler] When disassembler meets cache/pref instructions for r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method for R6 CACHE_HINT_DESC class that properly handles decoding of these instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227430 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a missing Tag_DIV_use test for Cortex-M7.
Charlie Turner [Thu, 29 Jan 2015 11:19:54 +0000 (11:19 +0000)]
Add a missing Tag_DIV_use test for Cortex-M7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227429 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCommandLineParser: Avoid non-static member nitializer(s).
NAKAMURA Takumi [Thu, 29 Jan 2015 11:06:59 +0000 (11:06 +0000)]
CommandLineParser: Avoid non-static member nitializer(s).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227428 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the preprocessor checks used to determine if backtraces have been enabled.
Owen Anderson [Thu, 29 Jan 2015 07:53:13 +0000 (07:53 +0000)]
Fix the preprocessor checks used to determine if backtraces have been enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227424 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse the existing build configuration parameter ENABLE_BACKTRACE to compile out all...
Owen Anderson [Thu, 29 Jan 2015 07:35:31 +0000 (07:35 +0000)]
Use the existing build configuration parameter ENABLE_BACKTRACE to compile out all pretty stack trace support when backtraces are disabled.

This has the nice secondary effect of allowing LLVM to continue to build
for targets without __thread or thread_local support to continue to work
so long as they build without support for backtraces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227423 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ELFYAML] Provide default value 0 for YAML relocation addendum field
Simon Atanasyan [Thu, 29 Jan 2015 06:56:24 +0000 (06:56 +0000)]
[ELFYAML] Provide default value 0 for YAML relocation addendum field

Follow up to r227318.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227422 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove an unused private field added r227405 to fix a Clang warning.
Chandler Carruth [Thu, 29 Jan 2015 02:44:53 +0000 (02:44 +0000)]
Remove an unused private field added r227405 to fix a Clang warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227415 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LPM] Try again to appease powerpc64 in its self host. I've been unable
Chandler Carruth [Thu, 29 Jan 2015 02:34:17 +0000 (02:34 +0000)]
[LPM] Try again to appease powerpc64 in its self host. I've been unable
to get a powerpc64 host so that I can reproduce and test this, but it
only impacts that platform so trying the only other realistic option.

According to Ulrich, who debugged this initially, initial-exec is likely
to be sufficient for our needs and not subject to this bug. Will watch
the build bots to see.

If this doesn't work, I'll be forced to cut a really ugly pthread-based
approach into the primary user (our stack trace printing) as that user
cannot use the ThreadLocal implementation due to lifetime issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227414 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LPM] Fix an "obvious" typo from r227411. Really sorry for the noise.
Chandler Carruth [Thu, 29 Jan 2015 01:29:22 +0000 (01:29 +0000)]
[LPM] Fix an "obvious" typo from r227411. Really sorry for the noise.
Too many cases to compile everything quickly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227412 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LPM] Clean up the use of TLS in pretty stack trace and disable it
Chandler Carruth [Thu, 29 Jan 2015 01:23:04 +0000 (01:23 +0000)]
[LPM] Clean up the use of TLS in pretty stack trace and disable it
entirely when threads are not enabled. This should allow anyone who
needs to bootstrap or cope with a host loader without TLS support to
limp along without threading support.

There is still some bug in the PPC TLS stuff that is not worked around.
I'm getting access to a machine to reproduce and debug this further.
There is some chance that I'll have to add a terrible workaround for
PPC.

There is also some problem with iOS, but I have no ability to really
evaluate what the issue is there. I'm leaving it to folks maintaining
that platform to suggest a path forward -- personally I don't see any
useful path forward that supports threading in LLVM but does so without
support for *very basic* TLS. Note that we don't need more than some
pointers, and we don't need constructors, destructors, or any of the
other fanciness which remains widely unimplemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227411 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused variable
Reid Kleckner [Thu, 29 Jan 2015 00:55:44 +0000 (00:55 +0000)]
Remove unused variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227408 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a Windows EH preparation pass that zaps resumes
Reid Kleckner [Thu, 29 Jan 2015 00:41:44 +0000 (00:41 +0000)]
Add a Windows EH preparation pass that zaps resumes

If the personality is not a recognized MSVC personality function, this
pass delegates to the dwarf EH preparation pass. This chaining supports
people on *-windows-itanium or *-windows-gnu targets.

Currently this recognizes some personalities used by MSVC and turns
resume instructions into traps to avoid link errors.  Even if cleanups
are not used in the source program, LLVM requires the frontend to emit a
code path that resumes unwinding after an exception.  Clang does this,
and we get unreachable resume instructions. PR20300 covers cleaning up
these unreachable calls to resume.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D7216

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227405 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove getSubtargetImpl from AArch64ISelLowering and cache the
Eric Christopher [Thu, 29 Jan 2015 00:19:42 +0000 (00:19 +0000)]
Remove getSubtargetImpl from AArch64ISelLowering and cache the
correct subtarget by passing it in during the constructor as
TargetLowering is Subtarget specific.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227402 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove getSubtargetImpl from ARMISelLowering and cache the
Eric Christopher [Thu, 29 Jan 2015 00:19:39 +0000 (00:19 +0000)]
Remove getSubtargetImpl from ARMISelLowering and cache the
correct subtarget by passing it in during the constructor as
TargetLowering is Subtarget specific.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227401 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSmall cleanup in ARMFastISel initialization.
Eric Christopher [Thu, 29 Jan 2015 00:19:37 +0000 (00:19 +0000)]
Small cleanup in ARMFastISel initialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227400 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMigrate ARM except for TTI, AsmPrinter, and frame lowering
Eric Christopher [Thu, 29 Jan 2015 00:19:33 +0000 (00:19 +0000)]
Migrate ARM except for TTI, AsmPrinter, and frame lowering
away from getSubtargetImpl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227399 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd nullptr checks for TargetSelectionDAGInfo in SelectionDAG.
Manuel Jacob [Wed, 28 Jan 2015 23:50:40 +0000 (23:50 +0000)]
Add nullptr checks for TargetSelectionDAGInfo in SelectionDAG.

TSI is not guaranteed be non-null in SelectionDAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227397 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[fuzzer] add option -save_minimized_corpus
Kostya Serebryany [Wed, 28 Jan 2015 23:48:39 +0000 (23:48 +0000)]
[fuzzer] add option -save_minimized_corpus

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227395 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LPM] Fix the PPC attribute to be spelled 'global-dynamic'. This should
Chandler Carruth [Wed, 28 Jan 2015 23:10:57 +0000 (23:10 +0000)]
[LPM] Fix the PPC attribute to be spelled 'global-dynamic'. This should
let the build bot make finish compiling stage2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227391 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTeach SplitBlockPredecessors how to handle landingpad blocks.
Philip Reames [Wed, 28 Jan 2015 23:06:47 +0000 (23:06 +0000)]
Teach SplitBlockPredecessors how to handle landingpad blocks.

Patch by: Igor Laevsky <igor@azulsystems.com>

"Currently SplitBlockPredecessors generates incorrect code in case if basic block we are going to split has a landingpad. Also seems like it is fairly common case among it's users to conditionally call either SplitBlockPredecessors or SplitLandingPadPredecessors. Because of this I think it is reasonable to add this condition directly into SplitBlockPredecessors."

Differential Revision: http://reviews.llvm.org/D7157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227390 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd lit-style tests for the Fuzzer library
Kostya Serebryany [Wed, 28 Jan 2015 22:49:25 +0000 (22:49 +0000)]
Add lit-style tests for the Fuzzer library

Summary: Add test targets and the lit-style runner.

Test Plan: Run the tests on bot.

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227389 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofix typos; NFC
Sanjay Patel [Wed, 28 Jan 2015 22:37:32 +0000 (22:37 +0000)]
fix typos; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227386 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBuild fix for Visual Studio. NFC.
Chris Bieneman [Wed, 28 Jan 2015 22:25:00 +0000 (22:25 +0000)]
Build fix for Visual Studio. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227385 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Gather the DIE tree child->parent relationships.
Frederic Riss [Wed, 28 Jan 2015 22:15:14 +0000 (22:15 +0000)]
[dsymutil] Gather the DIE tree child->parent relationships.

The libDebugInfo DIE parsing doesn't store these relationships, we have to
recompute them. This commit introduces the CompileUnit bookkeeping class to
store this data. It will be expanded with more fields in the future.

No tests as this produces no visible output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227382 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd DWARFUnit::getNumDIEs() and getDIEIndex()
Frederic Riss [Wed, 28 Jan 2015 22:15:07 +0000 (22:15 +0000)]
Add DWARFUnit::getNumDIEs() and getDIEIndex()

Parsed DIEs are stored in a vector and that makes it easy to get their
indices. Having easy access to a DIE's index makes it possible to use
arrays or vectors to efficiently store/access DIE related information.

There's no test for that new functionality (I don't see how to test
it standalone), but it'll be used in a subsequent dsymutil commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227381 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Updating several V5 intrinsics and adding FP tests.
Colin LeMahieu [Wed, 28 Jan 2015 22:08:16 +0000 (22:08 +0000)]
[Hexagon] Updating several V5 intrinsics and adding FP tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227379 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSpelling fixes. NFC.
Simon Pilgrim [Wed, 28 Jan 2015 22:03:52 +0000 (22:03 +0000)]
Spelling fixes. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227376 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLine endings fix. NFC.
Simon Pilgrim [Wed, 28 Jan 2015 21:56:52 +0000 (21:56 +0000)]
Line endings fix. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227374 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Implement SWM and LWM aliases
Zoran Jovanovic [Wed, 28 Jan 2015 21:52:27 +0000 (21:52 +0000)]
[mips][microMIPS] Implement SWM and LWM aliases
Differential Revision: http://reviews.llvm.org/D5820

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227373 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[fuzzer] instructions for building/running clang-format-fuzzer
Kostya Serebryany [Wed, 28 Jan 2015 19:51:58 +0000 (19:51 +0000)]
[fuzzer] instructions for building/running clang-format-fuzzer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227357 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoinvert check for less indentation; use local vars to reduce duplication; NFC
Sanjay Patel [Wed, 28 Jan 2015 19:44:21 +0000 (19:44 +0000)]
invert check for less indentation; use local vars to reduce duplication; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227355 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Updating many V4 intrinsic patterns. Adding missing instruction and deleti...
Colin LeMahieu [Wed, 28 Jan 2015 19:39:09 +0000 (19:39 +0000)]
[Hexagon] Updating many V4 intrinsic patterns.  Adding missing instruction and deleting unused classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227353 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LPM] Try to work around a bug with local-dynamic TLS on PowerPC 64.
Chandler Carruth [Wed, 28 Jan 2015 19:29:22 +0000 (19:29 +0000)]
[LPM] Try to work around a bug with local-dynamic TLS on PowerPC 64.

Sadly, this precludes optimizing it down to initial-exec or local-exec
when statically linking, and in general makes the code slower on PPC 64,
but there's nothing else for it until we can arrange to produce the
correct bits for the linker.

Lots of thanks to Ulirch for tracking this down and Bill for working on
the long-term fix to LLVM so that we can relegate this to old host
clang versions.

I'll be watching the PPC build bots to make sure this effectively
revives them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227352 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove gc.root's performCustomLowering
Philip Reames [Wed, 28 Jan 2015 19:28:03 +0000 (19:28 +0000)]
Remove gc.root's performCustomLowering

This is a refactoring to restructure the single user of performCustomLowering as a specific lowering pass and remove the custom lowering hook entirely.

Before this change, the LowerIntrinsics pass (note to self: rename!) was essentially acting as a pass manager, but without being structured in terms of passes. Instead, it proxied calls to a set of GCStrategies internally. This adds a lot of conceptual complexity (i.e. GCStrategies are stateful!) for very little benefit. Since there's been interest in keeping the ShadowStackGC working, I extracting it's custom lowering pass into a dedicated pass and just added that to the pass order. It will only run for functions which opt-in to that gc.

I wasn't able to find an easy way to preserve the runtime registration of custom lowering functionality. Given that no user of this exists that I'm aware of, I made the choice to just remove that. If someone really cares, we can look at restoring it via dynamic pass registration in the future.

Note that despite the large diff, none of the lowering code actual changes. I added the framing needed to make it a pass and rename the class, but that's it.

Differential Revision: http://reviews.llvm.org/D7218

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227351 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMoving AddLiteralOption's declaration higher up in the header to make gcc happy.
Chris Bieneman [Wed, 28 Jan 2015 19:17:09 +0000 (19:17 +0000)]
Moving AddLiteralOption's declaration higher up in the header to make gcc happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227348 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding XTYPE/MPY intrinsic tests and some missing multiply instructions.
Colin LeMahieu [Wed, 28 Jan 2015 19:16:17 +0000 (19:16 +0000)]
[Hexagon] Adding XTYPE/MPY intrinsic tests and some missing multiply instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227347 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactoring llvm command line parsing and option registration.
Chris Bieneman [Wed, 28 Jan 2015 19:00:25 +0000 (19:00 +0000)]
Refactoring llvm command line parsing and option registration.

Summary:
The primary goal of this patch is to remove the need for MarkOptionsChanged(). That goal is accomplished by having addOption and removeOption properly sort the options.

This patch puts the new add and remove functionality on a CommandLineParser class that is a placeholder. Some of the functionality in this class will need to be merged into the OptionRegistry, and other bits can hopefully be in a better abstraction.

This patch also removes the RegisteredOptionList global, and the need for cl::Option objects to be linked list nodes.

The changes in CommandLineTest.cpp are required because these changes shift when we validate that options are not duplicated. Before this change duplicate options were only found during certain cl API calls (like cl::ParseCommandLine). With this change duplicate options are found during option construction.

Reviewers: dexonsmith, chandlerc, pete

Reviewed By: pete

Subscribers: pete, majnemer, llvm-commits

Differential Revision: http://reviews.llvm.org/D7132

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227345 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAssume code ownership for the PS4 to ensure patches get reviewed, per the Developer...
Alex Rosenberg [Wed, 28 Jan 2015 18:33:39 +0000 (18:33 +0000)]
Assume code ownership for the PS4 to ensure patches get reviewed, per the Developer Policy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227340 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix build breakage caused by memory leaks in llvm-c-test
Bjorn Steinbrink [Wed, 28 Jan 2015 18:32:31 +0000 (18:32 +0000)]
Fix build breakage caused by memory leaks in llvm-c-test

I accidently introduced those in r227319.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227339 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Deleting a lot of old variants of intrinsics and updating references.
Colin LeMahieu [Wed, 28 Jan 2015 18:29:11 +0000 (18:29 +0000)]
[Hexagon] Deleting a lot of old variants of intrinsics and updating references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227338 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Add DwarfLinker class.
Frederic Riss [Wed, 28 Jan 2015 18:27:01 +0000 (18:27 +0000)]
[dsymutil] Add DwarfLinker class.

It's an empty shell for now. It's main method just opens the debug
map objects and parses their Dwarf info. Test that we at least do
that correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227337 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Converting XTYPE/BIT intrinsic patterns and adding tests.
Colin LeMahieu [Wed, 28 Jan 2015 18:06:23 +0000 (18:06 +0000)]
[Hexagon] Converting XTYPE/BIT intrinsic patterns and adding tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227335 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agouse SDValue methods directly instead of getNode()->* ; NFCI
Sanjay Patel [Wed, 28 Jan 2015 18:01:31 +0000 (18:01 +0000)]
use SDValue methods directly instead of getNode()->* ; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227334 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify code. NFC.
Rafael Espindola [Wed, 28 Jan 2015 17:54:19 +0000 (17:54 +0000)]
Simplify code. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227333 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Replacing XTYPE/SHIFT intrinsic patternss. Adding tests and missing instru...
Colin LeMahieu [Wed, 28 Jan 2015 17:37:59 +0000 (17:37 +0000)]
[Hexagon] Replacing XTYPE/SHIFT intrinsic patternss.  Adding tests and missing instructions with tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227330 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips][microMIPS] Implement LWGP instruction
Jozef Kolek [Wed, 28 Jan 2015 17:27:26 +0000 (17:27 +0000)]
[mips][microMIPS] Implement LWGP instruction

Differential Revision: http://reviews.llvm.org/D6650

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227325 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Replacing intrinsics for halfword adds and max/min word/dword.
Colin LeMahieu [Wed, 28 Jan 2015 17:06:40 +0000 (17:06 +0000)]
[Hexagon] Replacing intrinsics for halfword adds and max/min word/dword.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227322 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Replacing old intrinsic tests with organized versions that match the refere...
Colin LeMahieu [Wed, 28 Jan 2015 16:58:05 +0000 (16:58 +0000)]
[Hexagon] Replacing old intrinsic tests with organized versions that match the reference manual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227321 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodes
Bjorn Steinbrink [Wed, 28 Jan 2015 16:35:59 +0000 (16:35 +0000)]
Fix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodes

Summary:
MetadataAsValue uses a canonical format that strips the MDNode if it
contains only a single constant value. This triggers an assertion when
trying to cast the value to a MDNode.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7165

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227319 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ELFYAML] Provide explicit value for relocation addendums in the test
Simon Atanasyan [Wed, 28 Jan 2015 16:22:50 +0000 (16:22 +0000)]
[ELFYAML] Provide explicit value for relocation addendums in the test

The `Addend` is an optional field of the `Relocation` YAML record. But
we do not provide its default value while reading it from a YAML file
and so it might keep uninitialized.

I am going to fix the code by a separate commit. We might either make
this field mandatory (at least for .rela sections) or specify 0 as
a default value explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227318 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x32] Change the condition from bitness to LP64 for TCRETURNdi64.
Michael Kuperstein [Wed, 28 Jan 2015 16:11:35 +0000 (16:11 +0000)]
[x32] Change the condition from bitness to LP64 for TCRETURNdi64.

TCRETURNmi64, which was mistakenly changed in r227307 will wait for another day.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227317 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Move DataLayout to AMDGPUTargetMachine
Tom Stellard [Wed, 28 Jan 2015 16:04:26 +0000 (16:04 +0000)]
R600: Move DataLayout to AMDGPUTargetMachine

This is a follow up to r227113.

It is now required to use the amdgcn target for SI and newer GPUs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227316 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Use a Southern Islands GPU as the default for the amdgcn target
Tom Stellard [Wed, 28 Jan 2015 15:38:42 +0000 (15:38 +0000)]
R600: Use a Southern Islands GPU as the default for the amdgcn target

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227314 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCorrect the AggressiveAntiDepBreaker's handling of subregisters defining super registers
Hal Finkel [Wed, 28 Jan 2015 14:44:14 +0000 (14:44 +0000)]
Correct the AggressiveAntiDepBreaker's handling of subregisters defining super registers

As the AggressiveAntiDepBreaker iterated backward through a scheduling region,
we must leave super registers live through subregister definitions so that all
relevant subregister definitions are renamed together. The problem was that we
were also discarding sub-register use locations as the sub-registers are
redefined. The result is that we'd rename the super register along with some,
but not all, subregister definitions.

  R0_D = {R0_L, R1_L}
  R0_L = {R0_S, R1_S}

  %R0_L<def> = TRLi9 16, pred:8, pred:%noreg
  %R1_L<def> = LSRLrr %R1_L<kill>, %R0_S, pred:8, pred:%noreg
  %R0_L<def> = LSRLrr %R2_L, %R0_S, pred:8, pred:%noreg, %R0_L<imp-use,kill>
  %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
  %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
  %R4_D<def> = ASRDrr %R0_D<kill>, %R6_S

  Anti:   %R4_D<def> = ASRDrr %R0_D<kill>, %R6_S
   Def Groups: R4_D=g213->g215(via R4_S)->g214(via R4_L)->g216(via R5_S)->g216(via R4_L)->g217(via R5_L)
   Use Groups: R0_D=g0->g218(last-use) R1_L->g219(last-use) R6_S=g204->g220(last-use)
  Anti:   %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R0_L=g208->g209(via R0_S)->g218(via R0_D)->g210(via R1_S)->g210(via R0_D)
   Antidep reg: R0_L (real dependency)
   Use Groups: R0_L=g210->g224(last-use) R0_S->g225(last-use) R1_S->g226(last-use)
  Anti:   %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R1_L=g219->g210(via R0_D)
   Antidep reg: R1_L (real dependency)
   Use Groups: R1_L=g210->g229(last-use)
  Anti:   %R0_L<def> = LSRLrr %R2_L, %R0_S, pred:8, pred:%noreg, %R0_L<imp-use,kill>
   Def Groups: R0_L=g224->g225(via R0_S)->g210(via R0_D)->g226(via R1_S)->g226(via R0_D)
   Antidep reg: R0_L Use Groups: R2_L=g192 R0_S=g226->g230(last-use) R0_L=g226->g231(last-use) R1_S->g232(last-use)
  Anti:   %R1_L<def> = LSRLrr %R1_L<kill>, %R0_S, pred:8, pred:%noreg
   Def Groups: R1_L=g229->g226(via R0_D)
   Antidep reg: R1_L Use Groups: R1_L=g226->g233(last-use) R0_S=g230
  Anti:   %R0_L<def> = TRLi9 16, pred:8, pred:%noreg
   Def Groups: R0_L=g231->g230(via R0_S)->g226(via R0_D)->g232(via R1_S)->g232(via R0_D)
   Antidep reg: R0_L
   Rename Candidates for Group g232:
    R0_D: elcInt64Regs :: R0_D R1_D R2_D R3_D R4_D R5_D R8_D R9_D R10_D R11_D R12_D R13_D R14_D R15_D R16_D R17_D R18_D R19_D R20_D R21_D R22_D R23_D R24_D R25_D
    R0_L: elcIntRegs :: R0_L R1_L R2_L R3_L R4_L R5_L R8_L R9_L R10_L R11_L R12_L R13_L R14_L R15_L R16_L R17_L R18_L R19_L R20_L R21_L R22_L R23_L R24_L R25_L
    R0_S: elcShrtRegs elcShrtRegs :: R0_S R1_S R2_S R3_S R4_S R5_S R8_S R9_S R10_S R11_S R12_S R13_S R14_S R15_S R16_S R17_S R18_S R19_S R20_S R21_S R22_S R23_S R24_S R25_S
   Find Registers: [R12_D: R12_D R12_L R12_S]
   Breaking anti-dependence edge on R0_L: R0_D->R12_D(1 refs) R0_L->R12_L(2 refs) R0_S->R12_S(2 refs)
   Use Groups:
  ...

  %R12_L<def> = TRLi9 16, pred:8, pred:%noreg
  %R1_L<def> = LSRLrr %R1_L<kill>, %R12_S, pred:8, pred:%noreg
  %R0_L<def> = LSRLrr %R2_L<kill>, %R12_S, pred:8, pred:%noreg, %R12_L<imp-use>
  %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
  %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
  %R4_D<def> = ASRDrr %R12_D<kill>, %R6_S

With this change, we now produce:

  Anti:   %R4_D<def> = ASRDrr %R0_D<kill>, %R6_S
   Def Groups: R4_D=g213->g215(via R4_S)->g214(via R4_L)->g216(via R5_S)->g216(via R4_L)->g217(via R5_L)
   Use Groups: R0_D=g0->g218(last-use) R1_L->g219(last-use) R6_S=g204->g220(last-use)
  Anti:   %R0_L<def> = ANDLri %R0_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R0_L=g208->g209(via R0_S)->g218(via R0_D)->g210(via R1_S)->g210(via R0_D)
   Antidep reg: R0_L (real dependency)
   Use Groups: R0_L=g210
  Anti:   %R1_L<def> = ANDLri %R1_L<kill>, 2047, pred:8, pred:%noreg
   Def Groups: R1_L=g219->g210(via R0_D)
   Antidep reg: R1_L (real dependency)
   Use Groups: R1_L=g210
  Anti:   %R0_L<def> = LSRLrr %R2_L, %R0_S, pred:8, pred:%noreg, %R0_L<imp-use,kill>
   Def Groups: R0_L=g210->g210(via R0_D)->g210(via R0_D)
   Antidep reg: R0_L Use Groups: R2_L=g192 R0_S=g210 R0_L=g210
  Anti:   %R1_L<def> = LSRLrr %R1_L<kill>, %R0_S, pred:8, pred:%noreg
   Def Groups: R1_L=g210->g210(via R0_D)
   Antidep reg: R1_L Use Groups: R1_L=g210 R0_S=g210
  Anti:   %R0_L<def> = TRLi9 16, pred:8, pred:%noreg
   Def Groups: R0_L=g210->g210(via R0_D)->g210(via R0_D)
   Antidep reg: R0_L
   Rename Candidates for Group g210:
    R0_D: elcInt64Regs :: R0_D R1_D R2_D R3_D R4_D R5_D R8_D R9_D R10_D R11_D R12_D R13_D R14_D R15_D R16_D R17_D R18_D R19_D R20_D R21_D R22_D R23_D R24_D R25_D
    R0_L: elcIntRegs elcIntAIRegs elcIntRegs elcIntRegs elcIntRegs elcIntRegs :: R0_L R1_L R2_L R3_L R4_L R5_L R8_L R9_L R10_L R11_L R12_L R13_L R14_L R15_L R16_L R17_L R18_L R19_L R20_L R21_L R22_L R23_L R24_L R25_L
    R1_L: elcIntRegs elcIntRegs elcIntRegs elcIntRegs elcIntRegs :: R0_L R1_L R2_L R3_L R4_L R5_L R8_L R9_L R10_L R11_L R12_L R13_L R14_L R15_L R16_L R17_L R18_L R19_L R20_L R21_L R22_L R23_L R24_L R25_L
    R0_S: elcShrtRegs elcShrtRegs :: R0_S R1_S R2_S R3_S R4_S R5_S R8_S R9_S R10_S R11_S R12_S R13_S R14_S R15_S R16_S R17_S R18_S R19_S R20_S R21_S R22_S R23_S R24_S R25_S
   Find Registers: [R12_D: R12_D R12_L R13_L R12_S]
   Breaking anti-dependence edge on R0_L: R0_D->R12_D(1 refs) R0_L->R12_L(7 refs) R1_L->R13_L(5 refs) R0_S->R12_S(2 refs)
   Use Groups:
  ...

  %R12_L<def> = TRLi9 16, pred:8, pred:%noreg
  %R13_L<def> = LSRLrr %R13_L<kill>, %R12_S, pred:8, pred:%noreg
  %R12_L<def> = LSRLrr %R2_L<kill>, %R12_S<kill>, pred:8, pred:%noreg, %R12_L<imp-use,kill>
  %R13_L<def> = ANDLri %R13_L<kill>, 2047, pred:8, pred:%noreg
  %R12_L<def> = ANDLri %R12_L<kill>, 2047, pred:8, pred:%noreg
  %R4_D<def> = ASRDrr %R12_D, %R6_S, %R12_L<imp-def>, %R12_S<imp-def>, %R13_S<imp-def>

As demonstrated by this example, this is also somewhat unfortunate, because
there is actually no need to rename the super register in this case (it is
fully covered by later subregister definitions), but we don't seem to track
enough information here to exploit that either.

Thanks to Daniil Troshkov for reporting the issue. The debug outputs in this
commit message are from Daniil.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227311 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Reduce some 32-bit imuls into lea + shl
Michael Kuperstein [Wed, 28 Jan 2015 14:08:22 +0000 (14:08 +0000)]
[X86] Reduce some 32-bit imuls into lea + shl

Reduce integer multiplication by a constant of the form k*2^c, where k is in {3,5,9} into a lea + shl. Previously it was only done for imulq on 64-bit platforms, but it makes sense for imull and 32-bit as well.

Differential Revision: http://reviews.llvm.org/D7196

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227308 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x32] Enable sibcall optimization on x32.
Michael Kuperstein [Wed, 28 Jan 2015 13:38:48 +0000 (13:38 +0000)]
[x32] Enable sibcall optimization on x32.

This includes two things:
1) Fix TCRETURNdi and TCRETURN64di patterns to check the right thing (LP64 as opposed to target bitness).
2) Allow LEA64_32 in MatchingStackOffset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227307 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[docs] Use slightly more proper .rst markup
Sean Silva [Wed, 28 Jan 2015 10:36:41 +0000 (10:36 +0000)]
[docs] Use slightly more proper .rst markup

Again, I'd like to emphasize to everyone that this sort of markup change
is *not* what you should be concerned about when writing docs. Focus on
*content*.

I applaud Chandler for focusing on the fantastic content of this new
section!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227305 91177308-0d34-0410-b5e6-96231b3b80d8