oota-llvm.git
12 years agoAdd inlining for the new EH scheme.
Bill Wendling [Sun, 14 Aug 2011 08:01:36 +0000 (08:01 +0000)]
Add inlining for the new EH scheme.

This builds off of the current scheme, but instead of llvm.eh.exception and
llvm.eh.selector, it uses the landingpad instruction. And instead of
llvm.eh.resume, it uses the resume instruction.

Because of the invariants in the landing pad instruction, a lot of code that's
currently needed to find the appropriate intrinsic calls for an invoke
instruction won't be needed once we go to the new EH scheme. The "FIXME"s tell
us what to remove after we switch.

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

12 years agoThis transform is not safe. Thanks to Eli for pointing that out!
Nick Lewycky [Sun, 14 Aug 2011 04:51:49 +0000 (04:51 +0000)]
This transform is not safe. Thanks to Eli for pointing that out!

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

12 years agoDon't attempt to add 'nsw' when intermediate instructions had no such guarantee.
Nick Lewycky [Sun, 14 Aug 2011 03:41:33 +0000 (03:41 +0000)]
Don't attempt to add 'nsw' when intermediate instructions had no such guarantee.

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

12 years agoTeach instcombine to preserve the nsw bit by doing an after-the-fact analysis
Nick Lewycky [Sun, 14 Aug 2011 01:45:19 +0000 (01:45 +0000)]
Teach instcombine to preserve the nsw bit by doing an after-the-fact analysis
when combining add and sub instructions. Patch by Pranav Bhandarkar!

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

12 years agoEE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.
NAKAMURA Takumi [Sun, 14 Aug 2011 00:34:04 +0000 (00:34 +0000)]
EE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.

With libcxx, it seems <unistd.h> would not be provided. Thanks to Ryuta Suzuki.

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

12 years agoFix PR 10635. When generating integer constants, the constant element type may
Nadav Rotem [Sat, 13 Aug 2011 20:31:45 +0000 (20:31 +0000)]
Fix PR 10635. When generating integer constants, the constant element type may
be illegal, even if the requested vector type is legal. Testcase is one of the
disabled ARM tests in the vector-select patch.

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

12 years agoFix test.
Eli Friedman [Sat, 13 Aug 2011 17:06:34 +0000 (17:06 +0000)]
Fix test.

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

12 years agoExpand VMOVQQQQ pseudo instructions.
Bob Wilson [Sat, 13 Aug 2011 05:14:55 +0000 (05:14 +0000)]
Expand VMOVQQQQ pseudo instructions.

Apparently we never added code to expand these pseudo instructions, and in
over a year, no one has noticed.  Our register allocator must be awesome!

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

12 years agoRemove the last improper use of getGlobalContext() from LLVM.
Nick Lewycky [Sat, 13 Aug 2011 01:04:44 +0000 (01:04 +0000)]
Remove the last improper use of getGlobalContext() from LLVM.

This caused a race condition where a thread calls ~LLVMContextImpl which calls
Module::dropAllReferences which calls begin() on an empty ilist that would
create the sentinel, which racily accesses the global context.

This can not be fixed by locking inside createSentinel because the lock would
need to be shared with all users of the global context, including those that
reside outside LLVM's own code.

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

12 years agoFix the getelementptr description so it is extremely clear that array indices passed...
Eli Friedman [Fri, 12 Aug 2011 23:37:55 +0000 (23:37 +0000)]
Fix the getelementptr description so it is extremely clear that array indices passed to getelementptr are signed.

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

12 years agoMove "atomic" and "volatile" designations on instructions after the opcode
Eli Friedman [Fri, 12 Aug 2011 22:50:01 +0000 (22:50 +0000)]
Move "atomic" and "volatile" designations on instructions after the opcode
of the instruction.

Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.

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

12 years agoARM STR_POST_IMM offset encoding fix in load/store optimizer.
Jim Grosbach [Fri, 12 Aug 2011 22:20:41 +0000 (22:20 +0000)]
ARM STR_POST_IMM offset encoding fix in load/store optimizer.

Tidy up the code a bit and push the definition of the value next to the uses
to try to minimize this sort of issue from arising again while I'm at it.

rdar://9945172

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

12 years agoFix comment!
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:54:42 +0000 (21:54 +0000)]
Fix comment!

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

12 years agoSome reorganization of atomic docs. Added explicit section for NonAtomic. Added...
Eli Friedman [Fri, 12 Aug 2011 21:50:54 +0000 (21:50 +0000)]
Some reorganization of atomic docs.  Added explicit section for NonAtomic.  Added example for illegal non-atomic operation.

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

12 years agoThe VPERM2F128 is a AVX instruction which permutes between two 256-bit
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:48:26 +0000 (21:48 +0000)]
The VPERM2F128 is a AVX instruction which permutes between two 256-bit
vectors. It operates on 128-bit elements instead of regular scalar
types. Recognize shuffles that are suitable for VPERM2F128 and teach
the x86 legalizer how to handle them.

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

12 years agoMove code around and add comments
Bruno Cardoso Lopes [Fri, 12 Aug 2011 21:48:22 +0000 (21:48 +0000)]
Move code around and add comments

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

12 years agoDefine unaligned load and store.
Akira Hatanaka [Fri, 12 Aug 2011 21:30:06 +0000 (21:30 +0000)]
Define unaligned load and store.

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

12 years agoARM expansion of pre-indexed store pseudos should maintain memoperands.
Jim Grosbach [Fri, 12 Aug 2011 21:02:34 +0000 (21:02 +0000)]
ARM expansion of pre-indexed store pseudos should maintain memoperands.

Partial fix for rdar://9945172.

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

12 years agoAdd checks for the landingpad instruction's clause values to make sure that
Bill Wendling [Fri, 12 Aug 2011 20:52:25 +0000 (20:52 +0000)]
Add checks for the landingpad instruction's clause values to make sure that
they're the correct type.

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

12 years agoFix some remaining issues with decoding ARM-mode memory instructions, and add another...
Owen Anderson [Fri, 12 Aug 2011 20:36:11 +0000 (20:36 +0000)]
Fix some remaining issues with decoding ARM-mode memory instructions, and add another batch of tests.

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

12 years agoInitial commit of the 'landingpad' instruction.
Bill Wendling [Fri, 12 Aug 2011 20:24:12 +0000 (20:24 +0000)]
Initial commit of the 'landingpad' instruction.

This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.

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

12 years agoFix decoding of ARM-mode STRH.
Owen Anderson [Fri, 12 Aug 2011 20:02:50 +0000 (20:02 +0000)]
Fix decoding of ARM-mode STRH.

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

12 years agoapparently variable naming conventions never got added, document the
Chris Lattner [Fri, 12 Aug 2011 19:49:16 +0000 (19:49 +0000)]
apparently variable naming conventions never got added, document the
prevailing convention.  Thanks to Dave Zarzycki for the patch.

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

12 years agominor typo
Chris Lattner [Fri, 12 Aug 2011 19:48:19 +0000 (19:48 +0000)]
minor typo

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

12 years agoPort over the basic ARM encodings test file to a decoding test file. Greatly increas...
Owen Anderson [Fri, 12 Aug 2011 19:42:45 +0000 (19:42 +0000)]
Port over the basic ARM encodings test file to a decoding test file.  Greatly increases our test coverage of basic ARM-mode instructions.

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

12 years agoSpecify fixed bit in the LDRBT encoding, which allows us to distinguish it from certa...
Owen Anderson [Fri, 12 Aug 2011 19:41:29 +0000 (19:41 +0000)]
Specify fixed bit in the LDRBT encoding, which allows us to distinguish it from certain USAT16 encodings.

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

12 years agoConstify.
Devang Patel [Fri, 12 Aug 2011 18:18:02 +0000 (18:18 +0000)]
Constify.

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

12 years agofix one reference that slipped through, thanks Eli
Chris Lattner [Fri, 12 Aug 2011 18:12:40 +0000 (18:12 +0000)]
fix one reference that slipped through, thanks Eli

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

12 years agoFix decoding of pre-indexed stores.
Owen Anderson [Fri, 12 Aug 2011 18:12:39 +0000 (18:12 +0000)]
Fix decoding of pre-indexed stores.

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

12 years agoTest case for 137484
Akira Hatanaka [Fri, 12 Aug 2011 18:12:06 +0000 (18:12 +0000)]
Test case for 137484

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

12 years agoUse ArrayRef.
Devang Patel [Fri, 12 Aug 2011 18:10:19 +0000 (18:10 +0000)]
Use ArrayRef.

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

12 years agoWhen constant double 0.0 is lowered, make sure 0 is copied directly from an
Akira Hatanaka [Fri, 12 Aug 2011 18:09:59 +0000 (18:09 +0000)]
When constant double 0.0 is lowered, make sure 0 is copied directly from an
integer register to a floating point register. It is not valid to interpret
the value of a floating pointer register as part of a double precision
floating point value after a single precision floating point computational
or move instruction stores its result to the register.

- In the test case, the following code is generated before this patch is
  applied:
mtc1  $zero, $f2    ; unformatted copy to $f2
mov.s $f0, $f2      ; $f0 is in single format
sdc1  $f12, 0($sp)
mov.s $f1, $f2      ; $f1 is in single format
c.eq.d  $f12, $f0   ; $f0 cannot be interpreted as double

- The following code is generated after this patch is applied:
mtc1  $zero, $f0    ; unformatted copy to $f0
mtc1  $zero, $f1    ; unformatted copy to $f1
c.eq.d  $f12, $f0   ; $f0 can be interpreted as double

Bhanu Chetlapalli and Chris Dearman at MIPS technologies reported this bug and
provided the test case.

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

12 years agoadd ifdef's to let people easily remove these dead api for testing.
Chris Lattner [Fri, 12 Aug 2011 18:08:19 +0000 (18:08 +0000)]
add ifdef's to let people easily remove these dead api for testing.

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

12 years agoswitch to the new struct api.
Chris Lattner [Fri, 12 Aug 2011 18:07:26 +0000 (18:07 +0000)]
switch to the new struct api.

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

12 years agoswitch to the new struct apis.
Chris Lattner [Fri, 12 Aug 2011 18:07:07 +0000 (18:07 +0000)]
switch to the new struct apis.

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

12 years agoswitch to use the new api for structtypes.
Chris Lattner [Fri, 12 Aug 2011 18:06:37 +0000 (18:06 +0000)]
switch to use the new api for structtypes.

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

12 years agoforward to the correct constructor.
Chris Lattner [Fri, 12 Aug 2011 18:03:30 +0000 (18:03 +0000)]
forward to the correct constructor.

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

12 years agoProvide fast path as Jakob suggested.
Devang Patel [Fri, 12 Aug 2011 18:01:34 +0000 (18:01 +0000)]
Provide fast path as Jakob suggested.

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

12 years agoSeparate decoding for STREXD and LDREXD to make each work better.
Owen Anderson [Fri, 12 Aug 2011 17:58:32 +0000 (17:58 +0000)]
Separate decoding for STREXD and LDREXD to make each work better.

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

12 years agoTidy up formatting.
Jim Grosbach [Fri, 12 Aug 2011 17:43:31 +0000 (17:43 +0000)]
Tidy up formatting.

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

12 years agoadd two missing function impls
Chris Lattner [Fri, 12 Aug 2011 17:43:05 +0000 (17:43 +0000)]
add two missing function impls

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

12 years agoadd new accessors to reflect new terminology in struct types.
Chris Lattner [Fri, 12 Aug 2011 17:31:02 +0000 (17:31 +0000)]
add new accessors to reflect new terminology in struct types.

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

12 years agoFix bugpoint fallout from the new type system.
Nick Lewycky [Fri, 12 Aug 2011 17:25:45 +0000 (17:25 +0000)]
Fix bugpoint fallout from the new type system.

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

12 years agoRevert r137310 because it does not optimize any code on ToT
Nadav Rotem [Fri, 12 Aug 2011 17:15:04 +0000 (17:15 +0000)]
Revert r137310 because it does not optimize any code on ToT

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

12 years agoTidy up formatting.
Jim Grosbach [Fri, 12 Aug 2011 17:01:02 +0000 (17:01 +0000)]
Tidy up formatting.

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

12 years agoWhitespace and formatting. No functional change intended.
Chad Rosier [Fri, 12 Aug 2011 16:45:18 +0000 (16:45 +0000)]
Whitespace and formatting.  No functional change intended.

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

12 years agoSilence a bunch (but not all) "variable written but not read" warnings
Duncan Sands [Fri, 12 Aug 2011 14:54:45 +0000 (14:54 +0000)]
Silence a bunch (but not all) "variable written but not read" warnings
when building with assertions disabled.

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

12 years agodocs/GettingStarted.html: [Git] Add instructions how to generate patchset with Git.
NAKAMURA Takumi [Fri, 12 Aug 2011 07:48:06 +0000 (07:48 +0000)]
docs/GettingStarted.html: [Git] Add instructions how to generate patchset with Git.

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

12 years agodocs/GettingStarted.html: [Git] Mention branch.master.rebase for the tracking branch.
NAKAMURA Takumi [Fri, 12 Aug 2011 07:48:01 +0000 (07:48 +0000)]
docs/GettingStarted.html: [Git] Mention branch.rebase for the tracking branch.

Thanks to Jeff Yasskin to reword.

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

12 years agodocs/GettingStarted.html: [Git] Split the subsubsection for committer's section.
NAKAMURA Takumi [Fri, 12 Aug 2011 07:47:55 +0000 (07:47 +0000)]
docs/GettingStarted.html: [Git] Split the subsubsection for committer's section.

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

12 years ago.gitignore: Ignore /autom4te.cache. We can execute "PATH=/path/to/autotools/bin autoc...
NAKAMURA Takumi [Fri, 12 Aug 2011 07:47:50 +0000 (07:47 +0000)]
.gitignore: Ignore /autom4te.cache. We can execute "PATH=/path/to/autotools/bin autoconf/AutoRegen.sh".

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

12 years agodocs: Update HTML markup(s).
NAKAMURA Takumi [Fri, 12 Aug 2011 06:17:17 +0000 (06:17 +0000)]
docs: Update HTML markup(s).

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

12 years agodocs/llvm.css: Introduce <blockquote><pre>. It may be used as blockquoted "doc_code".
NAKAMURA Takumi [Fri, 12 Aug 2011 06:17:11 +0000 (06:17 +0000)]
docs/llvm.css: Introduce <blockquote><pre>. It may be used as blockquoted "doc_code".

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

12 years agoFix an obscure bug in PointerUnion that would bite PointerUnion3/4. Basically,
Chris Lattner [Fri, 12 Aug 2011 04:31:38 +0000 (04:31 +0000)]
Fix an obscure bug in PointerUnion that would bite PointerUnion3/4.  Basically,
when checking isNull(), we'd pick off the sentinel bit for the outer
PointerUnion, but would not recursively convert the inner pointerunion to bool,
so if *its* sentinel bit is set, isNull() would incorrectly return false.

No testcase, because someone hit this when they were trying to refactor code
to use PointerUnion3, but they since found a better solution.

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

12 years agoMisc atomic doc tweaks; reordering operations across Acquire/Release can be beneficial.
Eli Friedman [Fri, 12 Aug 2011 03:38:32 +0000 (03:38 +0000)]
Misc atomic doc tweaks; reordering operations across Acquire/Release can be beneficial.

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

12 years agoinclude/llvm/Config/config.h.cmake: Reorder to follow config.h.in, and import stuff...
NAKAMURA Takumi [Fri, 12 Aug 2011 03:27:54 +0000 (03:27 +0000)]
include/llvm/Config/config.h.cmake: Reorder to follow config.h.in, and import stuff from llvm-config.h.cmake and clang/config.h.

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

12 years agoCMake: Eliminate unused checks and #undef(s) as below;
NAKAMURA Takumi [Fri, 12 Aug 2011 03:27:48 +0000 (03:27 +0000)]
CMake: Eliminate unused checks and #undef(s) as below;

STACK_DIRECTION
YYTEXT_POINTER
HAVE_NAMESPACES
HAVE_STD_ITERATOR
HAVE_FWD_ITERATOR
HAVE_BI_ITERATOR
HAVE_GLOBAL_HASH_MAP
HAVE_GLOBAL_HASH_SET
HAVE_GNU_EXT_HASH_MAP
HAVE_GNU_EXT_HASH_SET
HAVE_STD_EXT_HASH_MAP
HAVE_STD_EXT_HASH_SET

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

12 years agoMachOWriter: Don't crash on fixups with arithmetic, emit a relocation instead. This...
Benjamin Kramer [Fri, 12 Aug 2011 01:51:29 +0000 (01:51 +0000)]
MachOWriter: Don't crash on fixups with arithmetic, emit a relocation instead. This matches what as does.

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

12 years agoinclude/llvm/Config/llvm-config.h: Reorder and reword to follow (generated) config...
NAKAMURA Takumi [Fri, 12 Aug 2011 01:50:50 +0000 (01:50 +0000)]
include/llvm/Config/llvm-config.h: Reorder and reword to follow (generated) config.h.in.

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

12 years agoconfigure: Update since r136721.
NAKAMURA Takumi [Fri, 12 Aug 2011 01:50:43 +0000 (01:50 +0000)]
configure: Update since r136721.

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

12 years agoFix up this paragraph (including a nasty typo).
Eli Friedman [Fri, 12 Aug 2011 01:26:06 +0000 (01:26 +0000)]
Fix up this paragraph (including a nasty typo).

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

12 years agofindDeadCallerSavedReg fix: Missing NULL terminator in register arrays.
Andrew Trick [Fri, 12 Aug 2011 00:49:19 +0000 (00:49 +0000)]
findDeadCallerSavedReg fix: Missing NULL terminator in register arrays.

Fix by Ivan Baev. Sorry I don't have a unit test, but the fix is obvious so I don't want to delay it.

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

12 years agoClarify the definition of SequentiallyConsistent operations.
Andrew Trick [Fri, 12 Aug 2011 00:36:38 +0000 (00:36 +0000)]
Clarify the definition of SequentiallyConsistent operations.

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

12 years agoDon't convert objc_autoreleaseReturnValue to objc_autorelease if the result
Dan Gohman [Fri, 12 Aug 2011 00:36:31 +0000 (00:36 +0000)]
Don't convert objc_autoreleaseReturnValue to objc_autorelease if the result
is returned through a bitcast.

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

12 years agoA virtual destructor for the class with virtual methods!
Nick Lewycky [Fri, 12 Aug 2011 00:32:15 +0000 (00:32 +0000)]
A virtual destructor for the class with virtual methods!

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

12 years agoDon't let arbitrary calls disrupt nested retain+release pairs if
Dan Gohman [Fri, 12 Aug 2011 00:26:31 +0000 (00:26 +0000)]
Don't let arbitrary calls disrupt nested retain+release pairs if
the retains and releases all use the same SSA pointer value.

Also, don't let CFG hazards disrupt nested retain+release pair
optimizations.

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

12 years agoUse an actual reverse-CFG reverse-postorder for the bottom-up traversal,
Dan Gohman [Fri, 12 Aug 2011 00:24:29 +0000 (00:24 +0000)]
Use an actual reverse-CFG reverse-postorder for the bottom-up traversal,
rather than plain postorder, so that CFG constructs like single-exit loops
are reliably visited in a sensible order.

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

12 years agoSimplify the interference checking code a bit.
Jakob Stoklund Olesen [Fri, 12 Aug 2011 00:22:04 +0000 (00:22 +0000)]
Simplify the interference checking code a bit.

This is possible now that we now longer provide an interface to iterate
the interference overlaps.

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

12 years agoClean up formatting a bit.
Jim Grosbach [Thu, 11 Aug 2011 23:57:17 +0000 (23:57 +0000)]
Clean up formatting a bit.

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

12 years agoARM vector compare to zero instruction assembly parsing support.
Jim Grosbach [Thu, 11 Aug 2011 23:51:13 +0000 (23:51 +0000)]
ARM vector compare to zero instruction assembly parsing support.

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

12 years agoFix mismatched tag.
Eli Friedman [Thu, 11 Aug 2011 23:48:52 +0000 (23:48 +0000)]
Fix mismatched tag.

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

12 years agoRevision to Atomics guide, per Chris's comments.
Eli Friedman [Thu, 11 Aug 2011 23:44:25 +0000 (23:44 +0000)]
Revision to Atomics guide, per Chris's comments.

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

12 years agoA slew of unit tests for the recent LoopInfo::updateUnloop feature
Andrew Trick [Thu, 11 Aug 2011 23:38:09 +0000 (23:38 +0000)]
A slew of unit tests for the recent LoopInfo::updateUnloop feature
checked in at r137276 and r137341.

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

12 years agoAllow loop unrolling to get known trip counts from ScalarEvolution.
Andrew Trick [Thu, 11 Aug 2011 23:36:16 +0000 (23:36 +0000)]
Allow loop unrolling to get known trip counts from ScalarEvolution.

SCEV unrolling can unroll loops with arbitrary induction variables. It
is a prerequisite for -disable-iv-rewrite performance. It is also
easily handles loops of arbitrary structure including multiple exits
and is generally more robust.

This is under a temporary option to avoid affecting default
behavior for the next couple of weeks. It is needed so that I can
checkin unit tests for updateUnloop.

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

12 years agoRemove the InterferenceResult class.
Jakob Stoklund Olesen [Thu, 11 Aug 2011 22:46:06 +0000 (22:46 +0000)]
Remove the InterferenceResult class.

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

12 years agoEliminate the last use of InterferenceResult.
Jakob Stoklund Olesen [Thu, 11 Aug 2011 22:46:04 +0000 (22:46 +0000)]
Eliminate the last use of InterferenceResult.

The Query class now holds two iterators instead of an InterferenceResult
instance. The iterators are used as bookmarks for repeated
collectInterferingVRegs calls.

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

12 years agoEnclose directive .cprestore with .set macro and nomacro to silence assembler
Akira Hatanaka [Thu, 11 Aug 2011 22:42:31 +0000 (22:42 +0000)]
Enclose directive .cprestore with .set macro and nomacro to silence assembler
warning.

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

12 years agoFix tests per now-correct encoding as of r137371.
Jim Grosbach [Thu, 11 Aug 2011 22:31:48 +0000 (22:31 +0000)]
Fix tests per now-correct encoding as of r137371.

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

12 years agoRemove no-longer-true comments. These are for the assembler, also.
Jim Grosbach [Thu, 11 Aug 2011 22:30:30 +0000 (22:30 +0000)]
Remove no-longer-true comments. These are for the assembler, also.

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

12 years agoARM STRT assembly parsing and encoding.
Jim Grosbach [Thu, 11 Aug 2011 22:18:00 +0000 (22:18 +0000)]
ARM STRT assembly parsing and encoding.

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

12 years agoMake the USAT16 operand decoder auto-generate-able.
Owen Anderson [Thu, 11 Aug 2011 22:10:11 +0000 (22:10 +0000)]
Make the USAT16 operand decoder auto-generate-able.

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

12 years agoAdd another accidentally omitted predicate operand.
Owen Anderson [Thu, 11 Aug 2011 22:08:38 +0000 (22:08 +0000)]
Add another accidentally omitted predicate operand.

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

12 years agoAdd missing predicate operand on SMLA and friends.
Owen Anderson [Thu, 11 Aug 2011 22:05:38 +0000 (22:05 +0000)]
Add missing predicate operand on SMLA and friends.

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

12 years agoARM load shifted register pre-index fix shift value asm parser encoding.
Jim Grosbach [Thu, 11 Aug 2011 22:05:09 +0000 (22:05 +0000)]
ARM load shifted register pre-index fix shift value asm parser encoding.

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

12 years agoDataTypes.h.cmake: Tweak INT32_MIN for MSVC. MSC treats -2147483648 as -(2147483648U).
NAKAMURA Takumi [Thu, 11 Aug 2011 21:59:55 +0000 (21:59 +0000)]
DataTypes.h.cmake: Tweak INT32_MIN for MSVC. MSC treats -2147483648 as -(2147483648U).

It caused an unexpected behavior since r137254.

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

12 years agoHandle new register classes in Thumb2 mode. Should fix the ARM buildbots.
Owen Anderson [Thu, 11 Aug 2011 21:52:38 +0000 (21:52 +0000)]
Handle new register classes in Thumb2 mode.  Should fix the ARM buildbots.

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

12 years agoMaking SEL decodings auto-generate-able.
Owen Anderson [Thu, 11 Aug 2011 21:50:56 +0000 (21:50 +0000)]
Making SEL decodings auto-generate-able.

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

12 years agoAdd a dag combine to xform 256-bit shuffles into simple vector
Bruno Cardoso Lopes [Thu, 11 Aug 2011 21:50:44 +0000 (21:50 +0000)]
Add a dag combine to xform 256-bit shuffles into simple vector
inserts and extracts. This simple combine makes us generate only 1
instruction instead of 11 in the v8 case.

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

12 years agoFix the test added by Nadav in r137308. Make it more strict:
Bruno Cardoso Lopes [Thu, 11 Aug 2011 21:50:35 +0000 (21:50 +0000)]
Fix the test added by Nadav in r137308. Make it more strict:
1) check for the "v" version of movaps
2) add a couple of CHECK-NOT to guarantee the behavior
3) move to a more appropriate test file

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

12 years agoTidy up comment.
Jim Grosbach [Thu, 11 Aug 2011 21:41:59 +0000 (21:41 +0000)]
Tidy up comment.

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

12 years agoARM STRHT assembly parsing and encoding.
Jim Grosbach [Thu, 11 Aug 2011 21:39:41 +0000 (21:39 +0000)]
ARM STRHT assembly parsing and encoding.

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

12 years agoFix decoding support for STREXD and LDREXD.
Owen Anderson [Thu, 11 Aug 2011 21:34:58 +0000 (21:34 +0000)]
Fix decoding support for STREXD and LDREXD.

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

12 years agoRemove more dead code.
Jakob Stoklund Olesen [Thu, 11 Aug 2011 21:18:34 +0000 (21:18 +0000)]
Remove more dead code.

collectInterferingVRegs will be the primary function for interference
checks.

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

12 years agoARM STRH assembly parsing and encoding.
Jim Grosbach [Thu, 11 Aug 2011 21:17:22 +0000 (21:17 +0000)]
ARM STRH assembly parsing and encoding.

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

12 years agoFix typos in comments, and delete an unused function.
Dan Gohman [Thu, 11 Aug 2011 21:06:32 +0000 (21:06 +0000)]
Fix typos in comments, and delete an unused function.

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

12 years agoAdd isIndirectBranch flag.
Akira Hatanaka [Thu, 11 Aug 2011 21:05:37 +0000 (21:05 +0000)]
Add isIndirectBranch flag.

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

12 years agoPrivatize an unused part of the LiveIntervalUnion::Query interface.
Jakob Stoklund Olesen [Thu, 11 Aug 2011 21:00:42 +0000 (21:00 +0000)]
Privatize an unused part of the LiveIntervalUnion::Query interface.

No clients are iterating over interference overlaps.

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

12 years agoFix decoding for indexed STRB and LDRB. Fixes <rdar://problem/9926161>.
Owen Anderson [Thu, 11 Aug 2011 20:47:56 +0000 (20:47 +0000)]
Fix decoding for indexed STRB and LDRB.  Fixes <rdar://problem/9926161>.

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

12 years agoRemove some dead code.
Jakob Stoklund Olesen [Thu, 11 Aug 2011 20:41:41 +0000 (20:41 +0000)]
Remove some dead code.

The InterferenceResult iterator turned out to be less important than we
thought it would be.  LiveIntervalUnion clients want higher level
information, like the list of interfering virtual registers.

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

12 years agoTidy up. Remove unused template parameter.
Jim Grosbach [Thu, 11 Aug 2011 20:41:13 +0000 (20:41 +0000)]
Tidy up. Remove unused template parameter.

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