- Jan 12, 2009
-
-
Dale Johannesen authored
compensation for turning off gcc's inliner. This gets us closer to the amount of inlining we were getting before. It is not a win on everything, of course, but seems to gain overall. llvm-svn: 62058
-
- Jan 11, 2009
-
-
Chris Lattner authored
not thrilled about 64-bit % in general, so rewrite to use * instead. llvm-svn: 62047
-
Chris Lattner authored
We should treat vectors as atomic types, not like arrays. llvm-svn: 62046
-
Chris Lattner authored
canonicalization transform based on duncan's comments: 1) improve the comment about %. 2) within our index loop make sure the offset stays within the *type size*, instead of within the *abi size*. This allows us to reason explicitly about landing in tail padding and means that issues like non-zero offsets into [0 x foo] types don't occur anymore. llvm-svn: 62045
-
- Jan 09, 2009
-
-
Chris Lattner authored
llvm-svn: 61997
-
Chris Lattner authored
llvm-svn: 61995
-
Misha Brukman authored
llvm-svn: 61991
-
rdar://6480391Chris Lattner authored
I noticed this in the code compiled for a routine using std::map, which produced this code: %25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly %.lobit.i = lshr i32 %25, 31 ; <i32> [#uses=1] %tmp.i = trunc i32 %.lobit.i to i8 ; <i8> [#uses=1] %toBool = icmp eq i8 %tmp.i, 0 ; <i1> [#uses=1] br i1 %toBool, label %bb3, label %bb4 which compiled to: call L_memcmp$stub shrl $31, %eax testb %al, %al jne LBB1_11 ## with this change, we compile it to: call L_memcmp$stub testl %eax, %eax js LBB1_11 This triggers all the time in common code, with patters like this: %169 = and i32 %ply, 1 ; <i32> [#uses=1] %170 = trunc i32 %169 to i8 ; <i8> [#uses=1] %toBool = icmp ne i8 %170, 0 ; <i1> [#uses=1] %7 = lshr i32 %6, 24 ; <i32> [#uses=1] %9 = trunc i32 %7 to i8 ; <i8> [#uses=1] %10 = icmp ne i8 %9, 0 ; <i1> [#uses=1] etc llvm-svn: 61985
-
Chris Lattner authored
llvm-svn: 61984
-
Chris Lattner authored
jump threading can have bugs, who knew? ;-) llvm-svn: 61983
-
Chris Lattner authored
llvm-svn: 61980
-
Chris Lattner authored
(which is constant time and cheap) before checking hasAllZeroIndices. llvm-svn: 61976
-
Dale Johannesen authored
llvm-svn: 61969
-
- Jan 08, 2009
-
-
Dale Johannesen authored
functions that don't already have a (dynamic) alloca. Dynamic allocas cause inefficient codegen and we shouldn't propagate this (behavior follows gcc). Two existing tests assumed such inlining would be done; they are hacked by adding an alloca in the caller, preserving the point of the tests. llvm-svn: 61946
-
Chris Lattner authored
loads from allocas that cover the entire aggregate. This handles some memcpy/byval cases that are produced by llvm-gcc. This triggers a few times in kc++ (with std::pair<std::_Rb_tree_const_iterator <kc::impl_abstract_phylum*>,bool>) and once in 176.gcc (with %struct..0anon). llvm-svn: 61915
-
- Jan 07, 2009
-
-
Duncan Sands authored
llvm-svn: 61879
-
Duncan Sands authored
was it not very helpful, it was also wrong! The problem is shown in the testcase: the alloca might be passed to a nocapture callee which dereferences it and returns the original pointer. But because it was a nocapture call we think we don't need to track its uses, but we do. llvm-svn: 61876
-
Duncan Sands authored
llvm-svn: 61873
-
Duncan Sands authored
llvm-svn: 61872
-
Duncan Sands authored
llvm-svn: 61870
-
Chris Lattner authored
integer to a (transitive) bitcast the alloca and if that integer has the full size of the alloca, then it clobbers the whole thing. Handle this by extracting pieces out of the stored integer and filing them away in the SROA'd elements. This triggers fairly frequently because the CFE uses integers to pass small structs by value and the inliner exposes these. For example, in kimwitu++, I see a bunch of these with i64 stores to "%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>" In 176.gcc I see a few i32 stores to "%struct..0anon". In the testcase, this is a difference between compiling test1 to: _test1: subl $12, %esp movl 20(%esp), %eax movl %eax, 4(%esp) movl 16(%esp), %eax movl %eax, (%esp) movl (%esp), %eax addl 4(%esp), %eax addl $12, %esp ret vs: _test1: movl 8(%esp), %eax addl 4(%esp), %eax ret The second half of this will be to handle loads of the same form. llvm-svn: 61853
-
Chris Lattner authored
llvm-svn: 61852
-
Chris Lattner authored
change. llvm-svn: 61851
-
Chris Lattner authored
requerying it all over the place. llvm-svn: 61850
-
Chris Lattner authored
code, no functionality change. llvm-svn: 61849
-
- Jan 06, 2009
-
-
Chris Lattner authored
as template arguments instead of as instance variables, exposing more optimization opportunities to the compiler earlier. llvm-svn: 61776
-
- Jan 05, 2009
-
-
Duncan Sands authored
global aliases. llvm-svn: 61754
-
Evan Cheng authored
llvm-svn: 61752
-
Duncan Sands authored
llvm-svn: 61745
-
Duncan Sands authored
llvm-svn: 61744
-
Duncan Sands authored
llvm-svn: 61743
-
Duncan Sands authored
In fact this also deletes those with linkonce linkage, however this is currently dead because for the moment aliases aren't allowed to have this linkage type. llvm-svn: 61742
-
Dan Gohman authored
llvm-svn: 61715
-
Nick Lewycky authored
Finalization occurs after all the FunctionPasses in the group have run, which is clearly not what we want. This also means that we have to make sure that we apply the right param attributes when creating a new function. Also, add a missed optimization: strdup and strndup. NoCapture and NoAlias return! llvm-svn: 61658
-
- Jan 04, 2009
-
-
Nick Lewycky authored
llvm-svn: 61632
-
Bill Wendling authored
llvm-svn: 61623
-
- Jan 03, 2009
-
-
Nick Lewycky authored
nocapture attributes to them. llvm-svn: 61610
-
- Jan 02, 2009
-
-
Duncan Sands authored
not have pointer type. In particular, it may be the condition argument for a select or a GEP index. While I was unable to construct a testcase for which some bits of the original pointer are captured due to one of these, it's very very close to being possible - so play safe and exclude these possibilities. llvm-svn: 61580
-
Duncan Sands authored
the argument to be stored to an alloca by tracking uses of the alloca. This occurs 4 times (out of 7121, 0.05%) in MultiSource/Applications, so may not be worth it. On the other hand, it is easy to do and fairly cheap. The functions it helps are: W_addcom and W_addlit in spiff; process_args (argv) in d (make_dparser); ercPixConcealIMB in JM/ldecod. llvm-svn: 61570
-
Duncan Sands authored
change. llvm-svn: 61569
-