oota-llvm.git
12 years agoThumb2 assembly parsing and encoding for SHSUB16/SHSUB8.
Jim Grosbach [Thu, 15 Sep 2011 23:58:56 +0000 (23:58 +0000)]
Thumb2 assembly parsing and encoding for SHSUB16/SHSUB8.

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

12 years agoRemove incorrect comments.
Jim Grosbach [Thu, 15 Sep 2011 23:45:50 +0000 (23:45 +0000)]
Remove incorrect comments.

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

12 years agoDon't attach annotations to MCInst's. Instead, have the disassembler return, and...
Owen Anderson [Thu, 15 Sep 2011 23:38:46 +0000 (23:38 +0000)]
Don't attach annotations to MCInst's.  Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.

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

12 years agouse 64-bit types instead of off_t/size_t to avoid the issue when
Ivan Krasin [Thu, 15 Sep 2011 23:13:00 +0000 (23:13 +0000)]
use 64-bit types instead of off_t/size_t to avoid the issue when
gold plugin is built with Large File Support (sizeof(off_t) == 64 on i686)
and the rest of LLVM is built w/o Large File Support
(sizeof(off_t) == 32 on i686) which corrupts the stack.

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

12 years agoAdd a fixme note!
Bruno Cardoso Lopes [Thu, 15 Sep 2011 23:04:24 +0000 (23:04 +0000)]
Add a fixme note!

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

12 years agoThumb2 assembly parsing and encoding for SHADD16/SHADD8.
Jim Grosbach [Thu, 15 Sep 2011 22:36:10 +0000 (22:36 +0000)]
Thumb2 assembly parsing and encoding for SHADD16/SHADD8.

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

12 years agoThumb2 assembly parsing and encoding for SHASX/SHSAX.
Jim Grosbach [Thu, 15 Sep 2011 22:34:29 +0000 (22:34 +0000)]
Thumb2 assembly parsing and encoding for SHASX/SHSAX.

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

12 years agoMinor cleanup.
Eli Friedman [Thu, 15 Sep 2011 22:26:18 +0000 (22:26 +0000)]
Minor cleanup.

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

12 years agoUnbreak the build for compilers that don't include cstdint everywhere.
Benjamin Kramer [Thu, 15 Sep 2011 22:26:16 +0000 (22:26 +0000)]
Unbreak the build for compilers that don't include cstdint everywhere.

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

12 years agoThumb2 assembly parsing and encoding for SEV.W.
Jim Grosbach [Thu, 15 Sep 2011 22:24:20 +0000 (22:24 +0000)]
Thumb2 assembly parsing and encoding for SEV.W.

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

12 years agoUse a more efficient lowering for Unordered/Monotonic atomic load/store on Thumb1.
Eli Friedman [Thu, 15 Sep 2011 22:18:49 +0000 (22:18 +0000)]
Use a more efficient lowering for Unordered/Monotonic atomic load/store on Thumb1.

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

12 years agoAdd the remaining AVX versions of instructions to X86InstrInfo, this
Bruno Cardoso Lopes [Thu, 15 Sep 2011 22:15:52 +0000 (22:15 +0000)]
Add the remaining AVX versions of instructions to X86InstrInfo, this
time for describing high latency ones and for recognizting loads
from the same base pointer

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

12 years agoThumb2 assembly parsing and encoding for SEL.
Jim Grosbach [Thu, 15 Sep 2011 22:01:09 +0000 (22:01 +0000)]
Thumb2 assembly parsing and encoding for SEL.

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

12 years agoDWARF: Reset the state after parsing a line table prologue and remove an unnecessary...
Benjamin Kramer [Thu, 15 Sep 2011 21:59:13 +0000 (21:59 +0000)]
DWARF: Reset the state after parsing a line table prologue and remove an unnecessary lookup.

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

12 years agoThumb2 assembly parsing and encoding for SBFX.
Jim Grosbach [Thu, 15 Sep 2011 21:58:42 +0000 (21:58 +0000)]
Thumb2 assembly parsing and encoding for SBFX.

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

12 years agoFactor out partial register update checks for some SSE instructions.
Bruno Cardoso Lopes [Thu, 15 Sep 2011 21:42:23 +0000 (21:42 +0000)]
Factor out partial register update checks for some SSE instructions.
Also add the AVX versions and add comments!

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

12 years agoSome legalization fixes for atomic load and store.
Eli Friedman [Thu, 15 Sep 2011 21:20:49 +0000 (21:20 +0000)]
Some legalization fixes for atomic load and store.

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

12 years agollvm-dwarfdump: Add an option to print out line info for a specific address
Benjamin Kramer [Thu, 15 Sep 2011 21:17:40 +0000 (21:17 +0000)]
llvm-dwarfdump: Add an option to print out line info for a specific address

Usage:
$ llvm-dwarfdump -address=0x0000000100000ed4 a.out.dSYM/Contents/Resources/DWARF/a.out
xxx.c:6:0

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

12 years agoAdd some missing 'CHECK' lines and tidy up others.
Jim Grosbach [Thu, 15 Sep 2011 21:17:38 +0000 (21:17 +0000)]
Add some missing 'CHECK' lines and tidy up others.

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

12 years agoCommandLine: Add support for 64 bit unsigned integer options.
Benjamin Kramer [Thu, 15 Sep 2011 21:17:37 +0000 (21:17 +0000)]
CommandLine: Add support for 64 bit unsigned integer options.

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

12 years agoDWARF: Don't crash when looking up an invalid address.
Benjamin Kramer [Thu, 15 Sep 2011 21:08:54 +0000 (21:08 +0000)]
DWARF: Don't crash when looking up an invalid address.

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

12 years agoAdd an option to disable spill hoisting.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 21:06:00 +0000 (21:06 +0000)]
Add an option to disable spill hoisting.

When -split-spill-mode is enabled, spill hoisting is performed by
SplitKit instead of by InlineSpiller.  This hidden command line option
is for testing the splitter spill mode.

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

12 years agoThumb2 assembly parsing and encoding for SBC.
Jim Grosbach [Thu, 15 Sep 2011 21:04:10 +0000 (21:04 +0000)]
Thumb2 assembly parsing and encoding for SBC.

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

12 years agoThumb2 assembly parsing and encoding for SASX.
Jim Grosbach [Thu, 15 Sep 2011 21:01:23 +0000 (21:01 +0000)]
Thumb2 assembly parsing and encoding for SASX.

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

12 years agoReapply r139759. Disable IV rewriting by default. See PR10916.
Andrew Trick [Thu, 15 Sep 2011 20:58:37 +0000 (20:58 +0000)]
Reapply r139759. Disable IV rewriting by default. See PR10916.

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

12 years agoThumb2 assembly parsing and encoding for SADD16/SADD8.
Jim Grosbach [Thu, 15 Sep 2011 20:57:39 +0000 (20:57 +0000)]
Thumb2 assembly parsing and encoding for SADD16/SADD8.

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

12 years agoThumb2 assembly parsing and encoding for RSB.
Jim Grosbach [Thu, 15 Sep 2011 20:54:14 +0000 (20:54 +0000)]
Thumb2 assembly parsing and encoding for RSB.

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

12 years agoDWARF: Put all the pieces we have together and provide a single accessor to DIContext...
Benjamin Kramer [Thu, 15 Sep 2011 20:43:22 +0000 (20:43 +0000)]
DWARF: Put all the pieces we have together and provide a single accessor to DIContext that provides line information when given an address.

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

12 years agoDWARF: Remove accessors that parse the whole line table section in one go, this can...
Benjamin Kramer [Thu, 15 Sep 2011 20:43:18 +0000 (20:43 +0000)]
DWARF: Remove accessors that parse the whole line table section in one go, this can't possibly work.

The address size is specified by the compile unit associated with a line table, there is no global address size.

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

12 years agoThumb2 assembly parsing and encoding for RRX.
Jim Grosbach [Thu, 15 Sep 2011 19:52:43 +0000 (19:52 +0000)]
Thumb2 assembly parsing and encoding for RRX.

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

12 years agoThumb2 assembly parsing and encoding for ROR.
Jim Grosbach [Thu, 15 Sep 2011 19:50:04 +0000 (19:50 +0000)]
Thumb2 assembly parsing and encoding for ROR.

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

12 years agoThumb2 assembly parsing and encoding for REV16/REVSH.
Jim Grosbach [Thu, 15 Sep 2011 19:46:13 +0000 (19:46 +0000)]
Thumb2 assembly parsing and encoding for REV16/REVSH.

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

12 years agoThe the MC disassembler C API to print in verbose mode. Perhaps there should be...
Owen Anderson [Thu, 15 Sep 2011 18:37:20 +0000 (18:37 +0000)]
The the MC disassembler C API to print in verbose mode.  Perhaps there should be a parameter to request verbose mode?

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

12 years agoAdd support for stored annotations to MCInst, and provide facilities for MC-based...
Owen Anderson [Thu, 15 Sep 2011 18:36:29 +0000 (18:36 +0000)]
Add support for stored annotations to MCInst, and provide facilities for MC-based InstPrinters to print them out.  Enhance the ARM and X86 InstPrinter's to do so in verbose mode.

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

12 years agoVirtRegMap is counting spill slots, not register spills.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 18:31:13 +0000 (18:31 +0000)]
VirtRegMap is counting spill slots, not register spills.

Fix the stats counters to reflect that.

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

12 years agoChange all checks regarding the presence of any SSE level to always
Bruno Cardoso Lopes [Thu, 15 Sep 2011 18:27:36 +0000 (18:27 +0000)]
Change all checks regarding the presence of any SSE level to always
take into consideration the presence of AVX. This change, together with
the SSEDomainFix enabled for AVX, makes AVX codegen to always (hopefully)
emit the same code as SSE for 128-bit vector ops. I don't
have a testcase for this, but AVX now beats SSE in performance for
128-bit ops in the majority of programas in the llvm testsuite

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

12 years agoEnable SSEDomainFix pass for AVX mode.
Bruno Cardoso Lopes [Thu, 15 Sep 2011 18:27:32 +0000 (18:27 +0000)]
Enable SSEDomainFix pass for AVX mode.

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

12 years agoCount correctly when a COPY turns into a spill or reload.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 18:22:52 +0000 (18:22 +0000)]
Count correctly when a COPY turns into a spill or reload.

The number of spills could go negative since a folded COPY is just a
spill, and it may be eliminated.

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

12 years agoThumb2 assembly parsing and encoding for REV.
Jim Grosbach [Thu, 15 Sep 2011 18:13:30 +0000 (18:13 +0000)]
Thumb2 assembly parsing and encoding for REV.

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

12 years agoThumb2 assembly parsing and encoding for RBIT.
Jim Grosbach [Thu, 15 Sep 2011 18:07:14 +0000 (18:07 +0000)]
Thumb2 assembly parsing and encoding for RBIT.

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

12 years agoThumb2 assembly parsing and encoding for signed saturating arithmetic insns.
Jim Grosbach [Thu, 15 Sep 2011 18:06:15 +0000 (18:06 +0000)]
Thumb2 assembly parsing and encoding for signed saturating arithmetic insns.

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

12 years agoDWARF: Print line tables per compile unit, so they get the right address size.
Benjamin Kramer [Thu, 15 Sep 2011 18:02:20 +0000 (18:02 +0000)]
DWARF: Print line tables per compile unit, so they get the right address size.

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

12 years agoAssmebler symbol attribute directives don't work on temporary symbols.
Jim Grosbach [Thu, 15 Sep 2011 17:56:49 +0000 (17:56 +0000)]
Assmebler symbol attribute directives don't work on temporary symbols.

Assembler private local symbols aren't legal targets of symbol attributes,
so issue a diagnostic for them.

Based on patch by Stepan Dyatkovskiy.

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

12 years agoCount inserted spills and reloads more accurately.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 17:54:28 +0000 (17:54 +0000)]
Count inserted spills and reloads more accurately.

Adjust counters when removing spill and reload instructions.

We still don't account for reloads being removed by eliminateDeadDefs().

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

12 years agoDWARF: wire up .debug_str dumping.
Benjamin Kramer [Thu, 15 Sep 2011 16:57:13 +0000 (16:57 +0000)]
DWARF: wire up .debug_str dumping.

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

12 years agoHandle missing newline at EOF more gracefully in MC AsmLexer.
Jim Grosbach [Thu, 15 Sep 2011 16:52:06 +0000 (16:52 +0000)]
Handle missing newline at EOF more gracefully in MC AsmLexer.

If we see an EOF w/o a preceding end-of-line, return an EndOfStatement
token before returning the Eof token.

Based on patch by Stepan Dyatkovskiy.

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

12 years agoTrace through sibling PHIs in bulk.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 16:41:12 +0000 (16:41 +0000)]
Trace through sibling PHIs in bulk.

When traceSiblingValue() encounters a PHI-def value created by live
range splitting, don't look at all the predecessor blocks.  That can be
very expensive in a complicated CFG.

Instead, consider that all the non-PHI defs jointly dominate all the
PHI-defs.  Tracing directly to all the non-PHI defs is much faster that
zipping around in the CFG when there are many PHIs with many
predecessors.

This significantly improves compile time for indirectbr interpreters.

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

12 years agoARM support the pre-UAL mnemonic 'qsubaddx' for 'qsax.'
Jim Grosbach [Thu, 15 Sep 2011 16:16:50 +0000 (16:16 +0000)]
ARM support the pre-UAL mnemonic 'qsubaddx' for 'qsax.'

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

12 years agoRe-order test.
Jim Grosbach [Thu, 15 Sep 2011 16:04:13 +0000 (16:04 +0000)]
Re-order test.

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

12 years agoThumb2 push/pop mnemonic recognition.
Jim Grosbach [Thu, 15 Sep 2011 15:55:04 +0000 (15:55 +0000)]
Thumb2 push/pop mnemonic recognition.

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

12 years agoUse getPrevSlot() instead of getPrevIndex().
Jakob Stoklund Olesen [Thu, 15 Sep 2011 15:31:49 +0000 (15:31 +0000)]
Use getPrevSlot() instead of getPrevIndex().

The getPrevIndex() function moves to the same slot in the previous
instruction.  For getVNInfoBefore(), we just need the previous slot in
the same instruction.

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

12 years agoSpeed up LiveIntervals::shrinkToUse with some caching.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 15:24:16 +0000 (15:24 +0000)]
Speed up LiveIntervals::shrinkToUse with some caching.

Blocks with multiple PHI successors only need to go on the worklist
once.  Use a SmallPtrSet to track the live-out blocks that have already
been handled.  This is a lot faster than the two live range check we
would otherwise do.

Also stop recomputing hasPHIKill flags.  Like RenumberValues(), it is
conservatively correct to leave them in, and they are not used for
anything important.

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

12 years agoRevert r139782, "RemoveCopyByCommutingDef doesn't need hasPHIKill()."
Jakob Stoklund Olesen [Thu, 15 Sep 2011 06:27:32 +0000 (06:27 +0000)]
Revert r139782, "RemoveCopyByCommutingDef doesn't need hasPHIKill()."

It does, after all.

RemoveCopyByCommutingDef rewrites the uses of one particular value
number in A. It doesn't know how to rewrite phi uses, so there can't be
any.

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

12 years agoDWARF: Make DIE printing more bulletproof.
Benjamin Kramer [Thu, 15 Sep 2011 05:43:00 +0000 (05:43 +0000)]
DWARF: Make DIE printing more bulletproof.

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

12 years agoDespite what the GCC wiki says, a quick search shows that
Nick Lewycky [Thu, 15 Sep 2011 05:30:55 +0000 (05:30 +0000)]
Despite what the GCC wiki says, a quick search shows that
DW_AT_GNU_template_name = 0x2110, not 0x2108. That would explain those
attr #0x2110 under the DW_TAG_GNU_template_template_param I'm seeing. Migrate
from documented values to reality.

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

12 years agoAdd some more DWARF extensions from:
Nick Lewycky [Thu, 15 Sep 2011 05:21:03 +0000 (05:21 +0000)]
Add some more DWARF extensions from:
1. http://gcc.gnu.org/wiki/TemplateParmsDwarf
2. ftp://ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf

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

12 years agoStop verifying hasPHIKill() flags.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 05:16:30 +0000 (05:16 +0000)]
Stop verifying hasPHIKill() flags.

There is only one legitimate use remaining, in addIntervalsForSpills().
All other calls to hasPHIKill() are only used to update PHIKill flags.

The addIntervalsForSpills() function is part of the old spilling
framework, only used by linearscan.

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

12 years agoRemoveCopyByCommutingDef doesn't need hasPHIKill().
Jakob Stoklund Olesen [Thu, 15 Sep 2011 05:03:50 +0000 (05:03 +0000)]
RemoveCopyByCommutingDef doesn't need hasPHIKill().

Instead, let HasOtherReachingDefs() test for defs in B that overlap any
phi-defs in A as well.  This test is slightly different, but almost
identical.

A perfectly precise test would only check those phi-defs in A that are
reachable from AValNo.

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

12 years agoIt is safe to remat a value killed by phis.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 04:52:06 +0000 (04:52 +0000)]
It is safe to remat a value killed by phis.

The source live range is recomputed using shrinkToUses() which does
handle phis correctly.  The hasPHIKill() condition was relevant in the
old days when ReMaterializeTrivialDef() tried to recompute the live
range itself.

The shrinkToUses() function will mark the original def as dead when no
more uses and phi kills remain.  It is then removed by
runOnMachineFunction().

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

12 years agoLeave hasPHIKill flags alone in LiveInterval::RenumberValues.
Jakob Stoklund Olesen [Thu, 15 Sep 2011 04:37:18 +0000 (04:37 +0000)]
Leave hasPHIKill flags alone in LiveInterval::RenumberValues.

It is conservatively correct to keep the hasPHIKill flags, even after
deleting PHI-defs.

The calculation can be very expensive after taildup has created a
quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag
isn't used for anything after RenumberValues().

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

12 years agoUpdate Dwarf enums list for DWARF 4.
Nick Lewycky [Thu, 15 Sep 2011 04:23:44 +0000 (04:23 +0000)]
Update Dwarf enums list for DWARF 4.
Note that DW_TAG_rvalue_reference_type is officially 0x42, not 0x41.

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

12 years agoDWARF: Print the number for unknown abbrev fields.
Benjamin Kramer [Thu, 15 Sep 2011 04:15:59 +0000 (04:15 +0000)]
DWARF: Print the number for unknown abbrev fields.

Thanks Nick!

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

12 years agoDWARF: Fail gracefully when encountering unknown values in an abbrev.
Benjamin Kramer [Thu, 15 Sep 2011 04:00:58 +0000 (04:00 +0000)]
DWARF: Fail gracefully when encountering unknown values in an abbrev.

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

12 years agoGive structs with virtual methods a virtual destructor.
Nick Lewycky [Thu, 15 Sep 2011 03:41:51 +0000 (03:41 +0000)]
Give structs with virtual methods a virtual destructor.

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

12 years agoDWARF: Silence GCC -Wsign-compare warning.
Benjamin Kramer [Thu, 15 Sep 2011 03:20:04 +0000 (03:20 +0000)]
DWARF: Silence GCC -Wsign-compare warning.

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

12 years agoDWARF: Fix indentation.
Benjamin Kramer [Thu, 15 Sep 2011 03:11:09 +0000 (03:11 +0000)]
DWARF: Fix indentation.

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

12 years agoDWARF: Include <algorithm> explicitly.
Benjamin Kramer [Thu, 15 Sep 2011 02:19:33 +0000 (02:19 +0000)]
DWARF: Include <algorithm> explicitly.

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

12 years agoDWARF: Add basic support for line tables.
Benjamin Kramer [Thu, 15 Sep 2011 02:12:05 +0000 (02:12 +0000)]
DWARF: Add basic support for line tables.

The llvm-dwarfdump output isn't very verbose yet.

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

12 years agoMake demanded-elt simplification for shufflevector slightly stronger. Spotted by...
Eli Friedman [Thu, 15 Sep 2011 01:14:29 +0000 (01:14 +0000)]
Make demanded-elt simplification for shufflevector slightly stronger.  Spotted by inspection.

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

12 years ago[regcoalescing] bug fix for RegistersDefinedFromSameValue.
Andrew Trick [Thu, 15 Sep 2011 01:09:33 +0000 (01:09 +0000)]
[regcoalescing] bug fix for RegistersDefinedFromSameValue.

An improper SlotIndex->VNInfo lookup was leading to unsafe copy removal.
Fixes PR10920 401.bzip2 miscompile with no IV rewrite.

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

12 years agoFix the code creating VZEXT_LOAD so that it creates the right memoperand. Issue...
Eli Friedman [Wed, 14 Sep 2011 23:42:45 +0000 (23:42 +0000)]
Fix the code creating VZEXT_LOAD so that it creates the right memoperand.  Issue spotted in -debug output.  I can't think of any practical effects at the moment, but it might matter if we start doing more aggressive alias analysis in CodeGen.

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

12 years agoThumb2 assembly parsing and encoding for PLI.
Jim Grosbach [Wed, 14 Sep 2011 23:29:05 +0000 (23:29 +0000)]
Thumb2 assembly parsing and encoding for PLI.

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

12 years agoThumb2 assembly parsing and encoding for PLD.
Jim Grosbach [Wed, 14 Sep 2011 23:26:12 +0000 (23:26 +0000)]
Thumb2 assembly parsing and encoding for PLD.

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

12 years agoUpdate the comment for system_temp_directory() to indicate when it
Douglas Gregor [Wed, 14 Sep 2011 23:21:47 +0000 (23:21 +0000)]
Update the comment for system_temp_directory() to indicate when it
will ignore the erasedOnReboot option, and properly escape the
backslash in "C:\TEMP". Thanks to Aaron and Francois.

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

12 years agoThumb2 assembly parsing and encoding for PKH.
Jim Grosbach [Wed, 14 Sep 2011 23:16:41 +0000 (23:16 +0000)]
Thumb2 assembly parsing and encoding for PKH.

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

12 years agoARMv7a has the PKH instructions.
Jim Grosbach [Wed, 14 Sep 2011 23:16:34 +0000 (23:16 +0000)]
ARMv7a has the PKH instructions.

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

12 years agoAdd support to emit debug info for C++0x nullptr type.
Devang Patel [Wed, 14 Sep 2011 23:13:28 +0000 (23:13 +0000)]
Add support to emit debug info for C++0x nullptr type.

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

12 years agoARM tighten up the register classes for the PKH instructions.
Jim Grosbach [Wed, 14 Sep 2011 22:52:14 +0000 (22:52 +0000)]
ARM tighten up the register classes for the PKH instructions.

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

12 years agoFix a crasher in Thumb2 MOV-immediate encoding for certain inputs.
Owen Anderson [Wed, 14 Sep 2011 22:46:14 +0000 (22:46 +0000)]
Fix a crasher in Thumb2 MOV-immediate encoding for certain inputs.

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

12 years agoInclude limits.h to make sure PATH_MAX is known on Solaris 10.
Bill Wendling [Wed, 14 Sep 2011 21:49:42 +0000 (21:49 +0000)]
Include limits.h to make sure PATH_MAX is known on Solaris 10.
Patch by Joakim Johansson!

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

12 years agoThumb2 assembly parsing and encoding for ORR.
Jim Grosbach [Wed, 14 Sep 2011 21:43:57 +0000 (21:43 +0000)]
Thumb2 assembly parsing and encoding for ORR.

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

12 years agoThumb2 assembly parsing and encoding for ORN.
Jim Grosbach [Wed, 14 Sep 2011 21:29:54 +0000 (21:29 +0000)]
Thumb2 assembly parsing and encoding for ORN.

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

12 years agoThumb2 assembly parsing and encoding for NOP.W.
Jim Grosbach [Wed, 14 Sep 2011 21:26:25 +0000 (21:26 +0000)]
Thumb2 assembly parsing and encoding for NOP.W.

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

12 years agoThumb2 assembly parsing and encoding for MVN.
Jim Grosbach [Wed, 14 Sep 2011 21:24:41 +0000 (21:24 +0000)]
Thumb2 assembly parsing and encoding for MVN.

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

12 years agoNested IT blocks are UNPREDICTABLE. Mark them as such when disassembling them.
Owen Anderson [Wed, 14 Sep 2011 21:06:21 +0000 (21:06 +0000)]
Nested IT blocks are UNPREDICTABLE.  Mark them as such when disassembling them.

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

12 years agoThumb2 assembly parsing and encoding for MUL.
Jim Grosbach [Wed, 14 Sep 2011 21:00:40 +0000 (21:00 +0000)]
Thumb2 assembly parsing and encoding for MUL.

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

12 years agoDWARF: Generate the address lookup table from the DIE tree if .debug_aranges is not...
Benjamin Kramer [Wed, 14 Sep 2011 20:52:27 +0000 (20:52 +0000)]
DWARF: Generate the address lookup table from the DIE tree if .debug_aranges is not available.

Ported from LLDB.

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

12 years agoAdd a simple routine to determine the typical system directory for
Douglas Gregor [Wed, 14 Sep 2011 20:27:01 +0000 (20:27 +0000)]
Add a simple routine to determine the typical system directory for
temporary data.

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

12 years agoThumb2 assembly parsing and encoding for MSR/MRS.
Jim Grosbach [Wed, 14 Sep 2011 20:03:46 +0000 (20:03 +0000)]
Thumb2 assembly parsing and encoding for MSR/MRS.

Fix a bug in handling default flags for both ARM and Thumb encodings.

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

12 years agoThumb2 assembly parsing and encoding for MRC/MRC2/MRRC/MRRC2.
Jim Grosbach [Wed, 14 Sep 2011 19:28:49 +0000 (19:28 +0000)]
Thumb2 assembly parsing and encoding for MRC/MRC2/MRRC/MRRC2.

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

12 years agoThumb2 assembly parsing and encoding for MOVT.
Jim Grosbach [Wed, 14 Sep 2011 19:15:15 +0000 (19:15 +0000)]
Thumb2 assembly parsing and encoding for MOVT.

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

12 years agoThumb2 assembly parsing for MOV in IT block.
Jim Grosbach [Wed, 14 Sep 2011 19:12:11 +0000 (19:12 +0000)]
Thumb2 assembly parsing for MOV in IT block.

Select the right 16 vs. 32 bit encoding in an IT block.

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

12 years agoDWARF: Reorder fields to reduce padding.
Benjamin Kramer [Wed, 14 Sep 2011 18:34:47 +0000 (18:34 +0000)]
DWARF: Reorder fields to reduce padding.

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

12 years agoDon't mark objc_retainBlock as nounwind. It calls user copy constructors
Dan Gohman [Wed, 14 Sep 2011 18:33:34 +0000 (18:33 +0000)]
Don't mark objc_retainBlock as nounwind. It calls user copy constructors
which could theoretically throw.

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

12 years agoobjc_retainBlock is not NoModRef because it can update forwarding pointers
Dan Gohman [Wed, 14 Sep 2011 18:13:00 +0000 (18:13 +0000)]
objc_retainBlock is not NoModRef because it can update forwarding pointers
in memory relevant to the optimizer. rdar://10050579.

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

12 years agoARM fix assembly parser handling of ranges in register lists.
Jim Grosbach [Wed, 14 Sep 2011 18:08:35 +0000 (18:08 +0000)]
ARM fix assembly parser handling of ranges in register lists.

Clean up register list handling in general a bit to explicitly check things
like all the registers being from the same register class.

rdar://8883573

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

12 years agoDWARF: Improve indentation of DIE dumping so it's easier to see the structure.
Benjamin Kramer [Wed, 14 Sep 2011 17:54:56 +0000 (17:54 +0000)]
DWARF: Improve indentation of DIE dumping so it's easier to see the structure.

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

12 years agoIgnore the cloning of unknown registers.
Jakob Stoklund Olesen [Wed, 14 Sep 2011 17:34:37 +0000 (17:34 +0000)]
Ignore the cloning of unknown registers.

THe LRE_DidCloneVirtReg callback may be called with vitual registers
that RAGreedy doesn't even know about yet.  In that case, there are no
data structures to update.

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

12 years agollvm-dwarfdump: Make the "is debug info section" heuristic stricter so it doesn't...
Benjamin Kramer [Wed, 14 Sep 2011 17:28:13 +0000 (17:28 +0000)]
llvm-dwarfdump: Make the "is debug info section" heuristic stricter so it doesn't accidentaly picks up the wrong section.

Also add some validation code to the aranges section parser.

Fixes PR10926.

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

12 years agoAdd comment.
Akira Hatanaka [Wed, 14 Sep 2011 17:22:51 +0000 (17:22 +0000)]
Add comment.

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