Nick Lewycky
0ef0557ab5
Check for the correct size in the invariant marker.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 23:32:26 +00:00
Evan Cheng
01b623c8c2
Fix machine-cp by having it to check sub-register indicies. e.g.
...
ecx = mov eax
al = mov ch
The second copy is not a nop because the sub-indices of ecx,ch is not the
same of that of eax/al.
Re-enabled machine-cp.
PR11940
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 23:28:17 +00:00
Chad Rosier
acb6f5096f
Fix 80-column violation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150998 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 23:13:17 +00:00
Benjamin Kramer
117314009e
Test case for r150978.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150979 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 19:00:28 +00:00
Benjamin Kramer
6ad48f4137
InstCombine: Removing the base from the address calculation is only safe when the GEPs are inbounds.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150978 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 18:45:10 +00:00
Eric Christopher
1c7f744bbb
Make this a bit prettier and more obvious when a derived type isn't
...
derived from anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150975 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 18:04:39 +00:00
Eric Christopher
dc1eeb89f2
If a derived type is also a composite type, print that information
...
too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150974 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 18:04:35 +00:00
Eric Christopher
9f90e8760f
Add support for runtime languages on our forward declarations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150973 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 18:04:14 +00:00
Benjamin Kramer
9bb40853ee
InstCombine: When comparing two GEPs that were derived from the same base pointer but use different types, expand the offset calculation and to the compare on the offset if profitable.
...
This came up in SmallVector code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150962 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 15:07:47 +00:00
Benjamin Kramer
d2348639e6
InstCombine: Make OptimizePointerDifference more aggressive.
...
- Ignore pointer casts.
- Also expand GEPs that aren't constantexprs when they have one use or only constant indices.
- We now compile "&foo[i] - &foo[j]" into "i - j".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150961 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 14:34:57 +00:00
James Molloy
6259dcdc57
Teach the DAGCombiner that certain loadext nodes followed by ANDs can be converted to zeroexts.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150957 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 12:02:38 +00:00
James Molloy
873fd5f753
Improve generated code for extending loads and some trunc stores on ARM.
...
Teach TargetSelectionDAG about lengthening loads for vector types and set v4i8 as legal. Allow FP_TO_UINT for v4i16 from v4i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150956 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 09:24:05 +00:00
Evan Cheng
df7e8bd702
Make post-ra tail duplication bundle safe. No test case as recent codegen
...
flow changes have already hidden the bug. rdar://10893812
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150949 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 07:51:58 +00:00
Nick Lewycky
7fa7677705
Rename class Evaluate to Evaluator and put it in an anonymous namespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150947 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 03:25:59 +00:00
Chris Lattner
b053fc1c92
fold comparisons of gep'd alloca points with null to false,
...
implementing PR12013. We now compile the testcase to:
__Z4testv: ## @_Z4testv
## BB#0: ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
pushq %rbx
subq $64, %rsp
leaq 32(%rsp), %rbx
movq %rbx, (%rsp)
leaq 64(%rsp), %rax
movq %rax, 16(%rsp)
movl $1, 32(%rsp)
leaq 36(%rsp), %rax
movq %rax, 8(%rsp)
leaq (%rsp), %rdi
callq __Z1gRN4llvm11SmallVectorIiLj8EEE
movq (%rsp), %rdi
cmpq %rbx, %rdi
je LBB0_2
## BB#1:
callq _free
LBB0_2: ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
addq $64, %rsp
popq %rbx
ret
instead of:
__Z4testv: ## @_Z4testv
## BB#0:
pushq %rbx
subq $64, %rsp
xorl %eax, %eax
leaq (%rsp), %rbx
addq $32, %rbx
movq %rbx, (%rsp)
movq %rbx, 8(%rsp)
leaq 64(%rsp), %rcx
movq %rcx, 16(%rsp)
je LBB0_2
## BB#1:
movl $1, 32(%rsp)
movq %rbx, %rax
LBB0_2: ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
addq $4, %rax
movq %rax, 8(%rsp)
leaq (%rsp), %rdi
callq __Z1gRN4llvm11SmallVectorIiLj8EEE
movq (%rsp), %rdi
cmpq %rbx, %rdi
je LBB0_4
## BB#3:
callq _free
LBB0_4: ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
addq $64, %rsp
popq %rbx
ret
This doesn't shrink clang noticably though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150944 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 00:42:49 +00:00
Chandler Carruth
637f949a7f
Switch to a more idiomatic way of silencing unused variable warnings in
...
release builds. Silences clang's -Wself-assign.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150942 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 00:02:49 +00:00
Chandler Carruth
cceb8f44a0
Move constructors out-of-line and flesh out their documentation. No
...
functionality changed. This is in preparation for some refactoring of
how this class behaves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150941 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 00:02:47 +00:00
Nick Lewycky
23ec5d7759
Move EvaluateFunction and EvaluateBlock into a class, and make the class store
...
the information that they pass around between them. No functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150939 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 23:26:27 +00:00
Benjamin Kramer
7db76e7ca3
Silence operator precedence warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150921 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 12:25:07 +00:00
NAKAMURA Takumi
273df0b910
autoconf/m4/visibility_inlines_hidden.m4: Tweak for cygwin-g++-4.5.3. It folded conftest regardress of attributge((noinline)) with >=O1 .
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150920 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 12:05:12 +00:00
Ahmed Charles
b0934ab7d8
Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 11:37:01 +00:00
Ahmed Charles
d7ace3f8d1
StringRef'ize EmitSourceFileHeader().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150917 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 11:35:20 +00:00
Craig Topper
1bf724b28b
Remove some unneeded includes and fix ordering in X86ISelLowering.cpp. Remove unneeded 'using namespace'.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150916 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 07:15:48 +00:00
Lang Hames
6aceab1392
Add machinery for pushing live ranges onto bundle starts while bundling.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150915 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 07:13:05 +00:00
Lang Hames
4a0b2d658a
Simplify moveEnteringDownFrom rules.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 06:13:56 +00:00
Craig Topper
dd637ae0c3
Unify all shuffle mask checking functions take a mask and VT instead of VectorShuffleSDNode.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 05:41:45 +00:00
Lang Hames
038d2d5ced
Skip through instructions rather than operands when looking for last use slot.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150912 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 04:38:25 +00:00
NAKAMURA Takumi
752b2f0d88
APFloat::toString(): Fix overrun at scanning.
...
FYI, clang/test/SemaTemplate/template-id-printing.cpp had been failing due to it on cygwin-clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150911 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 03:18:29 +00:00
Lang Hames
ac027144e8
Fix TODO and trailing whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150910 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 03:09:55 +00:00
Lang Hames
55fed62c9e
Defer sanity checks on live intervals until after all have been updated. Hold (LiveInterval, LiveRange) pairs to update, rather than vregs.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150909 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 03:00:30 +00:00
Craig Topper
5aaffa8470
Make a bunch of X86ISelLowering shuffle functions static now that they are no longer needed by isel.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150908 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 02:53:47 +00:00
Jia Liu
9ad012a29c
comment fix ARM.h
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150904 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 02:04:03 +00:00
Jia Liu
44de83a7f6
some comment fix for X86 and ARM
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 02:03:36 +00:00
Craig Topper
28a713b20a
Add vmfunc instruction to X86 assembler and disassembler.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150899 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 01:39:49 +00:00
Ahmed Charles
507329912a
Fix issue with bitwise and precedence.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150897 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 22:56:41 +00:00
Talin
1a4b19ef9b
Hashing.h - utilities for hashing various data types.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150890 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 21:00:49 +00:00
Rafael Espindola
b155c23f98
White space fixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150886 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 19:46:02 +00:00
Rafael Espindola
f3b32b3572
Temporarily disable this assert. Looks like it found a similar issue when
...
building bullet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150885 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 17:51:43 +00:00
Rafael Espindola
ef4c80e07b
Don't skip debug instructions when looking for the insertion point of
...
the cast. If we do, we can end up with
inst1
--------------- < Insertion point
dbg inst
new inst
instead of the desired
inst1
new inst
--------------- < Insertion point
dbg inst
Another option would be for InsertNoopCastOfTo (or its callers) to move the
insertion point and we would end up with
inst1
dbg inst
new inst
--------------- < Insertion point
but that complicates the callers. This fixes PR12018 (and firefox's build).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150884 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 17:22:58 +00:00
Jia Liu
31d157ae1a
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150878 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 12:03:15 +00:00
David Meyer
107506f814
On Cygwin/MingW, add SharedLibDir and LLVMToolDir to the library search path, since shared libraries are placed in 'bin'. (static libraries are still in 'lib').
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150876 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 10:03:19 +00:00
Craig Topper
a771330366
Add X86InstrSVM.td that I forgot to add in r150873.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150874 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 08:34:12 +00:00
Craig Topper
9e3d0b3351
Add X86 assembler and disassembler support for AMD SVM instructions. Original patch by Kay Tiong Khoo. Few tweaks by me for code density and to reduce replication.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 08:19:49 +00:00
Chandler Carruth
0a85771de8
Trivial cleanup to group the generic 'armvN' cases with the 'arm' case,
...
etc. No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150867 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 04:34:17 +00:00
Eli Friedman
2c3acb0e27
Fix a rather nasty regression from r150690: LHS != RHS does not imply LHS->stripPointerCasts() != RHS->stripPointerCasts().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150863 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 03:29:25 +00:00
Chad Rosier
5bfd969208
Fix documentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150860 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 01:38:41 +00:00
Eric Christopher
50627097b7
Testcase for the previous commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150852 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 00:05:45 +00:00
Lang Hames
ecb50624d1
Bring HMEditor into line with LLVM coding standards.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150851 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 23:43:40 +00:00
Eric Christopher
9b5d6b860c
Ignore the lifetime intrinsics in fast-isel.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 23:03:39 +00:00
Jakob Stoklund Olesen
0b923d9ee9
Don't print out pointer values in SUnit::dump().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150842 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 21:44:51 +00:00