- Apr 23, 2013
-
-
Eric Christopher authored
or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
-
- Apr 22, 2013
-
-
Anat Shemer authored
Changed back (relative to commit 179786) the operations executed when extract(cast) is transformed to cast(extract). It uses the Builder class as before. In addition the result node is added to the Worklist, so all the previous extract users will become the new scalar cast users. llvm-svn: 180045
-
Rafael Espindola authored
Also add a check for llvm.used in the verifier and simplify clients now that they can assume they have a ConstantArray. llvm-svn: 180019
-
- Apr 21, 2013
-
-
Benjamin Kramer authored
This is an edge case that can happen if we modify a chain of multiple selects. Update all operands in that case and remove the assert. PR15805. llvm-svn: 179982
-
Arnold Schwaighofer authored
There is the temptation to make this tranform dependent on target information as it is not going to be beneficial on all (sub)targets. Therefore, we should probably do this in MI Early-Ifconversion. This reverts commit r179957. Original commit message: "SimplifyCFG: If convert single conditional stores This transformation will transform a conditional store with a preceeding uncondtional store to the same location: a[i] = may-alias with a[i] load if (cond) a[i] = Y into an unconditional store. a[i] = X may-alias with a[i] load tmp = cond ? Y : X; a[i] = tmp We assume that on average the cost of a mispredicted branch is going to be higher than the cost of a second store to the same location, and that the secondary benefits of creating a bigger basic block for other optimizations to work on outway the potential case were the branch would be correctly predicted and the cost of the executing the second store would be noticably reflected in performance. hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With this change we are on par with gcc's performance (gcc also performs this transformation). There was a 1.2 % performance improvement on a ARM swift chip. Other tests in the test-suite+external seem to be mostly uninfluenced in my experiments: This optimization was triggered on 41 tests such that the executable was different before/after the patch. Only 1 out of the 40 tests (dealII) was reproducable below 100% (by about .4%). Given that hmmer benefits so much I believe this to be a fair trade off. I am going to watch performance numbers across the builtbots and will revert this if anything unexpected comes up." llvm-svn: 179980
-
Nadav Rotem authored
llvm-svn: 179975
-
Nadav Rotem authored
We did not terminate the switch case and we executed the search routine twice. llvm-svn: 179974
-
Michael Gottesman authored
When we strength reduce an objc_retainBlock call to objc_retain, increment NumPeeps and make sure that Changed is set to true. llvm-svn: 179968
-
Michael Gottesman authored
llvm-svn: 179967
-
Michael Gottesman authored
llvm-svn: 179966
-
Michael Gottesman authored
llvm-svn: 179965
-
Michael Gottesman authored
[objc-arc] Refactored OptimizeReturns so that it uses continue instead of a large multi-level nested if statement. llvm-svn: 179964
-
Michael Gottesman authored
This will make it clearer when we are actually resetting a sequence's progress vs just changing state. This is an important distinction because the former case clears any pointers that we are tracking while the later does not. llvm-svn: 179963
-
Nadav Rotem authored
llvm-svn: 179960
-
- Apr 20, 2013
-
-
Arnold Schwaighofer authored
This transformation will transform a conditional store with a preceeding uncondtional store to the same location: a[i] = may-alias with a[i] load if (cond) a[i] = Y into an unconditional store. a[i] = X may-alias with a[i] load tmp = cond ? Y : X; a[i] = tmp We assume that on average the cost of a mispredicted branch is going to be higher than the cost of a second store to the same location, and that the secondary benefits of creating a bigger basic block for other optimizations to work on outway the potential case were the branch would be correctly predicted and the cost of the executing the second store would be noticably reflected in performance. hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With this change we are on par with gcc's performance (gcc also performs this transformation). There was a 1.2 % performance improvement on a ARM swift chip. Other tests in the test-suite+external seem to be mostly uninfluenced in my experiments: This optimization was triggered on 41 tests such that the executable was different before/after the patch. Only 1 out of the 40 tests (dealII) was reproducable below 100% (by about .4%). Given that hmmer benefits so much I believe this to be a fair trade off. I am going to watch performance numbers across the builtbots and will revert this if anything unexpected comes up. llvm-svn: 179957
-
Benjamin Kramer authored
llvm-svn: 179936
-
Benjamin Kramer authored
Avoids a couple of copies and allows more flexibility in the clients. llvm-svn: 179935
-
Nadav Rotem authored
SLPVectorizer: Reduce the compile time by eliminating the search for some of the more expensive patterns. After this change will only check basic arithmetic trees that start at cmpinstr. llvm-svn: 179933
-
Nadav Rotem authored
llvm-svn: 179932
-
Nadav Rotem authored
llvm-svn: 179931
-
Nadav Rotem authored
llvm-svn: 179930
-
Nadav Rotem authored
llvm-svn: 179929
-
Nadav Rotem authored
llvm-svn: 179928
-
Nadav Rotem authored
llvm-svn: 179927
-
Benjamin Kramer authored
The logic that actually compares the types considers pointers and integers the same if they are of the same size. This created a strange mismatch between hash and reality and made the test case for this fail on some platforms (yay, test cases). llvm-svn: 179905
-
- Apr 19, 2013
-
-
Arnold Schwaighofer authored
Also make some static function class functions to avoid having to mention the class namespace for enums all the time. No functionality change intended. llvm-svn: 179886
-
Jakub Staszak authored
llvm-svn: 179826
-
Bill Wendling authored
If the return type is a pointer and the call returns an integer, then do the inttoptr convertions. And vice versa. llvm-svn: 179817
-
- Apr 18, 2013
-
-
Dmitri Gribenko authored
llvm-svn: 179789
-
Anat Shemer authored
In the function InstCombiner::visitExtractElementInst() removed the limitation that extract is promoted over a cast only if the cast has only one use. llvm-svn: 179786
-
Anat Shemer authored
Added a function scalarizePHI() that sclarizes a vector phi instruction if it has only 2 uses: one to promote the vector phi in a loop and the other use is an extract operation of one element at a constant location. llvm-svn: 179783
-
Chris Lattner authored
llvm-svn: 179775
-
Arnold Schwaighofer authored
A min/max operation is represented by a select(cmp(lt/le/gt/ge, X, Y), X, Y) sequence in LLVM. If we see such a sequence we can treat it just as any other commutative binary instruction and reduce it. This appears to help bzip2 by about 1.5% on an imac12,2. radar://12960601 llvm-svn: 179773
-
Benjamin Kramer authored
Fixes PR15748. llvm-svn: 179757
-
David Majnemer authored
It is causing stage2 builds to fail, let's get them running again. llvm-svn: 179750
-
David Majnemer authored
Simplify: (select (icmp eq (and X, C1), 0), Y, (or Y, C2)) Into: (or (shl (and X, C1), C3), y) Where: C3 = Log(C2) - Log(C1) If: C1 and C2 are both powers of two llvm-svn: 179748
-
Michael Gottesman authored
[objc-arc] Do not mismatch up retains inside a for loop with releases outside said for loop in the presense of differing provenance caused by escaping blocks. This occurs due to an alloca representing a separate ownership from the original pointer. Thus consider the following pseudo-IR: objc_retain(%a) for (...) { objc_retain(%a) %block <- %a F(%block) objc_release(%block) } objc_release(%a) From the perspective of the optimizer, the %block is a separate provenance from the original %a. Thus the optimizer pairs up the inner retain for %a and the outer release from %a, resulting in segfaults. This is fixed by noting that the signature of a mismatch of retain/releases inside the for loop is a Use/CanRelease top down with an None bottom up (since bottom up the Retain-CanRelease-Use-Release sequence is completed by the inner objc_retain, but top down due to the differing provenance from the objc_release said sequence is not completed). In said case in CheckForCFGHazards, we now clear the state of %a implying that no pairing will occur. Additionally a test case is included. rdar://12969722 llvm-svn: 179747
-
Michael Gottesman authored
llvm-svn: 179746
-
- Apr 17, 2013
-
-
Michael Gottesman authored
llvm-svn: 179729
-
Michael Gottesman authored
llvm-svn: 179721
-