oota-llvm.git
13 years agoAdd comment explaining that the order of processing doesn't matter here.
Bill Wendling [Mon, 17 Oct 2011 05:25:09 +0000 (05:25 +0000)]
Add comment explaining that the order of processing doesn't matter here.

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

13 years agoUpdate to disable asserts. Build a phase 3 compiler, and compare phase 2 files agains...
Bill Wendling [Mon, 17 Oct 2011 04:46:54 +0000 (04:46 +0000)]
Update to disable asserts. Build a phase 3 compiler, and compare phase 2 files against phase 3.

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

13 years agoTest case for CanLowerReturn fix (r141981)
Hal Finkel [Mon, 17 Oct 2011 04:03:59 +0000 (04:03 +0000)]
Test case for CanLowerReturn fix (r141981)

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

13 years agoAdd PPC 440 scheduler and some associated tests (new files)
Hal Finkel [Mon, 17 Oct 2011 04:03:55 +0000 (04:03 +0000)]
Add PPC 440 scheduler and some associated tests (new files)

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

13 years agoAdd PPC 440 scheduler and some associated tests
Hal Finkel [Mon, 17 Oct 2011 04:03:49 +0000 (04:03 +0000)]
Add PPC 440 scheduler and some associated tests

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

13 years agoAdd a routine to swap branch instruction operands, and update any
Chandler Carruth [Mon, 17 Oct 2011 01:11:57 +0000 (01:11 +0000)]
Add a routine to swap branch instruction operands, and update any
profile metadata at the same time. Use it to preserve metadata attached
to a branch when re-writing it in InstCombine.

Add metadata to the canonicalize_branch InstCombine test, and check that
it is tranformed correctly.

Reviewed by Nick Lewycky!

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

13 years agoOverhaul the 'test-release' script.
Bill Wendling [Sun, 16 Oct 2011 22:44:08 +0000 (22:44 +0000)]
Overhaul the 'test-release' script.

This removes support for building llvm-gcc. It will eventually add support for
building other projects.

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

13 years agoDelete a dead member. Dunno if this was ever used, but the current code
Chandler Carruth [Sun, 16 Oct 2011 22:27:54 +0000 (22:27 +0000)]
Delete a dead member. Dunno if this was ever used, but the current code
directly manipulates the weights inside of the BranchProbabilityInfo
that is passed in.

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

13 years agoAdd a proper LLVM banner to this file.
Chandler Carruth [Sun, 16 Oct 2011 22:15:07 +0000 (22:15 +0000)]
Add a proper LLVM banner to this file.

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

13 years agoAdd tripple and stabalize a few more tests.
Nadav Rotem [Sun, 16 Oct 2011 21:20:54 +0000 (21:20 +0000)]
Add tripple and stabalize a few more tests.

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

13 years agoUpdate the tree before applying patch.
Bill Wendling [Sun, 16 Oct 2011 20:59:25 +0000 (20:59 +0000)]
Update the tree before applying patch.

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

13 years agoAdd triple to tests.
Nadav Rotem [Sun, 16 Oct 2011 20:53:20 +0000 (20:53 +0000)]
Add triple to tests.

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

13 years agofix a typo in the test
Nadav Rotem [Sun, 16 Oct 2011 20:43:41 +0000 (20:43 +0000)]
fix a typo in the test

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

13 years agoEnable element promotion type legalization by deafault.
Nadav Rotem [Sun, 16 Oct 2011 20:31:33 +0000 (20:31 +0000)]
Enable element promotion type legalization by deafault.
Changed tests which assumed that vectors are legalized by widening them.

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

13 years agoOops! Fix testcase.
Nick Lewycky [Sun, 16 Oct 2011 20:20:15 +0000 (20:20 +0000)]
Oops! Fix testcase.

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

13 years agoWhen looking for dependencies on the src pointer, scan the src pointer. Scanning
Nick Lewycky [Sun, 16 Oct 2011 20:13:32 +0000 (20:13 +0000)]
When looking for dependencies on the src pointer, scan the src pointer. Scanning
on the memcpy call will pull up other unrelated stuff. Fixes PR11142.

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

13 years agoRemove the the test which checks the saving of a vector of booleans into memory.
Nadav Rotem [Sun, 16 Oct 2011 19:06:06 +0000 (19:06 +0000)]
Remove the the test which checks the saving of a vector of booleans into memory.

The decision was to pack the bits. Currently no codegen supports this.
Currently, all of the bits in the vector are saved into the same address
in memory.

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

13 years agoAdd X86 PEXTR and PDEP instructions.
Craig Topper [Sun, 16 Oct 2011 16:50:08 +0000 (16:50 +0000)]
Add X86 PEXTR and PDEP instructions.

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

13 years agoLet printf do the formatting instead aligning strings ourselves.
Benjamin Kramer [Sun, 16 Oct 2011 16:30:34 +0000 (16:30 +0000)]
Let printf do the formatting instead aligning strings ourselves.

While at it, merge some format strings.

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

13 years agoTwinify better.
Benjamin Kramer [Sun, 16 Oct 2011 15:46:29 +0000 (15:46 +0000)]
Twinify better.

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

13 years agoAdd AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.
Benjamin Kramer [Sun, 16 Oct 2011 12:10:27 +0000 (12:10 +0000)]
Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.

<stdin>:1:12: error: register %rax is only available in 64-bit mode
   incl    %rax
           ^~~~

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

13 years agotools/CMakeLists.txt: Fixup r142103. I don't remember why I had missed the line.
NAKAMURA Takumi [Sun, 16 Oct 2011 11:50:37 +0000 (11:50 +0000)]
tools/CMakeLists.txt: Fixup r142103. I don't remember why I had missed the line.

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

13 years agoX86AsmParser: Synthesize EndLoc for tokens out of StartLoc + Length and print ranges...
Benjamin Kramer [Sun, 16 Oct 2011 11:28:29 +0000 (11:28 +0000)]
X86AsmParser: Synthesize EndLoc for tokens out of StartLoc + Length and print ranges for invalid operands.

<stdin>:1:4: error: invalid instruction mnemonic 'abc'
   abc incl    %edi
   ^~~

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

13 years agoPR11143: Save the old diagnostic handler and call it when munging diagnostics for...
Benjamin Kramer [Sun, 16 Oct 2011 10:48:29 +0000 (10:48 +0000)]
PR11143: Save the old diagnostic handler and call it when munging diagnostics for #line directives.

This reenables proper inline asm diagnostics in clang

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

13 years agoFix a bug in LowerV2I64Splat, which generated a BUILD_VECTOR for which there was
Nadav Rotem [Sun, 16 Oct 2011 10:02:06 +0000 (10:02 +0000)]
Fix a bug in LowerV2I64Splat, which generated a BUILD_VECTOR for which there was
no pattern.

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

13 years agoInstall the PNG file as well. PR4780.
Bill Wendling [Sun, 16 Oct 2011 08:24:30 +0000 (08:24 +0000)]
Install the PNG file as well. PR4780.

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

13 years agoUpdate tutorial to reflect the current APIs. Also correct a small omission in
Bill Wendling [Sun, 16 Oct 2011 08:06:54 +0000 (08:06 +0000)]
Update tutorial to reflect the current APIs. Also correct a small omission in
LangImpl6.html (it needed to defined the 'binary :' operator).
PR9052

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

13 years agoAdd X86 BZHI instruction as well as BMI2 feature detection.
Craig Topper [Sun, 16 Oct 2011 07:55:05 +0000 (07:55 +0000)]
Add X86 BZHI instruction as well as BMI2 feature detection.

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

13 years agoAdd X86 INVPCID instruction. Add 32/64-bit predicates to INVEPT, INVVPID, VMREAD...
Craig Topper [Sun, 16 Oct 2011 07:05:40 +0000 (07:05 +0000)]
Add X86 INVPCID instruction. Add 32/64-bit predicates to INVEPT, INVVPID, VMREAD, and VMWRITE to remove hack from X86RecognizableInstr.

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

13 years agoEnable CREATE_SUBDIRS for a performance win, because there are a lot of files being...
Bill Wendling [Sun, 16 Oct 2011 06:43:10 +0000 (06:43 +0000)]
Enable CREATE_SUBDIRS for a performance win, because there are a lot of files being generated.

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

13 years agoAdd flags on Thumb2 indexed stores paralleling the flags on the indexed loads.
Cameron Zwarich [Sun, 16 Oct 2011 06:38:10 +0000 (06:38 +0000)]
Add flags on Thumb2 indexed stores paralleling the flags on the indexed loads.
These missing flags show up as errors when running -verify-coalescing on
test-suite.

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

13 years agoFix an obvious typo found when looking at nearby code.
Cameron Zwarich [Sun, 16 Oct 2011 06:38:06 +0000 (06:38 +0000)]
Fix an obvious typo found when looking at nearby code.

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

13 years agoremove the dead 'ShowLine' argument from SMDiagnostic.
Chris Lattner [Sun, 16 Oct 2011 05:47:55 +0000 (05:47 +0000)]
remove the dead 'ShowLine' argument from SMDiagnostic.

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

13 years agoMake SMDiagnostic a little more sane. Instead of passing around note/warning/error...
Chris Lattner [Sun, 16 Oct 2011 05:43:57 +0000 (05:43 +0000)]
Make SMDiagnostic a little more sane.  Instead of passing around note/warning/error as a
string, pass it around as an enum.

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

13 years agoEnhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
Chris Lattner [Sun, 16 Oct 2011 04:47:35 +0000 (04:47 +0000)]
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does.  Enhance
the X86 asmparser to produce ranges in the one case that was annoying me, for example:

test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
              ^~~~~~~

It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.

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

13 years agoAdd X86 BEXTR instruction. This instruction uses VEX.vvvv to encode Operand 3 instead...
Craig Topper [Sun, 16 Oct 2011 03:51:13 +0000 (03:51 +0000)]
Add X86 BEXTR instruction. This instruction uses VEX.vvvv to encode Operand 3 instead of Operand 2 so needs special casing in the disassembler and code emitter. Ultimately, should pass this information from tablegen

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

13 years agoCMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default. Clang will not...
NAKAMURA Takumi [Sun, 16 Oct 2011 02:54:33 +0000 (02:54 +0000)]
CMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default. Clang will not be built if LLVM_CLANG_SOURCE_DIR="" or ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt is not found.

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

13 years agoautoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang...
NAKAMURA Takumi [Sun, 16 Oct 2011 02:54:26 +0000 (02:54 +0000)]
autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile.

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

13 years agoMakefile.rules: Let OPTIONAL_PARALLEL_DIRS accept out-of-tree absolute path.
NAKAMURA Takumi [Sun, 16 Oct 2011 02:54:19 +0000 (02:54 +0000)]
Makefile.rules: Let OPTIONAL_PARALLEL_DIRS accept out-of-tree absolute path.

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

13 years agotest/Makefile: Inspect $(PROJ_OBJ_ROOT)/tools/clang/Makefile instead of $(PROJ_SRC_RO...
NAKAMURA Takumi [Sun, 16 Oct 2011 02:54:14 +0000 (02:54 +0000)]
test/Makefile: Inspect $(PROJ_OBJ_ROOT)/tools/clang/Makefile instead of $(PROJ_SRC_ROOT)/tools/clang for "check-all".

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

13 years agoAdd a helper script to create branches and tag release candidates.
Bill Wendling [Sun, 16 Oct 2011 02:03:18 +0000 (02:03 +0000)]
Add a helper script to create branches and tag release candidates.

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

13 years agoAdd a script that helps merge changes into a release branch.
Bill Wendling [Sun, 16 Oct 2011 01:54:03 +0000 (01:54 +0000)]
Add a script that helps merge changes into a release branch.

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

13 years agoAdd X86 feature detection support for BMI instructions. Added new cpuid function...
Craig Topper [Sun, 16 Oct 2011 00:21:51 +0000 (00:21 +0000)]
Add X86 feature detection support for BMI instructions. Added new cpuid function for accessing leafs with sub leafs specified in ECX. Also added code to keep track of the max cpuid level supported in both basic and extended leaves and qualified the existing cpuid calls and the new call to leaf 7.

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

13 years agoAdd support for X86 blsr, blsmsk, and blsi instructions. Required extra work because...
Craig Topper [Sat, 15 Oct 2011 20:46:47 +0000 (20:46 +0000)]
Add support for X86 blsr, blsmsk, and blsi instructions. Required extra work because these are the first VEX encoded instructions to use the reg field as an opcode extension.

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

13 years agoThe CELL backend cannot select patterns for vector trunc-store and shl on v2i64...
Nadav Rotem [Sat, 15 Oct 2011 20:05:17 +0000 (20:05 +0000)]
The CELL backend cannot select patterns for  vector trunc-store and shl on v2i64; CellSPU/shift_ops.ll fails when promoting elements.

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

13 years agoARM cannot select a pattern for trunc-store v4i8; /ARM/vrev.ll fails when promoting...
Nadav Rotem [Sat, 15 Oct 2011 20:03:12 +0000 (20:03 +0000)]
ARM cannot select a pattern for trunc-store v4i8; /ARM/vrev.ll fails when promoting elements.

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

13 years agoFix extra whitespace in comment.
Nick Lewycky [Sat, 15 Oct 2011 19:36:45 +0000 (19:36 +0000)]
Fix extra whitespace in comment.

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

13 years agoLet this test pass even if 'int' is somewhere in its directory path.
Nico Weber [Sat, 15 Oct 2011 18:07:16 +0000 (18:07 +0000)]
Let this test pass even if 'int' is somewhere in its directory path.

On my machine, grep matched:

  ; ModuleID = '/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/test/Linker/2011-08-18-unique-debug-type.ll'
  !9 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]

Explicitly filter out the ModuleID line.

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

13 years agoSmallVector -> array
Benjamin Kramer [Sat, 15 Oct 2011 13:28:31 +0000 (13:28 +0000)]
SmallVector -> array

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

13 years agoDon't replace all dominated uses if there is only one use, since that
Duncan Sands [Sat, 15 Oct 2011 11:13:42 +0000 (11:13 +0000)]
Don't replace all dominated uses if there is only one use, since that
use can't be dominated, saving one domtree lookup.

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

13 years agoAdd a bad char heuristic to StringRef::find.
Benjamin Kramer [Sat, 15 Oct 2011 10:08:31 +0000 (10:08 +0000)]
Add a bad char heuristic to StringRef::find.

Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of
uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways.

The worst case is still O(n*m) but we do a lot better on the average case now.

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

13 years agoMove the legalization of vector loads and stores into LegalizeVectorOps. In some
Nadav Rotem [Sat, 15 Oct 2011 07:41:10 +0000 (07:41 +0000)]
Move the legalization of vector loads and stores into LegalizeVectorOps. In some
cases we need the second type-legalization pass in order to support all cases.

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

13 years agoFix SCEVExpander assert during LSR: "argument of incompatible type".
Andrew Trick [Sat, 15 Oct 2011 06:19:55 +0000 (06:19 +0000)]
Fix SCEVExpander assert during LSR: "argument of incompatible type".

Just because we're dealing with a GEP doesn't mean we can assert the
SCEV has a pointer type. The fix is simply to ignore the SCEV pointer
type, which we really didn't need.
Fixes PR11138 webkit crash.

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

13 years agoRevert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of relying...
NAKAMURA Takumi [Sat, 15 Oct 2011 04:29:36 +0000 (04:29 +0000)]
Revert r142046, "Fix for llvm::sys::getHostTriple on Windows.  Instead of relying on the triple"

It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects.

By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-".

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

13 years agoFix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple
Chad Rosier [Sat, 15 Oct 2011 02:10:06 +0000 (02:10 +0000)]
Fix for llvm::sys::getHostTriple on Windows.  Instead of relying on the triple
from config.h, it discovers the triple based on the execution environment.

Patch by Aaron Ballman <aaron@aaronballman.com>

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

13 years agoToT is now for 3.1.
Bill Wendling [Sat, 15 Oct 2011 02:09:17 +0000 (02:09 +0000)]
ToT is now for 3.1.

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

13 years agoWindows/Memory.inc: Support the ability to allocate memory "near" another block of...
NAKAMURA Takumi [Sat, 15 Oct 2011 01:58:16 +0000 (01:58 +0000)]
Windows/Memory.inc: Support the ability to allocate memory "near" another block of memory on Win32. It has fixed FIXME.

Thanks to Aaron Ballman!

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

13 years agoFix indvars randomness by removing iteration over a map.
Andrew Trick [Sat, 15 Oct 2011 01:38:14 +0000 (01:38 +0000)]
Fix indvars randomness by removing iteration over a map.

I rewrote the algorithm a while back so it doesn't require map lookup,
but neglected to change the data structure. This was caught by
llvm-gcc self host, not because there's anything special about
llvm-gcc, but because it is the only test for nondeterminism we
currently have. Unit tests don't work well for everything; we should
always try to have a nondeterminism stress test running.

Fixes PR11133: llvm-gcc self host .o mismatch after enable-iv-rewrite=false

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

13 years agoClear out the landing pad to call site map for each function.
Bill Wendling [Sat, 15 Oct 2011 01:00:26 +0000 (01:00 +0000)]
Clear out the landing pad to call site map for each function.

This isn't put into the 'clear()' method because the information needs to stick
around (at least for a little bit) after the selection DAG is built.

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

13 years agoMark tADDrSPi as having side effects again.
Jakob Stoklund Olesen [Sat, 15 Oct 2011 00:57:13 +0000 (00:57 +0000)]
Mark tADDrSPi as having side effects again.

It really doesn't, but when r141929 removed the hasSideEffects flag from
this instruction, it caused miscompilations.  I am guessing that it got
moved across a stack pointer update.

Also clear isRematerializable after checking that this instruction is
in fact never rematerialized in the nightly test suite.

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

13 years agoMention some of the improvements in Clang 3.0 over 2.9.
Douglas Gregor [Sat, 15 Oct 2011 00:48:01 +0000 (00:48 +0000)]
Mention some of the improvements in Clang 3.0 over 2.9.

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

13 years agoThumb1 does not support dynamic stack realignment.
Chad Rosier [Sat, 15 Oct 2011 00:28:24 +0000 (00:28 +0000)]
Thumb1 does not support dynamic stack realignment.
rdar://10288916 is tracking this fix.

In the past, instcombine and other passes were promoting alloca alignment past
the natural alignment, resulting in dynamic stack realignment.  Lang's work now
prevents this from happening (LLVM commit r141599).  Now that this really
shouldn't happen report a fatal error rather than silently generate bad code.

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

13 years agoMark registers as DEAD because they're really just clobbers.
Bill Wendling [Sat, 15 Oct 2011 00:27:44 +0000 (00:27 +0000)]
Mark registers as DEAD because they're really just clobbers.

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

13 years agoAdd missing correctness check to ARMTargetLowering::ReconstructShuffle. Fixes PR11129.
Eli Friedman [Fri, 14 Oct 2011 23:58:49 +0000 (23:58 +0000)]
Add missing correctness check to ARMTargetLowering::ReconstructShuffle.  Fixes PR11129.

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

13 years agoMake sure that the register is in the register class before adding it as a machine op.
Bill Wendling [Fri, 14 Oct 2011 23:55:44 +0000 (23:55 +0000)]
Make sure that the register is in the register class before adding it as a machine op.

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

13 years agoMark the invoke call instruction as implicitly defining the callee-saved registers.
Bill Wendling [Fri, 14 Oct 2011 23:34:37 +0000 (23:34 +0000)]
Mark the invoke call instruction as implicitly defining the callee-saved registers.

The callee-saved registers cannot be live across an invoke call because the
control flow may continue along the exceptional edge. When this happens, all of
the callee-saved registers are no longer valid.

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

13 years agoconstify array itself, don't iterate multiple times.
Chris Lattner [Fri, 14 Oct 2011 22:50:21 +0000 (22:50 +0000)]
constify array itself, don't iterate multiple times.

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

13 years agoAllow the source module to be materialized during the linking process.
Tanya Lattner [Fri, 14 Oct 2011 22:17:46 +0000 (22:17 +0000)]
Allow the source module to be materialized during the linking process.

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

13 years agoUpdate test for disabling of code/data marker labels in ELF.
Owen Anderson [Fri, 14 Oct 2011 21:12:55 +0000 (21:12 +0000)]
Update test for disabling of code/data marker labels in ELF.

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

13 years agoFix a non-firing assert. Change:
Richard Trieu [Fri, 14 Oct 2011 20:50:26 +0000 (20:50 +0000)]
Fix a non-firing assert.  Change:
    assert("bad SymbolicOp.VariantKind");
To:
    assert(0 && "bad SymbolicOp.VariantKind");

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

13 years agoOCaml bindings: add some missing functions and testcases.
Torok Edwin [Fri, 14 Oct 2011 20:38:33 +0000 (20:38 +0000)]
OCaml bindings: add some missing functions and testcases.

The C bindings exposed some APIs that weren't covered by the OCaml bindings

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

13 years agoOCaml bindings: fix attributes to use all 32 bits
Torok Edwin [Fri, 14 Oct 2011 20:38:24 +0000 (20:38 +0000)]
OCaml bindings: fix attributes to use all 32 bits

OCaml's int is limited to 31 bits on 32-bit architectures, so use Int32
explicitly.
Also add an unpack_attr, and {function,param,instr}_attr functions to read
the attributes.

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

13 years agoOCaml bindings: add icmp_predicate
Torok Edwin [Fri, 14 Oct 2011 20:38:19 +0000 (20:38 +0000)]
OCaml bindings: add icmp_predicate

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

13 years agoOCaml bindings: fix infinite recursion on string_of_lltype
Torok Edwin [Fri, 14 Oct 2011 20:38:14 +0000 (20:38 +0000)]
OCaml bindings: fix infinite recursion on string_of_lltype

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

13 years agobindings: named struct support
Torok Edwin [Fri, 14 Oct 2011 20:38:08 +0000 (20:38 +0000)]
bindings: named struct support

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

13 years agoocaml bindings: add findlib META support
Torok Edwin [Fri, 14 Oct 2011 20:38:02 +0000 (20:38 +0000)]
ocaml bindings: add findlib META support

This makes it easier to link against LLVM libs, especially if you are using
_oasis.

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

13 years agoocaml bindings: introduce classify_value
Torok Edwin [Fri, 14 Oct 2011 20:37:56 +0000 (20:37 +0000)]
ocaml bindings: introduce classify_value

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

13 years agoocaml bindings: add getopcode for constant and instruction, and int64_of_const.
Torok Edwin [Fri, 14 Oct 2011 20:37:49 +0000 (20:37 +0000)]
ocaml bindings: add getopcode for constant and instruction, and int64_of_const.

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

13 years agobindings: tab and indentation fixes of my previous commits
Torok Edwin [Fri, 14 Oct 2011 20:37:42 +0000 (20:37 +0000)]
bindings: tab and indentation fixes of my previous commits

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

13 years agoA few 80-col violations.
Evan Cheng [Fri, 14 Oct 2011 20:36:23 +0000 (20:36 +0000)]
A few 80-col violations.

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

13 years agoDisable code/data region symbols on ELF targets, where different mapping symbols...
Owen Anderson [Fri, 14 Oct 2011 20:28:57 +0000 (20:28 +0000)]
Disable code/data region symbols on ELF targets, where different mapping symbols are used for ARM/Thumb mode code. This should only be re-enabled once we have a solution to properly distinguish these.

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

13 years agoAdd an implementation of the CanLowerReturn function to the PPC backend
Hal Finkel [Fri, 14 Oct 2011 19:51:36 +0000 (19:51 +0000)]
Add an implementation of the CanLowerReturn function to the PPC backend

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

13 years agoAdd f128 to datalayout string.
Akira Hatanaka [Fri, 14 Oct 2011 19:14:50 +0000 (19:14 +0000)]
Add f128 to datalayout string.

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

13 years agoFix threads/jobs Calculation
David Greene [Fri, 14 Oct 2011 19:12:37 +0000 (19:12 +0000)]
Fix threads/jobs Calculation

Pass the correct jobs and threads information to the builder.
We were underutilizing the number of jobs and threads specified
by the user.

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

13 years agoAdd Helpful Messages
David Greene [Fri, 14 Oct 2011 19:12:35 +0000 (19:12 +0000)]
Add Helpful Messages

Bit just a bit more verbose about what's going on.  Print options
to make to aid debugging.

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

13 years agoAdd Option to Skip Install
David Greene [Fri, 14 Oct 2011 19:12:34 +0000 (19:12 +0000)]
Add Option to Skip Install

Add a --no-install option to skip installing components.  This
speeds up the develop/test cycle.

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

13 years agoAdd Option to Skip gcc Build
David Greene [Fri, 14 Oct 2011 19:12:33 +0000 (19:12 +0000)]
Add Option to Skip gcc Build

And a --no-gcc option to skip dragonegg and gcc builds.
This greatly speeds up the develop/test cycle.

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

13 years agoinitial test commit (remove whitespace)
Hal Finkel [Fri, 14 Oct 2011 18:54:13 +0000 (18:54 +0000)]
initial test commit (remove whitespace)

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

13 years agoUpdate live-in lists when splitting critical edges.
Jakob Stoklund Olesen [Fri, 14 Oct 2011 17:25:46 +0000 (17:25 +0000)]
Update live-in lists when splitting critical edges.

Fixes PR10814. Patch by Jan Sjödin!

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

13 years agoRevert r141932, r141936 and r141937.
Akira Hatanaka [Fri, 14 Oct 2011 17:16:39 +0000 (17:16 +0000)]
Revert r141932, r141936 and r141937.

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

13 years agoFix typo. "__sync_fetch_and-xor_4" should be "__sync_fetch_and_xor_4".
Jim Grosbach [Fri, 14 Oct 2011 15:53:48 +0000 (15:53 +0000)]
Fix typo. "__sync_fetch_and-xor_4" should be "__sync_fetch_and_xor_4".

Pointed out by George Russell.

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

13 years agoAn instruction's operands aren't necessarily instructions or constants. They
Nick Lewycky [Fri, 14 Oct 2011 09:38:46 +0000 (09:38 +0000)]
An instruction's operands aren't necessarily instructions or constants. They
could be arguments, for example.

No testcase because this is a bug-fix broken out of a larger optimization patch.

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

13 years agoAdd X86 ANDN instruction. Including instruction selection.
Craig Topper [Fri, 14 Oct 2011 07:06:56 +0000 (07:06 +0000)]
Add X86 ANDN instruction. Including instruction selection.

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

13 years agoAdd X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor...
Craig Topper [Fri, 14 Oct 2011 03:21:46 +0000 (03:21 +0000)]
Add X86 TZCNT instruction and patterns to select it. Also added core-avx2 processor which is gcc's name for Haswell.

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

13 years agoDefinition of function getMipsRegisterNumbering.
Akira Hatanaka [Fri, 14 Oct 2011 03:04:24 +0000 (03:04 +0000)]
Definition of function getMipsRegisterNumbering.

Patch by Jack Carter and Reed Kotler at Mips.

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

13 years agoAdd definition of class MipsELFWriterInfo.
Akira Hatanaka [Fri, 14 Oct 2011 02:55:47 +0000 (02:55 +0000)]
Add definition of class MipsELFWriterInfo.

Patch by Jack Carter and Reed Kotler at Mips.

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

13 years agoAdd missing relocation types.
Akira Hatanaka [Fri, 14 Oct 2011 02:47:50 +0000 (02:47 +0000)]
Add missing relocation types.

Patch by Jack Carter and Reed Kotler at Mips.

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

13 years agoAdd ELF relocation types for Mips.
Akira Hatanaka [Fri, 14 Oct 2011 02:43:18 +0000 (02:43 +0000)]
Add ELF relocation types for Mips.

Patch by Jack Carter and Reed Kotler at Mips.

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

13 years agoFixup enumerations.
Akira Hatanaka [Fri, 14 Oct 2011 02:38:56 +0000 (02:38 +0000)]
Fixup enumerations.

Patch by Jack Carter at Mips.

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

13 years agoAdd more Mips relocation types.
Akira Hatanaka [Fri, 14 Oct 2011 02:17:30 +0000 (02:17 +0000)]
Add more Mips relocation types.

Patch by Jack Carter at Mips.

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