Benjamin Kramer
0dac66d9a2
InstCombine: Removing the base from the address calculation is only safe when the GEPs are inbounds.
...
llvm-svn: 150978
2012-02-20 18:45:10 +00:00
Eric Christopher
742c530fa0
Make this a bit prettier and more obvious when a derived type isn't
...
derived from anything.
llvm-svn: 150975
2012-02-20 18:04:39 +00:00
Eric Christopher
69a0eb9258
If a derived type is also a composite type, print that information
...
too.
llvm-svn: 150974
2012-02-20 18:04:35 +00:00
Eric Christopher
ed41b1f1ef
Add support for runtime languages on our forward declarations.
...
llvm-svn: 150973
2012-02-20 18:04:14 +00:00
Benjamin Kramer
9ade8e4d79
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.
llvm-svn: 150962
2012-02-20 15:07:47 +00:00
Benjamin Kramer
3d87f26b44
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".
llvm-svn: 150961
2012-02-20 14:34:57 +00:00
James Molloy
9963b8be92
Teach the DAGCombiner that certain loadext nodes followed by ANDs can be converted to zeroexts.
...
llvm-svn: 150957
2012-02-20 12:02:38 +00:00
James Molloy
6cbdd131b3
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.
llvm-svn: 150956
2012-02-20 09:24:05 +00:00
Evan Cheng
499c67989a
Make post-ra tail duplication bundle safe. No test case as recent codegen
...
flow changes have already hidden the bug. rdar://10893812
llvm-svn: 150949
2012-02-20 07:51:58 +00:00
Nick Lewycky
a87b6c7974
Rename class Evaluate to Evaluator and put it in an anonymous namespace.
...
llvm-svn: 150947
2012-02-20 03:25:59 +00:00
Chris Lattner
50ad7c3f54
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.
llvm-svn: 150944
2012-02-20 00:42:49 +00:00
Chandler Carruth
d4b1931dd9
Switch to a more idiomatic way of silencing unused variable warnings in
...
release builds. Silences clang's -Wself-assign.
llvm-svn: 150942
2012-02-20 00:02:49 +00:00
Chandler Carruth
132aecc08e
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.
llvm-svn: 150941
2012-02-20 00:02:47 +00:00
Nick Lewycky
c7e2bbf39f
Move EvaluateFunction and EvaluateBlock into a class, and make the class store
...
the information that they pass around between them. No functionality change!
llvm-svn: 150939
2012-02-19 23:26:27 +00:00
Benjamin Kramer
576a9ea6ca
Silence operator precedence warning.
...
llvm-svn: 150921
2012-02-19 12:25:07 +00:00
NAKAMURA Takumi
a1af545555
autoconf/m4/visibility_inlines_hidden.m4: Tweak for cygwin-g++-4.5.3. It folded conftest regardress of attributge((noinline)) with >=O1 .
...
llvm-svn: 150920
2012-02-19 12:05:12 +00:00
Ahmed Charles
745c53c2a7
Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
...
llvm-svn: 150918
2012-02-19 11:37:01 +00:00
Ahmed Charles
6e49e54bbb
StringRef'ize EmitSourceFileHeader().
...
llvm-svn: 150917
2012-02-19 11:35:20 +00:00
Craig Topper
da569ead22
Remove some unneeded includes and fix ordering in X86ISelLowering.cpp. Remove unneeded 'using namespace'.
...
llvm-svn: 150916
2012-02-19 07:15:48 +00:00
Lang Hames
88e5e4d72e
Add machinery for pushing live ranges onto bundle starts while bundling.
...
llvm-svn: 150915
2012-02-19 07:13:05 +00:00
Lang Hames
bdb4efcb20
Simplify moveEnteringDownFrom rules.
...
llvm-svn: 150914
2012-02-19 06:13:56 +00:00
Craig Topper
c35afe3434
Unify all shuffle mask checking functions take a mask and VT instead of VectorShuffleSDNode.
...
llvm-svn: 150913
2012-02-19 05:41:45 +00:00
Lang Hames
831e129c9d
Skip through instructions rather than operands when looking for last use slot.
...
llvm-svn: 150912
2012-02-19 04:38:25 +00:00
NAKAMURA Takumi
4518369791
APFloat::toString(): Fix overrun at scanning.
...
FYI, clang/test/SemaTemplate/template-id-printing.cpp had been failing due to it on cygwin-clang.
llvm-svn: 150911
2012-02-19 03:18:29 +00:00
Lang Hames
8b2e08187a
Fix TODO and trailing whitespace.
...
llvm-svn: 150910
2012-02-19 03:09:55 +00:00
Lang Hames
b946cb5e75
Defer sanity checks on live intervals until after all have been updated. Hold (LiveInterval, LiveRange) pairs to update, rather than vregs.
...
llvm-svn: 150909
2012-02-19 03:00:30 +00:00
Craig Topper
7582570aff
Make a bunch of X86ISelLowering shuffle functions static now that they are no longer needed by isel.
...
llvm-svn: 150908
2012-02-19 02:53:47 +00:00
Jia Liu
e9bdee01e7
comment fix ARM.h
...
llvm-svn: 150904
2012-02-19 02:04:03 +00:00
Jia Liu
6bb2f0f0e4
some comment fix for X86 and ARM
...
llvm-svn: 150902
2012-02-19 02:03:36 +00:00
Craig Topper
cfbfa3dcd1
Add vmfunc instruction to X86 assembler and disassembler.
...
llvm-svn: 150899
2012-02-19 01:39:49 +00:00
Ahmed Charles
b1856af87c
Fix issue with bitwise and precedence.
...
llvm-svn: 150897
2012-02-18 22:56:41 +00:00
Talin
777c85d862
Hashing.h - utilities for hashing various data types.
...
llvm-svn: 150890
2012-02-18 21:00:49 +00:00
Rafael Espindola
6be26e6aa6
White space fixes.
...
llvm-svn: 150886
2012-02-18 19:46:02 +00:00
Rafael Espindola
64fe8ada6e
Temporarily disable this assert. Looks like it found a similar issue when
...
building bullet.
llvm-svn: 150885
2012-02-18 17:51:43 +00:00
Rafael Espindola
5154b9bedb
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).
llvm-svn: 150884
2012-02-18 17:22:58 +00:00
Jia Liu
b077b6085d
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.
...
llvm-svn: 150878
2012-02-18 12:03:15 +00:00
David Meyer
7499ae53ca
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').
...
llvm-svn: 150876
2012-02-18 10:03:19 +00:00
Craig Topper
e42fa08789
Add X86InstrSVM.td that I forgot to add in r150873.
...
llvm-svn: 150874
2012-02-18 08:34:12 +00:00
Craig Topper
ecf21d8132
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.
...
llvm-svn: 150873
2012-02-18 08:19:49 +00:00
Chandler Carruth
6f19135606
Trivial cleanup to group the generic 'armvN' cases with the 'arm' case,
...
etc. No functionality changed.
llvm-svn: 150867
2012-02-18 04:34:17 +00:00
Eli Friedman
be89455c98
Fix a rather nasty regression from r150690: LHS != RHS does not imply LHS->stripPointerCasts() != RHS->stripPointerCasts().
...
llvm-svn: 150863
2012-02-18 03:29:25 +00:00
Chad Rosier
617f581b49
Fix documentation.
...
llvm-svn: 150860
2012-02-18 01:38:41 +00:00
Eric Christopher
c2e76f573d
Testcase for the previous commit.
...
llvm-svn: 150852
2012-02-18 00:05:45 +00:00
Lang Hames
095e9964bd
Bring HMEditor into line with LLVM coding standards.
...
llvm-svn: 150851
2012-02-17 23:43:40 +00:00
Eric Christopher
325985565a
Ignore the lifetime intrinsics in fast-isel.
...
llvm-svn: 150848
2012-02-17 23:03:39 +00:00
Jakob Stoklund Olesen
4aa0e7c7c4
Don't print out pointer values in SUnit::dump().
...
llvm-svn: 150842
2012-02-17 21:44:51 +00:00
Matt Beaumont-Gay
a45b6e23d0
Sink variable into assert
...
llvm-svn: 150841
2012-02-17 21:40:48 +00:00
Lang Hames
27171ecf20
Add support for regmask slots to HMEditor. Also fixes a comment error.
...
llvm-svn: 150840
2012-02-17 21:29:41 +00:00
Kevin Enderby
36596f0ae8
Fix typo in comment ldopen() -> dlopen().
...
llvm-svn: 150836
2012-02-17 19:26:00 +00:00
Jakob Stoklund Olesen
c22a5531d8
Handle regmask operands in ARMInstrInfo.
...
llvm-svn: 150833
2012-02-17 19:23:15 +00:00