- Jan 29, 2013
-
-
Hal Finkel authored
Because BBVectorize may significantly shorten a loop body, unroll again after vectorization. This is especially important when using runtime or partial unrolling. llvm-svn: 173730
-
- Jan 28, 2013
-
-
Renato Golin authored
llvm-svn: 173691
-
Evgeniy Stepanov authored
It is way too slow. Change the default option value to 0. Always do exact shadow propagation for unsigned ICmp with constants, it is cheap (under 1% cpu time) and required for correctness. llvm-svn: 173682
-
Evgeniy Stepanov authored
Broken tests. llvm-svn: 173679
-
Evgeniy Stepanov authored
50% slowdown on one of the specs. llvm-svn: 173678
-
Michael Gottesman authored
Created ObjCARCUtil.cpp for functions which in my humble opinion are too large to static inline and place in a header file such as ObjCARC.h. llvm-svn: 173666
-
Michael Gottesman authored
llvm-svn: 173663
-
Michael Gottesman authored
llvm-svn: 173662
-
Michael Gottesman authored
llvm-svn: 173654
-
Michael Gottesman authored
llvm-svn: 173653
-
Michael Gottesman authored
llvm-svn: 173652
-
Michael Gottesman authored
I also added the local header ObjCARC.h for common functions used by the various passes. llvm-svn: 173651
-
Michael Gottesman authored
Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. llvm-svn: 173647
-
- Jan 27, 2013
-
-
Hal Finkel authored
When flipping the pair of subvectors that form a vector, if the vector length is 2, we can use the SK_Reverse shuffle kind to get more-accurate cost information. Also we can use the SK_ExtractSubvector shuffle kind to get accurate subvector extraction costs. The current cost model implementations don't yet seem complex enough for this to make a difference (thus, there are no test cases with this commit), but it should help in future. Depending on how the various targets optimize and combine shuffles in practice, we might be able to get more-accurate costs by combining the costs of multiple shuffle kinds. For example, the cost of flipping the subvector pairs could be modeled as two extractions and two subvector insertions. These changes, however, should probably be motivated by specific test cases. llvm-svn: 173621
-
Chandler Carruth authored
out bug fixes, or functionality preserving refactorings. llvm-svn: 173610
-
Michael Gottesman authored
This name change does the following: 1. Causes the function name to use proper ARC terminology. 2. Makes it clear what the function truly does. llvm-svn: 173609
-
Bill Wendling authored
In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173602
-
Bill Wendling authored
In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173601
-
Bill Wendling authored
In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173600
-
- Jan 26, 2013
-
-
Hal Finkel authored
llvm-svn: 173580
-
Hal Finkel authored
llvm-svn: 173579
-
Bill Wendling authored
llvm-svn: 173536
-
Bill Wendling authored
The 'getSlot' function and its ilk allow introspection into the AttributeSet class. However, that class should be opaque. Allow access through accessor methods instead. llvm-svn: 173522
-
- Jan 25, 2013
-
-
Nadav Rotem authored
llvm-svn: 173500
-
Bill Wendling authored
llvm-svn: 173499
-
Benjamin Kramer authored
llvm-svn: 173475
-
Pedro Artigas authored
created InternalizePass (useful for pass reuse) llvm-svn: 173474
-
Nadav Rotem authored
llvm-svn: 173471
-
Nadav Rotem authored
llvm-svn: 173467
-
Evgeniy Stepanov authored
llvm-svn: 173453
-
Evgeniy Stepanov authored
Only for integers, pointers, and vectors of those. No floats. Instrumentation seems very heavy, and may need to be replaced with some approximation in the future. llvm-svn: 173452
-
Chandler Carruth authored
loops over instructions in the basic block or the use-def list of the value, neither of which are really efficient when repeatedly querying about values in the same basic block. What's more, we already know that the CondBB is small, and so we can do a much more efficient test by counting the uses in CondBB, and seeing if those account for all of the uses. Finally, we shouldn't blanket fail on any such instruction, instead we should conservatively assume that those instructions are part of the cost. Note that this actually fixes a bug in the pass because isUsedInBasicBlock has a really terrible bug in it. I'll fix that in my next commit, but the fix for it would make this code suddenly take the compile time hit I thought it already was taking, so I wanted to go ahead and migrate this code to a faster & better pattern. The bug in isUsedInBasicBlock was also causing other tests to test the wrong thing entirely: for example we weren't actually disabling speculation for floating point operations as intended (and tested), but the test passed because we failed to speculate them due to the isUsedInBasicBlock failure. llvm-svn: 173417
-
- Jan 24, 2013
-
-
Michael Gottesman authored
Added comment to ObjCARC elaborating what is meant by the term 'Provenance' in 'Provenance Analysis'. llvm-svn: 173374
-
Benjamin Kramer authored
Original commit message: Plug TTI into the speculation logic, giving it a real cost interface that can be specialized by targets. The goal here is not to be more aggressive, but to just be more accurate with very obvious cases. There are instructions which are known to be truly free and which were not being modeled as such in this code -- see the regression test which is distilled from an inner loop of zlib. Everywhere the TTI cost model is insufficiently conservative I've added explicit checks with FIXME comments to go add proper modelling of these cost factors. If this causes regressions, the likely solution is to make TTI even more conservative in its cost estimates, but test cases will help here. llvm-svn: 173357
-
Chandler Carruth authored
of stage2 in a bootstrap. Still investigating.... llvm-svn: 173343
-
Chandler Carruth authored
that can be specialized by targets. The goal here is not to be more aggressive, but to just be more accurate with very obvious cases. There are instructions which are known to be truly free and which were not being modeled as such in this code -- see the regression test which is distilled from an inner loop of zlib. Everywhere the TTI cost model is insufficiently conservative I've added explicit checks with FIXME comments to go add proper modelling of these cost factors. If this causes regressions, the likely solution is to make TTI even more conservative in its cost estimates, but test cases will help here. llvm-svn: 173342
-
Chandler Carruth authored
unfolded constant expressions rather than checking each one independently. llvm-svn: 173341
-
Chandler Carruth authored
a cost fuction that seems both a bit ad-hoc and also poorly suited to evaluating constant expressions. Notably, it is missing any support for trivial expressions such as 'inttoptr'. I could fix this routine, but it isn't clear to me all of the constraints its other users are operating under. The core protection that seems relevant here is avoiding the formation of a select instruction wich a further chain of select operations in a constant expression operand. Just explicitly encode that constraint. Also, update the comments and organization here to make it clear where this needs to go -- this should be driven off of real cost measurements which take into account the number of constants expressions and the depth of the constant expression tree. llvm-svn: 173340
-
Chandler Carruth authored
terms of cost rather than hoisting a single instruction. This does *not* change the cost model! We still set the cost threshold at 1 here, it's just that we track it by accumulating cost rather than by storing an instruction. The primary advantage is that we no longer leave no-op intrinsics in the basic block. For example, this will now move both debug info intrinsics and a single instruction, instead of only moving the instruction and leaving a basic block with nothing bug debug info intrinsics in it, and those intrinsics now no longer ordered correctly with the hoisted value. Instead, we now splice the entire conditional basic block's instruction sequence. This also places the code for checking the safety of hoisting next to the code computing the cost. Currently, the only observable side-effect of this change is that debug info intrinsics are no longer abandoned. I'm not sure how to craft a test case for this, and my real goal was the refactoring, but I'll talk to Dave or Eric about how to add a test case for this. llvm-svn: 173339
-
Kostya Serebryany authored
llvm-svn: 173338
-