- Feb 05, 2010
-
-
Bob Wilson authored
short-circuited conditions to AND/OR expressions, and those expressions are often converted back to a short-circuited form in code gen. The original source order may have been optimized to take advantage of the expected values, and if we reassociate them, we change the order and subvert that optimization. Radar 7497329. llvm-svn: 95333
-
- Feb 04, 2010
-
-
Jakob Stoklund Olesen authored
This makes the inliner about as agressive as it was before my changes to the inliner cost calculations. These levels give the same performance and slightly smaller code than before. llvm-svn: 95320
-
Eric Christopher authored
failure. llvm-svn: 95294
-
Eric Christopher authored
Fix bugs where we would compute out of bounds as in bounds, and where we couldn't know that the linker could override the size of an array. Add a few new testcases, change existing testcase to use a private global array instead of extern. llvm-svn: 95283
-
Eric Christopher authored
particular size, we just don't know what the length is yet. llvm-svn: 95266
-
- Feb 03, 2010
-
-
Bob Wilson authored
The SRThreshold value makes perfect sense for checking if an entire aggregate should be promoted to a scalar integer, but it is not so good for splitting an aggregate into its separate elements. A struct may contain a large embedded array along with some scalar fields that would benefit from being split apart by SROA. Even if the total aggregate size is large, it may still be good to perform SROA. Thus, the most important piece of this patch is simply moving the aggregate size comparison vs. SRThreshold so that it guards only the aggregate promotion. We have also been checking the number of elements to decide if an aggregate should be split up. The limit of "SRThreshold/4" seemed rather arbitrary, and I don't think it's very useful to derive this limit from SRThreshold anyway. I've collected some data showing that the current default limit of 32 (since SRThreshold defaults to 128) is a reasonable cutoff for struct types. One thing suggested by the data is that distinguishing between structs and arrays might be useful. There are (obviously) a lot more large arrays than large structs (as measured by the number of elements and not the total size -- a large array inside a struct still counts as a single element given the way we do SROA right now). Out of 8377 arrays where we successfully performed SROA while compiling a large set of benchmarks, only 16 of them had more than 8 elements. And, for those 16 arrays, it's not at all clear that SROA was actually beneficial. So, to offset the compile time cost of investigating more large structs for SROA, the patch lowers the limit on array elements to 8. This fixes Apple Radar 7563690. llvm-svn: 95224
-
Evan Cheng authored
llvm-svn: 95198
-
Bob Wilson authored
llvm-svn: 95170
-
Eric Christopher authored
llvm-svn: 95165
-
Eric Christopher authored
llvm-svn: 95154
-
- Feb 02, 2010
-
-
Eric Christopher authored
llvm-svn: 95147
-
Eric Christopher authored
Passed bootstrap and nightly test run here. llvm-svn: 95145
-
Chris Lattner authored
for vectors. Codegen is generating awful code or segfaulting in various cases (e.g. PR6204). llvm-svn: 95058
-
Chris Lattner authored
llvm-svn: 95055
-
Dan Gohman authored
when the cast is extending. llvm-svn: 95046
-
Eric Christopher authored
don't use TargetData here. llvm-svn: 95040
-
Eric Christopher authored
llvm-svn: 95036
-
Eric Christopher authored
llvm-svn: 95035
-
Eric Christopher authored
llvm-svn: 95027
-
- Feb 01, 2010
-
-
Bob Wilson authored
disabled by default. This divides the existing load PRE code into 2 phases: first it checks that it is safe to move the load to each of the predecessors where it is unavailable, and then if it is safe, the code is changed to move the load. Radar 7571861. llvm-svn: 95007
-
Chris Lattner authored
llvm-svn: 94995
-
rdar://7590304Chris Lattner authored
of objc message send was getting marked arm_apcscc, but the prototype isn't. This is fine at runtime because objcmsgsend is implemented in assembly. Only turn a mismatched caller and callee into 'unreachable' if the callee is a definition. llvm-svn: 94986
-
rdar://7590304Chris Lattner authored
case, instcombine can't zap the invoke for fear of changing the CFG. However, we have to do something to prevent the next iteration of instcombine from inserting another store -> undef before the invoke thereby getting into infinite iteration between dead store elim and store insertion. Just zap the callee to null, which will prevent the next iteration from doing anything. llvm-svn: 94985
-
Bob Wilson authored
The testcase from pr6198 does not crash for me -- I don't know what's up with that -- so I'm not adding it to the tests. llvm-svn: 94984
-
- Jan 31, 2010
-
-
Eli Friedman authored
llvm-svn: 94943
-
Eli Friedman authored
use and X is free to negate. llvm-svn: 94941
-
Evan Cheng authored
Do not mark no-return calls tail calls. It'll screw up special calls like longjmp and it doesn't make much sense for performance reason. If my logic is faulty, please let me know. llvm-svn: 94937
-
- Jan 30, 2010
-
-
Bob Wilson authored
unconditionally. Besides checking the offset, also check that the underlying object is aligned as much as the load itself. llvm-svn: 94875
-
Bob Wilson authored
llvm-svn: 94863
-
Jakob Stoklund Olesen authored
This bug was exposed by my inliner cost changes in r94615, and caused failures of lencod on most architectures when building with LTO. This patch fixes lencod and 464.h264ref on x86-64 (and likely others). llvm-svn: 94858
-
- Jan 29, 2010
-
-
Bob Wilson authored
create a testcase where this matters. The select+load transformation only occurs when isSafeToLoadUnconditionally is true, and in those situations, instcombine also changes the underlying objects to be aligned. This seems like a good idea regardless, and I've verified that it doesn't pessimize the subsequent realignment. llvm-svn: 94850
-
Eric Christopher authored
llvm-svn: 94841
-
Bob Wilson authored
llvm-svn: 94835
-
Bob Wilson authored
indices are safe if the result is known to be within the bounds of the underlying object. llvm-svn: 94829
-
Duncan Sands authored
(via APInt &RHSKnownZero = KnownZero, etc) seems dangerous and confusing to me: it is easy not to notice this, and then wonder why KnownZero/RHSKnownZero changed underneath you when you modified RHSKnownZero/KnownZero etc. So get rid of this. No intended functionality change (tested with "make check" + llvm-gcc bootstrap). llvm-svn: 94802
-
Eric Christopher authored
llvm-svn: 94783
-
Eric Christopher authored
lowering. We'll either figure it out, or not and be lowered by SelectionDAGBuild. Add test. llvm-svn: 94775
-
Bill Wendling authored
llvm-svn: 94771
-
Bill Wendling authored
llvm-svn: 94765
-
Victor Hernandez authored
llvm-svn: 94763
-