oota-llvm.git
13 years agoDon't split any loop backedges, including backedges of loops other than
Dan Gohman [Tue, 8 Feb 2011 00:55:13 +0000 (00:55 +0000)]
Don't split any loop backedges, including backedges of loops other than
the active loop. This is generally desirable, and it avoids trouble
in situations such as the testcase in PR9123, though the failure
mode depends on use-list order, so it is infeasible to test.

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

13 years agoAdd LiveIntervals::shrinkToUses().
Jakob Stoklund Olesen [Tue, 8 Feb 2011 00:03:05 +0000 (00:03 +0000)]
Add LiveIntervals::shrinkToUses().

After uses of a live range are removed, recompute the live range to only cover
the remaining uses. This is necessary after rematerializing the value before
some (but not all) uses.

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

13 years agoSimplifyCFG: Track the number of used icmps when turning a icmp chain into a switch...
Benjamin Kramer [Mon, 7 Feb 2011 22:37:28 +0000 (22:37 +0000)]
SimplifyCFG: Track the number of used icmps when turning a icmp chain into a switch. If we used only one icmp, don't turn it into a switch.

Also prevent the switch-to-icmp transform from creating identity adds, noticed by Marius Wachtler.

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

13 years agoAdd support for parsing dmb/dsb instructions
Bruno Cardoso Lopes [Mon, 7 Feb 2011 22:09:15 +0000 (22:09 +0000)]
Add support for parsing dmb/dsb instructions

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

13 years agoRemove comment about an argument that was removed couple of years ago.
Devang Patel [Mon, 7 Feb 2011 21:58:52 +0000 (21:58 +0000)]
Remove comment about an argument that was removed couple of years ago.

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

13 years agoRemove the MCR asm parser hack and start using the custom target specific asm
Bruno Cardoso Lopes [Mon, 7 Feb 2011 21:41:25 +0000 (21:41 +0000)]
Remove the MCR asm parser hack and start using the custom target specific asm
parsing of operands introduced in r125030. As a small note, besides using a more
generic approach we can also have more descriptive output when debugging
llvm-mc, example:

mcr  p7, #1, r5, c1, c1, #4

note: parsed instruction:
  ['mcr', <ARMCC::al>,
          <coprocessor number: 7>,
          1,
          <register 73>,
          <coprocessor register: 1>,
          <coprocessor register: 1>,
          4]

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

13 years agofix comment change.
Chris Lattner [Mon, 7 Feb 2011 20:03:14 +0000 (20:03 +0000)]
fix comment change.

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

13 years agoImplement support for custom target specific asm parsing of operands.
Bruno Cardoso Lopes [Mon, 7 Feb 2011 19:38:32 +0000 (19:38 +0000)]
Implement support for custom target specific asm parsing of operands.
Motivation: Improve the parsing of not usual (different from registers or
immediates) operand forms.

This commit implements only the generic support. The ARM specific modifications
will come next.

A table like the one below is autogenerated for every instruction
containing a 'ParserMethod' in its AsmOperandClass

static const OperandMatchEntry OperandMatchTable[20] = {
 /* Mnemonic, Operand List Mask, Operand Class, Features */
 { "cdp", 29 /* 0, 2, 3, 4 */, MCK_Coproc, Feature_IsThumb|Feature_HasV6 },
 { "cdp", 58 /* 1, 3, 4, 5 */, MCK_Coproc, Feature_IsARM },

A matcher function very similar (but lot more naive) to
MatchInstructionImpl scans the table. After the mnemonic match, the
features are checked and if the "to be parsed" operand index is
present in the mask, there's a real match. Then, a switch like the one
below dispatch the parsing to the custom method provided in
'ParseMethod':

 case MCK_Coproc:
   return TryParseCoprocessorOperandName(Operands);

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

13 years ago[AVX] Insert/extract subvector lowering support. This includes a
David Greene [Mon, 7 Feb 2011 19:36:54 +0000 (19:36 +0000)]
[AVX] Insert/extract subvector lowering support.  This includes a
couple of utility functions that will be used in other places for more
AVX lowering.

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

13 years agoARM/MC/ELF Lowercase .cpu attributes in .s, but make them uppercase in .o
Jason W Kim [Mon, 7 Feb 2011 19:07:11 +0000 (19:07 +0000)]
ARM/MC/ELF Lowercase .cpu attributes in .s, but make them uppercase in .o

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

13 years agoFix an obvious typo which caused an isel assertion. rdar://8964854.
Evan Cheng [Mon, 7 Feb 2011 18:50:47 +0000 (18:50 +0000)]
Fix an obvious typo which caused an isel assertion. rdar://8964854.

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

13 years agoReduce test case, smaller is better.
Devang Patel [Mon, 7 Feb 2011 18:24:18 +0000 (18:24 +0000)]
Reduce test case, smaller is better.

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

13 years agoAdd codegen support for using post-increment NEON load/store instructions.
Bob Wilson [Mon, 7 Feb 2011 17:43:21 +0000 (17:43 +0000)]
Add codegen support for using post-increment NEON load/store instructions.

The vld1-lane, vld1-dup and vst1-lane instructions do not yet support using
post-increment versions, but all the rest of the NEON load/store instructions
should be handled now.

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

13 years agoChange VLD3/4 and VST3/4 for quad registers to not update the address register.
Bob Wilson [Mon, 7 Feb 2011 17:43:15 +0000 (17:43 +0000)]
Change VLD3/4 and VST3/4 for quad registers to not update the address register.

These operations are expanded to pairs of loads or stores, and the first one
uses the address register update to produce the address for the second one.
So far, the second load/store has also updated the address register, just
for convenience, since that output has never been used.  In anticipation of
actually supporting post-increment updates for these operations, this changes
the non-updating operations to use a non-updating load/store for the second
instruction.

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

13 years agoFix some NEON instruction itineraries.
Bob Wilson [Mon, 7 Feb 2011 17:43:12 +0000 (17:43 +0000)]
Fix some NEON instruction itineraries.

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

13 years agoFix a comment: addrmode6 no longer includes the optional writeback flag.
Bob Wilson [Mon, 7 Feb 2011 17:43:09 +0000 (17:43 +0000)]
Fix a comment: addrmode6 no longer includes the optional writeback flag.

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

13 years agoRemove inaccurate comments: so_imm and t2_so_imm operands are not encoded
Bob Wilson [Mon, 7 Feb 2011 17:43:06 +0000 (17:43 +0000)]
Remove inaccurate comments: so_imm and t2_so_imm operands are not encoded
until the instructions are emitted or printed.

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

13 years agoMove code for OffsetCompare struct closer to where it is used.
Bob Wilson [Mon, 7 Feb 2011 17:43:03 +0000 (17:43 +0000)]
Move code for OffsetCompare struct closer to where it is used.

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

13 years agoimplement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
Chris Lattner [Mon, 7 Feb 2011 16:40:21 +0000 (16:40 +0000)]
implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
Factor some code better.

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

13 years agoAdd an m_Div pattern for matching either a udiv or an sdiv and use it
Duncan Sands [Mon, 7 Feb 2011 09:36:32 +0000 (09:36 +0000)]
Add an m_Div pattern for matching either a udiv or an sdiv and use it
to simplify the "(X/Y)*Y->X when the division is exact" transform.

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

13 years agoAdd IRBuilder methods for creating an exact udiv, like for exact sdiv.
Duncan Sands [Mon, 7 Feb 2011 09:21:52 +0000 (09:21 +0000)]
Add IRBuilder methods for creating an exact udiv, like for exact sdiv.

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

13 years agoInstall only *.cmake files. Don't install .svn directory.
Oscar Fuentes [Mon, 7 Feb 2011 02:22:23 +0000 (02:22 +0000)]
Install only *.cmake files. Don't install .svn directory.

Fixes PR9159.

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

13 years agoTeach ARM/MC/ELF about gcc compatible reloc output to get past odd linkage
Jason W Kim [Mon, 7 Feb 2011 01:11:15 +0000 (01:11 +0000)]
Teach ARM/MC/ELF about gcc compatible reloc output to get past odd linkage
failures with relocations.

The code committed is a first cut at compatibility for emitted relocations in
ELF .o.

Why do this? because existing ARM tools like emitting relocs symbols as
explicit relocations, not as section-offset relocs.

Result is that with these changes,
1) relocs are now substantially identical what to gcc outputs.
2) larger apps (including many spec2k tests) compile, cross-link, and pass

Added reminder fixme to tests for future conversion to .s form.

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

13 years agoRework some .ARM.attribute work for improved gcc compatibility.
Jason W Kim [Mon, 7 Feb 2011 00:49:53 +0000 (00:49 +0000)]
Rework some .ARM.attribute work for improved gcc compatibility.
Unified EmitTextAttribute for both Asm and Obj emission (.cpu only)
Added necessary cortex-A8 related attrs for codegen compat tests.

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

13 years agoteach instsimplify to transform (X / Y) * Y to X
Chris Lattner [Sun, 6 Feb 2011 22:05:31 +0000 (22:05 +0000)]
teach instsimplify to transform (X / Y) * Y to X
when the div is an exact udiv.

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

13 years agorename test.
Chris Lattner [Sun, 6 Feb 2011 21:59:10 +0000 (21:59 +0000)]
rename test.

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

13 years agoenhance vmcore to know that udiv's can be exact, and add a trivial
Chris Lattner [Sun, 6 Feb 2011 21:44:57 +0000 (21:44 +0000)]
enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though.  This is progress on PR8862

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

13 years agoRemove premature optimization that avoided calculating argument weights
Eric Christopher [Sun, 6 Feb 2011 21:27:46 +0000 (21:27 +0000)]
Remove premature optimization that avoided calculating argument weights
if we weren't going to inline the function. The rest of the code using
this was removed.

Fixes PR9154.

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

13 years agoSimplify test, as suggested by Chris.
Anders Carlsson [Sun, 6 Feb 2011 20:22:49 +0000 (20:22 +0000)]
Simplify test, as suggested by Chris.

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

13 years agoRemove a virtual inheritance case that clang can devirtualize fully now.
Anders Carlsson [Sun, 6 Feb 2011 20:16:49 +0000 (20:16 +0000)]
Remove a virtual inheritance case that clang can devirtualize fully now.

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

13 years agoWhen loading from a constant, fold inttoptr if the integer type and the resulting...
Anders Carlsson [Sun, 6 Feb 2011 20:11:56 +0000 (20:11 +0000)]
When loading from a constant, fold inttoptr if the integer type and the resulting pointer type both have the same size.

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

13 years agoDon't define NDEBUG on MSVC_IDE and XCode builds. Fixes PR9155.
Oscar Fuentes [Sun, 6 Feb 2011 19:07:06 +0000 (19:07 +0000)]
Don't define NDEBUG on MSVC_IDE and XCode builds. Fixes PR9155.

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

13 years agoSimplify away redundant test, and document what's going on.
Nick Lewycky [Sun, 6 Feb 2011 05:04:00 +0000 (05:04 +0000)]
Simplify away redundant test, and document what's going on.

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

13 years agoRemove specialized comparison of InlineAsm objects. They're uniqued on creation
Nick Lewycky [Sun, 6 Feb 2011 04:33:50 +0000 (04:33 +0000)]
Remove specialized comparison of InlineAsm objects. They're uniqued on creation
now, and this wasn't comparing some of their relevant bits anyhow.

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

13 years agoMoved more stuff to HandleLLVMOptions.cmake
Oscar Fuentes [Sat, 5 Feb 2011 19:08:42 +0000 (19:08 +0000)]
Moved more stuff to HandleLLVMOptions.cmake

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

13 years agoFix another warning.
Anders Carlsson [Sat, 5 Feb 2011 18:33:43 +0000 (18:33 +0000)]
Fix another warning.

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

13 years agoFix a clang warning.
Anders Carlsson [Sat, 5 Feb 2011 18:19:35 +0000 (18:19 +0000)]
Fix a clang warning.

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

13 years agoWindows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
NAKAMURA Takumi [Sat, 5 Feb 2011 15:11:53 +0000 (15:11 +0000)]
Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.

config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.

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

13 years agoTarget/X86: Tweak allocating shadow area (aka home) on Win64. It must be enough for...
NAKAMURA Takumi [Sat, 5 Feb 2011 15:11:32 +0000 (15:11 +0000)]
Target/X86: Tweak allocating shadow area (aka home) on Win64. It must be enough for caller to allocate one.

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

13 years agolib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional...
NAKAMURA Takumi [Sat, 5 Feb 2011 15:11:13 +0000 (15:11 +0000)]
lib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional changes.

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

13 years agolib/Target/X86/X86JITInfo.cpp: Add Win64 stuff.
NAKAMURA Takumi [Sat, 5 Feb 2011 15:11:03 +0000 (15:11 +0000)]
lib/Target/X86/X86JITInfo.cpp: Add Win64 stuff.

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

13 years agoTarget/X86: Fix whitespace.
NAKAMURA Takumi [Sat, 5 Feb 2011 15:10:54 +0000 (15:10 +0000)]
Target/X86: Fix whitespace.

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

13 years agoWindows/Program.inc: Quote arguments when dubious characters (used by cmd.exe or...
NAKAMURA Takumi [Sat, 5 Feb 2011 08:53:12 +0000 (08:53 +0000)]
Windows/Program.inc: Quote arguments when dubious characters (used by cmd.exe or MSYS shell) are included to invoke CreateProcess(). Thanks to Danil Malyshev.

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

13 years agoMove a test that ended up in the wrong place.
Bob Wilson [Sat, 5 Feb 2011 04:15:50 +0000 (04:15 +0000)]
Move a test that ended up in the wrong place.

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

13 years agoFix an anti-dep breaker corner case.
Andrew Trick [Sat, 5 Feb 2011 02:58:46 +0000 (02:58 +0000)]
Fix an anti-dep breaker corner case.
<rdar://problem/8959122> illegal register operands for UMULL instruction in cfrac nightly test
I'm stil working on a unit test, but the case is:
rx = movcc rx, r3
r2 = ldr
r2, r3 = umull r2, r2

The anti-dep breaker should not convert this into an illegal instruction:
r2, r2 = umull

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

13 years agoFix cut and paste error spotted by Jakob.
Eric Christopher [Sat, 5 Feb 2011 02:48:47 +0000 (02:48 +0000)]
Fix cut and paste error spotted by Jakob.

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

13 years agoBe more strict about the first/last interference-free use.
Jakob Stoklund Olesen [Sat, 5 Feb 2011 01:06:39 +0000 (01:06 +0000)]
Be more strict about the first/last interference-free use.

If the interference overlaps the instruction, we cannot separate it.

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

13 years agoAdd assertions to verify that the new interval is clear of the interference.
Jakob Stoklund Olesen [Sat, 5 Feb 2011 01:06:36 +0000 (01:06 +0000)]
Add assertions to verify that the new interval is clear of the interference.

If these inequalities don't hold, we are creating a live range split that won't
allocate.

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

13 years agoRewrite how the indirect call bonus is handled. This now works by:
Eric Christopher [Sat, 5 Feb 2011 00:49:15 +0000 (00:49 +0000)]
Rewrite how the indirect call bonus is handled. This now works by:

a) Making it a per call site bonus for functions that we can move from
indirect to direct calls.
b) Reduces the bonus from 500 to 100 per call site.
c) Subtracts the size of the possible newly inlineable call from the
bonus to only add a bonus if we can inline a small function to devirtualize
it.

Also changes the bonus from a positive that's subtracted to a negative
that's added.

Fixes the remainder of rdar://8546196 by reducing the object file size
after inlining by 84%.

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

13 years ago[AVX] Revert 124910 until clients are ready.
David Greene [Sat, 5 Feb 2011 00:24:41 +0000 (00:24 +0000)]
[AVX] Revert 124910 until clients are ready.

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

13 years ago[AVX] Add some utilities to insert and extract 128-bit subvectors.
David Greene [Fri, 4 Feb 2011 23:29:33 +0000 (23:29 +0000)]
[AVX] Add some utilities to insert and extract 128-bit subvectors.
This allows us to easily support 256-bit operations that don't have
native 256-bit support.  This applies to integer operations, certain
types of shuffles and various othher things.

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

13 years agoMC/AsmMatcher: Sink ConvertToMCInst into the TargetAsmParser instance, which
Daniel Dunbar [Fri, 4 Feb 2011 23:17:40 +0000 (23:17 +0000)]
MC/AsmMatcher: Sink ConvertToMCInst into the TargetAsmParser instance, which
implicitly allows custom conversions to be member functions.

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

13 years agoApparently, it is possible for a block with a landing pad successor to have no calls.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 23:11:13 +0000 (23:11 +0000)]
Apparently, it is possible for a block with a landing pad successor to have no calls.

In that case we simply ignore the landing pad and split live ranges before the
first terminator.

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

13 years agoMerge .debug_loc entries whenever possible to reduce debug_loc size.
Devang Patel [Fri, 4 Feb 2011 22:57:18 +0000 (22:57 +0000)]
Merge .debug_loc entries whenever possible to reduce debug_loc size.

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

13 years agoMark that the return is using EAX so that we don't use it for some other
Nick Lewycky [Fri, 4 Feb 2011 22:44:08 +0000 (22:44 +0000)]
Mark that the return is using EAX so that we don't use it for some other
purpose. Fixes PR9080!

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

13 years agoBe more accurate about live range splitting at the end of blocks.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 21:42:06 +0000 (21:42 +0000)]
Be more accurate about live range splitting at the end of blocks.

If interference reaches the last split point, it is effectively live out and
should be marked as 'MustSpill'.

This can make a difference when the terminator uses a register. There is no way
that register can be reused in the outgoing CFG bundle, even if it isn't live
out.

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

13 years agoTeach ARM/MC/ELF about EF_ARM_EABI_VERSION. The magic number is set to
Jason W Kim [Fri, 4 Feb 2011 21:41:11 +0000 (21:41 +0000)]
Teach ARM/MC/ELF about EF_ARM_EABI_VERSION. The magic number is set to
5 to match the current doc.
Added FIXME reminder Make it really configurable later.

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

13 years agoTeach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
Jason W Kim [Fri, 4 Feb 2011 19:47:15 +0000 (19:47 +0000)]
Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
(yes, this is different from R_ARM_CALL)

- Adds a new method getARMBranchTargetOpValue() which handles the
  necessary distinction between the conditional and unconditional br/bl
  needed for ARM/ELF

At least for ARM mode, the needed fixup for conditional versus unconditional
br/bl is identical, but the ARM docs and existing ARM tools expect this
reloc type...

Added a few FIXME's for future naming fixups in ARMInstrInfo.td

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

13 years agoAdd LiveIntervals::getLastSplitPoint().
Jakob Stoklund Olesen [Fri, 4 Feb 2011 19:33:11 +0000 (19:33 +0000)]
Add LiveIntervals::getLastSplitPoint().

A live range cannot be split everywhere in a basic block. A split must go before
the first terminator, and if the variable is live into a landing pad, the split
must happen before the call that can throw.

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

13 years agoVerify that one of the ranges produced by region splitting is allocatable.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 19:33:07 +0000 (19:33 +0000)]
Verify that one of the ranges produced by region splitting is allocatable.

We should not be attempting a region split if it won't lead to at least one
directly allocatable interval. That could cause infinite splitting loops.

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

13 years agoMC/AsmParser: Add support for allowing the conversion process to fail (via
Daniel Dunbar [Fri, 4 Feb 2011 17:12:23 +0000 (17:12 +0000)]
MC/AsmParser: Add support for allowing the conversion process to fail (via
custom conversion functions).

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

13 years agobuild: Add MAKEFILE_UNITTEST_NO_INCLUDE_COMMON build variable, to be leveraged
Daniel Dunbar [Fri, 4 Feb 2011 17:12:18 +0000 (17:12 +0000)]
build: Add MAKEFILE_UNITTEST_NO_INCLUDE_COMMON build variable, to be leveraged
by Clang.

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

13 years agoMC/AsmMatcher: Add support for custom conversion functions.
Daniel Dunbar [Fri, 4 Feb 2011 17:12:15 +0000 (17:12 +0000)]
MC/AsmMatcher: Add support for custom conversion functions.

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

13 years agoSilence uninitialized value warnings.
David Greene [Fri, 4 Feb 2011 17:01:53 +0000 (17:01 +0000)]
Silence uninitialized value warnings.

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

13 years ago[AVX] Support VSINSERTF128 with more patterns and appropriate
David Greene [Fri, 4 Feb 2011 16:08:29 +0000 (16:08 +0000)]
[AVX] Support VSINSERTF128 with more patterns and appropriate
infrastructure.  This makes lowering 256-bit vectors to 128-bit
vectors simple when 256-bit vector support is not available.

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

13 years agoMake Win32's header file name lower for cross build on case-sensitive filesystem.
NAKAMURA Takumi [Fri, 4 Feb 2011 12:53:04 +0000 (12:53 +0000)]
Make Win32's header file name lower for cross build on case-sensitive filesystem.

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

13 years agoLLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.
Oscar Fuentes [Fri, 4 Feb 2011 05:40:04 +0000 (05:40 +0000)]
LLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.

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

13 years agoAdd the tablegenned files to the `clean' target.
Oscar Fuentes [Fri, 4 Feb 2011 03:47:50 +0000 (03:47 +0000)]
Add the tablegenned files to the `clean' target.

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

13 years agoIntroducing a new method of tracking register pressure. We can't
Andrew Trick [Fri, 4 Feb 2011 03:18:17 +0000 (03:18 +0000)]
Introducing a new method of tracking register pressure. We can't
precisely track pressure on a selection DAG, but we can at least keep
it balanced. This design accounts for various interesting aspects of
selection DAGS: register and subregister copies, glued nodes, dead
nodes, unused registers, etc.

Added SUnit::NumRegDefsLeft and ScheduleDAGSDNodes::RegDefIter.

Note: I disabled PrescheduleNodesWithMultipleUses when register
pressure is enabled, based on no evidence other than I don't think it
makes sense to have both enabled.

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

13 years agoDebugLoc associated with a machine instruction is used to emit location entries....
Devang Patel [Fri, 4 Feb 2011 01:43:25 +0000 (01:43 +0000)]
DebugLoc associated with a machine instruction is used to emit location entries. DebugLoc associated with a DBG_VALUE is used to identify lexical scope of the variable. After register allocation, while inserting DBG_VALUE remember original debug location for the first instruction and reuse it, otherwise dwarf writer may be mislead in identifying the variable's scope.

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

13 years agoUpdate comments.
Evan Cheng [Fri, 4 Feb 2011 01:10:12 +0000 (01:10 +0000)]
Update comments.

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

13 years agoSkip unused values.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 00:59:23 +0000 (00:59 +0000)]
Skip unused values.

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

13 years agoAlso compute interference intervals for blocks with no uses.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 00:39:20 +0000 (00:39 +0000)]
Also compute interference intervals for blocks with no uses.

When the live range is live through a block that doesn't use the register, but
that has interference, region splitting wants to split at the top and bottom of
the basic block.

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

13 years agoVerify kill flags conservatively.
Jakob Stoklund Olesen [Fri, 4 Feb 2011 00:39:18 +0000 (00:39 +0000)]
Verify kill flags conservatively.

Allow a live range to end with a kill flag, but don't allow a kill flag that
doesn't end the live range.

This makes the machine code verifier more useful during register allocation when
kill flag computation is deferred.

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

13 years agoTidy up a bit.
Jim Grosbach [Thu, 3 Feb 2011 23:26:36 +0000 (23:26 +0000)]
Tidy up a bit.

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

13 years agoDo not sign extend floating-point values in the asm parser.
Bob Wilson [Thu, 3 Feb 2011 23:17:47 +0000 (23:17 +0000)]
Do not sign extend floating-point values in the asm parser.

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

13 years agoRemove trailing whitespace
Bob Wilson [Thu, 3 Feb 2011 23:17:44 +0000 (23:17 +0000)]
Remove trailing whitespace

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

13 years agoEdit a comment for consistency.
Bob Wilson [Thu, 3 Feb 2011 23:17:40 +0000 (23:17 +0000)]
Edit a comment for consistency.

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

13 years agowhitespace
Andrew Trick [Thu, 3 Feb 2011 23:00:17 +0000 (23:00 +0000)]
whitespace

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

13 years agoSimplifyCFG: Also transform switches that represent a range comparison but are not...
Benjamin Kramer [Thu, 3 Feb 2011 22:51:41 +0000 (22:51 +0000)]
SimplifyCFG: Also transform switches that represent a range comparison but are not sorted into sub+icmp.

This transforms another 1000 switches in gcc.c.

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

13 years agoMoved to Clang's source tree its configuration options and associated
Oscar Fuentes [Thu, 3 Feb 2011 22:47:59 +0000 (22:47 +0000)]
Moved to Clang's source tree its configuration options and associated
macros.

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

13 years agoFactor the computation of the basename of libraries. This avoids renaming
Rafael Espindola [Thu, 3 Feb 2011 22:01:15 +0000 (22:01 +0000)]
Factor the computation of the basename of libraries. This avoids renaming
them on install. Before we would have LLVMgold.so on the build directory but
libLLVMgold.so on the install dir.

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

13 years agoFix 80-column violations and whitespace.
Bob Wilson [Thu, 3 Feb 2011 21:46:10 +0000 (21:46 +0000)]
Fix 80-column violations and whitespace.

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

13 years agoChanges for building Clang and others using LLVM as an external
Oscar Fuentes [Thu, 3 Feb 2011 20:57:36 +0000 (20:57 +0000)]
Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

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

13 years agoEnsure that the computed interference intervals actually overlap their basic blocks.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:43 +0000 (20:29 +0000)]
Ensure that the computed interference intervals actually overlap their basic blocks.

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

13 years agoTweak debug output from SlotIndexes.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:41 +0000 (20:29 +0000)]
Tweak debug output from SlotIndexes.

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

13 years agoAdd debug output and asserts to the phi-connecting code.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:39 +0000 (20:29 +0000)]
Add debug output and asserts to the phi-connecting code.

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

13 years agoFix coloring bug when mapping values in the middle of a live-through block.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 20:29:36 +0000 (20:29 +0000)]
Fix coloring bug when mapping values in the middle of a live-through block.

If the found value is not live-through the block, we should only add liveness up
to the requested slot index. When the value is live-through, the whole block
should be colored.

Bug found by SSA verification in the machine code verifier.

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

13 years agoReturn live range end points from SplitEditor::enter*/leave*.
Jakob Stoklund Olesen [Thu, 3 Feb 2011 17:04:16 +0000 (17:04 +0000)]
Return live range end points from SplitEditor::enter*/leave*.

These end points come from the inserted copies, and can be passed directly to
useIntv. This simplifies the coloring code.

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

13 years agoSilence an MSVC warning
Jakob Stoklund Olesen [Thu, 3 Feb 2011 17:04:12 +0000 (17:04 +0000)]
Silence an MSVC warning

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

13 years ago[AVX] VEXTRACTF128 support. This commit includes patterns for
David Greene [Thu, 3 Feb 2011 15:50:00 +0000 (15:50 +0000)]
[AVX] VEXTRACTF128 support.  This commit includes patterns for
matching EXTRACT_SUBVECTOR to VEXTRACTF128 along with support routines
to examine and translate index values.  VINSERTF128 comes next.  With
these two in place we can begin supporting more AVX operations as
INSERT/EXTRACT can be used as a fallback when 256-bit support is not
available.

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

13 years agoAdd XCore intrinsics for resource instructions.
Richard Osborne [Thu, 3 Feb 2011 13:14:25 +0000 (13:14 +0000)]
Add XCore intrinsics for resource instructions.

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

13 years agocmake/*: Add svn:eol-style=native and fix CRLF.
NAKAMURA Takumi [Thu, 3 Feb 2011 11:41:27 +0000 (11:41 +0000)]
cmake/*: Add svn:eol-style=native and fix CRLF.

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

13 years agoImprove threading of comparisons over select instructions (spotted by my
Duncan Sands [Thu, 3 Feb 2011 09:37:39 +0000 (09:37 +0000)]
Improve threading of comparisons over select instructions (spotted by my
auto-simplifier).  This has a big impact on Ada code, but not much else.
Unfortunately the impact is mostly negative!  This is due to PR9004 (aka
SCCP failing to resolve conditional branch conditions in the destination
blocks of the branch), in which simple correlated expressions are not
resolved but complicated ones are, so simplifying has a bad effect!

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

13 years agoPart of this test is invariant inside the inner loop - move it outside
Duncan Sands [Thu, 3 Feb 2011 08:14:04 +0000 (08:14 +0000)]
Part of this test is invariant inside the inner loop - move it outside
the loop.

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

13 years agotest/Makefile: "check-all" should update tools/clang/test/Unit/lit.site.cfg, too...
NAKAMURA Takumi [Thu, 3 Feb 2011 07:36:02 +0000 (07:36 +0000)]
test/Makefile: "check-all" should update tools/clang/test/Unit/lit.site.cfg, too. Follow up to clang r124777.

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

13 years agoReapply this.
Eric Christopher [Thu, 3 Feb 2011 06:18:29 +0000 (06:18 +0000)]
Reapply this.

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

13 years agoTemporarily revert 124765 in an attempt to find the cycle breaking bootstrap.
Eric Christopher [Thu, 3 Feb 2011 05:40:54 +0000 (05:40 +0000)]
Temporarily revert 124765 in an attempt to find the cycle breaking bootstrap.

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

13 years agoPlatform tests for `sys/uio.h' header and `writev' function.
Oscar Fuentes [Thu, 3 Feb 2011 04:23:07 +0000 (04:23 +0000)]
Platform tests for `sys/uio.h' header and `writev' function.

This is the cmake equivalent for r124769.

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

13 years agoAdd -march to fix the bots.
Rafael Espindola [Thu, 3 Feb 2011 04:21:01 +0000 (04:21 +0000)]
Add -march to fix the bots.

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