Commit Graph

122562 Commits

Author SHA1 Message Date
Benjamin Kramer 7adb189538 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 7746eb62fb 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
Aaron Ballman 232c4f50ba Fixing the working-directory option so that it stores the proper directory.
llvm-svn: 150960
2012-02-20 14:13:25 +00:00
Tobias Grosser e550fa2f95 www: Fix french special characters
llvm-svn: 150959
2012-02-20 14:03:56 +00:00
Dylan Noblesmith c95d81924d Basic: import IntrusiveRefCntPtr<> into clang namespace
The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.

llvm-svn: 150958
2012-02-20 14:00:23 +00:00
James Molloy 862fe49c55 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 547d4c0662 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
Tobias Grosser be3df7b3ee Add information, that Polly became a real LLVM project
llvm-svn: 150955
2012-02-20 08:41:55 +00:00
Tobias Grosser 7cde0845b5 www: Update links polly.grosser.es -> polly.llvm.org
llvm-svn: 150954
2012-02-20 08:41:51 +00:00
Tobias Grosser 92f5480f04 ScheduleOpt: Add option to bound scheduling coefficients of dimensions.
llvm-svn: 150953
2012-02-20 08:41:47 +00:00
Tobias Grosser 6b675e3108 Update isl
This version of isl, contains some recently committed scheduler patches.

llvm-svn: 150952
2012-02-20 08:41:44 +00:00
Tobias Grosser 4d63b9d0f9 ScheduleOptimizer: Dump the calculated schedule in debug mode
llvm-svn: 150951
2012-02-20 08:41:21 +00:00
Tobias Grosser 992e60ca57 ScheduleOpt: Add option to bound constant term coefficients
llvm-svn: 150950
2012-02-20 08:41:15 +00:00
Evan Cheng d0c02966d2 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
Chandler Carruth a2a5410e6d Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ to
match the behavior of GCC. Also add a test for these intrinsics, which
apparently have *zero* tests. =[ Not surprisingly, Clang crashed when
compiling these.

Fix the bug in CodeGen where we failed to bitcast the argument type to
x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the
new 3dnow-builtins.c test.

This is one issue impacting the efforts to get Clang to emulate the
Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made
available there.

llvm-svn: 150948
2012-02-20 07:35:45 +00:00
Nick Lewycky 60829a587a Rename class Evaluate to Evaluator and put it in an anonymous namespace.
llvm-svn: 150947
2012-02-20 03:25:59 +00:00
Peter Collingbourne bcd9a7d0e0 Test web page update.
llvm-svn: 150946
2012-02-20 01:32:12 +00:00
Chris Lattner 445d8c6b50 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
Benjamin Kramer 2325b24c73 ObjCMessageExpr: Don't leave SelLocsKind uninitialized when the send is implicit.
Fixes PR11929. Found by valgrind.

llvm-svn: 150943
2012-02-20 00:20:48 +00:00
Chandler Carruth 3bb7d41a35 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 0d887dd0b9 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
Benjamin Kramer 807c2dba60 Set the location of the template keyword when allocating a new TemplateIdAnnotation.
Found by valgrind.

llvm-svn: 150940
2012-02-19 23:37:39 +00:00
Nick Lewycky 73be5e31a6 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
Chandler Carruth 4fc5fcd121 Make the regular expressions in this test more narrow to ensure we're
actually matching the write substrings, and stop looking for a leading
'/' to try and finish fixing darwin and other hosts.

llvm-svn: 150938
2012-02-19 23:09:50 +00:00
Fariborz Jahanian 2b383d21dc objective-c modern translator: comment out private ivars
declared in class extension and implementation.

llvm-svn: 150937
2012-02-19 19:00:05 +00:00
Gregory Szorc 8428c242b8 [clang.py] Implement Type.is_function_variadic
llvm-svn: 150936
2012-02-19 18:28:33 +00:00
Jeffrey Yasskin 1c075b8934 Add myself to the CREDITS file.
llvm-svn: 150935
2012-02-19 18:22:03 +00:00
Sebastian Redl 73cfbebed4 Emit a warning when list-initializing a std::initializer_list member.
llvm-svn: 150933
2012-02-19 16:31:05 +00:00
Benjamin Kramer 8558da1930 Harden test against for operator new(unsigned int).
llvm-svn: 150932
2012-02-19 16:20:58 +00:00
Sebastian Redl d026dc499c Make heap-allocation of std::initializer_list 'work'.
llvm-svn: 150931
2012-02-19 16:03:09 +00:00
Sebastian Redl 4e04dd1979 Make std::initializer_list member initializers 'work'.
llvm-svn: 150930
2012-02-19 15:41:54 +00:00
Howard Hinnant 7c24d8e70b Initialize all the fields of struct tm before passing it to strftime. One of the uninitialized fields, probably the pointer field tm_zone, was causing a segfault on linux. Patch contributed by Jeffrey Yasskin.
llvm-svn: 150929
2012-02-19 14:55:32 +00:00
Sebastian Redl e6c32e6293 Refuse to compile global std::initializer_lists instead of doing completely the wrong thing.
llvm-svn: 150928
2012-02-19 14:53:49 +00:00
Howard Hinnant 08487f51b7 Relax pointer output test to accept glibc's output. Patch supplied by Jeffrey Yasskin.
llvm-svn: 150927
2012-02-19 14:51:01 +00:00
Sebastian Redl 8eb351d72e Get recursive initializer lists to work and add a test. Codegen of std::initializer_list is now complete. Onward to array new.
llvm-svn: 150926
2012-02-19 12:28:02 +00:00
Sebastian Redl 99f6616470 Add a testcase for using objects with list-constructors, and fix a Sema crash by repeating an old hack.
llvm-svn: 150925
2012-02-19 12:27:56 +00:00
Sebastian Redl 1d197174a2 Add a testcase to show that temporaries from the initializer list are destroyed correctly.
llvm-svn: 150924
2012-02-19 12:27:51 +00:00
Sebastian Redl ca89d6841a Add a testcase for start+end implementations of std::initializer_list.
llvm-svn: 150923
2012-02-19 12:27:47 +00:00
Sebastian Redl 4f28b58b7b Fix a crash for nested initializer list initialization. Still does the wrong thing in CodeGen, in that it never destructs anything.
llvm-svn: 150922
2012-02-19 12:27:43 +00:00
Benjamin Kramer c84ded88ea Silence operator precedence warning.
llvm-svn: 150921
2012-02-19 12:25:07 +00:00
NAKAMURA Takumi 652e0139da 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 289896d2f3 Remove dead code.
llvm-svn: 150919
2012-02-19 11:57:29 +00:00
Ahmed Charles 636a3d618c Remove dead code. Improve llvm_unreachable text. Simplify some control flow.
llvm-svn: 150918
2012-02-19 11:37:01 +00:00
Ahmed Charles a4704ab080 StringRef'ize EmitSourceFileHeader().
llvm-svn: 150917
2012-02-19 11:35:20 +00:00
Craig Topper de121a1000 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 13b11527d8 Add machinery for pushing live ranges onto bundle starts while bundling.
llvm-svn: 150915
2012-02-19 07:13:05 +00:00
Lang Hames 8140e84757 Simplify moveEnteringDownFrom rules.
llvm-svn: 150914
2012-02-19 06:13:56 +00:00
Craig Topper 65a4ceea1e 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 ed7f1f0b08 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 5adeb93d8a 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