#
d04d096e |
| 24-Oct-2013 |
Juergen Ributzka <juergen@apple.com> |
Fix a bug in LinearFunctionTestReplace that created invalid loop exit checks.
Reviewed by Andy
llvm-svn: 193303
|
#
ada2356a |
| 24-Oct-2013 |
Andrew Trick <atrick@apple.com> |
Clarify comments in genLoopLimit.
llvm-svn: 193292
|
#
a90a18e0 |
| 10-Sep-2013 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Teach ScalarEvolution about pointer address spaces
llvm-svn: 190425
|
#
a1e4118a |
| 12-Jul-2013 |
Andrew Trick <atrick@apple.com> |
LFTR improvement to avoid truncation.
This is a reimplemntation of the patch originally in r186107.
llvm-svn: 186215
|
#
2b71848f |
| 12-Jul-2013 |
Andrew Trick <atrick@apple.com> |
Cleanup LFTR logic.
llvm-svn: 186214
|
#
466555e5 |
| 12-Jul-2013 |
Andrew Trick <atrick@apple.com> |
Cleanup: rename a variable to make the logic easier to follow.
llvm-svn: 186213
|
#
cf3715ca |
| 12-Jul-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Revert "indvars: Improve LFTR by eliminating truncation when comparing against a constant."
This reverts commit r186107. It didn't handle wrapping arithmetic in the loop correctly and thus caused th
Revert "indvars: Improve LFTR by eliminating truncation when comparing against a constant."
This reverts commit r186107. It didn't handle wrapping arithmetic in the loop correctly and thus caused the following C program to count from 0 to UINT64_MAX instead of from 0 to 255 as intended:
#include <stdio.h> int main() { unsigned char first = 0, last = 255; do { printf("%d\n", first); } while (first++ != last); }
Full test case and instructions to reproduce with just the -indvars pass sent to the original review thread rather than to r186107's commit.
llvm-svn: 186152
show more ...
|
#
3095993d |
| 11-Jul-2013 |
Andrew Trick <atrick@apple.com> |
indvars: Improve LFTR by eliminating truncation when comparing against a constant.
Patch by Michele Scandale!
Adds a special handling of the case where, during the loop exit condition rewriting, th
indvars: Improve LFTR by eliminating truncation when comparing against a constant.
Patch by Michele Scandale!
Adds a special handling of the case where, during the loop exit condition rewriting, the exit value is a constant of bitwidth lower than the type of the induction variable: instead of introducing a trunc operation in order to match correctly the operand types, it allows to convert the constant value to an equivalent constant, depending on the initial value of the induction variable and the trip count, in order have an equivalent comparison between the induction variable and the new constant.
llvm-svn: 186107
show more ...
|
Revision tags: llvmorg-3.3.1-rc1, llvmorg-3.3.0 |
|
#
29130c5e |
| 04-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
IndVarSimplify: check if loop invariant expansion can trap
IndVarSimplify is willing to move divide instructions outside of their loop bodies if they are invariant of the loop. However, it may not
IndVarSimplify: check if loop invariant expansion can trap
IndVarSimplify is willing to move divide instructions outside of their loop bodies if they are invariant of the loop. However, it may not be safe to expand them if we do not know if they can trap.
Instead, check to see if it is not safe to expand the instruction and skip the expansion.
This fixes PR16041.
Testcase by Rafael Ávila de Espíndola.
llvm-svn: 183239
show more ...
|
Revision tags: llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1 |
|
#
87c473f0 |
| 19-Mar-2013 |
Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> |
IndVarSimplify: do not recompute an IV value outside of the loop if :
- it is trivially known to be used inside the loop in a way that can not be optimized away - there is no use outside of the loop
IndVarSimplify: do not recompute an IV value outside of the loop if :
- it is trivially known to be used inside the loop in a way that can not be optimized away - there is no use outside of the loop which can take advantage of the computation hoisting
llvm-svn: 177432
show more ...
|
#
9fb823bb |
| 02-Jan-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Move all of the header files which are involved in modelling the LLVM IR into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long
Move all of the header files which are involved in modelling the LLVM IR into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM.
There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier.
The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today.
I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something).
I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily.
llvm-svn: 171366
show more ...
|
Revision tags: llvmorg-3.2.0, llvmorg-3.2.0-rc3 |
|
#
ed0881b2 |
| 03-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module
Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented.
Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =]
llvm-svn: 169131
show more ...
|
Revision tags: llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1 |
|
#
7ec5085e |
| 01-Nov-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Revert the series of commits starting with r166578 which introduced the getIntPtrType support for multiple address spaces via a pointer type, and also introduced a crasher bug in the constant folder
Revert the series of commits starting with r166578 which introduced the getIntPtrType support for multiple address spaces via a pointer type, and also introduced a crasher bug in the constant folder reported in PR14233.
These commits also contained several problems that should really be addressed before they are re-committed. I have avoided reverting various cleanups to the DataLayout APIs that are reasonable to have moving forward in order to reduce the amount of churn, and minimize the number of commits that were reverted. I've also manually updated merge conflicts and manually arranged for the getIntPtrType function to stay in DataLayout and to be defined in a plausible way after this revert.
Thanks to Duncan for working through this exact strategy with me, and Nick Lewycky for tracking down the really annoying crasher this triggered. (Test case to follow in its own commit.)
After discussing with Duncan extensively, and based on a note from Micah, I'm going to continue to back out some more of the more problematic patches in this series in order to ensure we go into the LLVM 3.2 branch with a reasonable story here. I'll send a note to llvmdev explaining what's going on and why.
Summary of reverted revisions:
r166634: Fix a compiler warning with an unused variable. r166607: Add some cleanup to the DataLayout changes requested by Chandler. r166596: Revert "Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! r166591: Delete a directory that wasn't supposed to be checked in yet. r166578: Add in support for getIntPtrType to get the pointer type based on the address space. llvm-svn: 167221
show more ...
|
#
3abb3438 |
| 29-Oct-2012 |
Ulrich Weigand <ulrich.weigand@de.ibm.com> |
In various places throughout the code generator, there were special checks to avoid performing compile-time arithmetic on PPCDoubleDouble.
Now that APFloat supports arithmetic on PPCDoubleDouble, th
In various places throughout the code generator, there were special checks to avoid performing compile-time arithmetic on PPCDoubleDouble.
Now that APFloat supports arithmetic on PPCDoubleDouble, those checks are no longer needed, and we can treat the type like any other.
llvm-svn: 166958
show more ...
|
#
12d91278 |
| 24-Oct-2012 |
Micah Villmow <villmow@gmail.com> |
Add in support for getIntPtrType to get the pointer type based on the address space. This checkin also adds in some tests that utilize these paths and updates some of the clients.
llvm-svn: 166578
|
#
f1088a37 |
| 19-Oct-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Indvars: Don't recursively delete instruction during BB iteration.
This can invalidate the iterators leading to use after frees and crashes. Fixes PR12536.
llvm-svn: 166291
|
#
cdfe20b9 |
| 08-Oct-2012 |
Micah Villmow <villmow@gmail.com> |
Move TargetData to DataLayout.
llvm-svn: 165402
|
#
e076cac0 |
| 04-Oct-2012 |
Jakub Staszak <kubastaszak@gmail.com> |
Add a comment to the commit r165187.
llvm-svn: 165238
|
#
f8a81295 |
| 03-Oct-2012 |
Jakub Staszak <kubastaszak@gmail.com> |
Fix PR13967.
llvm-svn: 165187
|
#
8bcc9711 |
| 29-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make MemoryBuiltins aware of TargetLibraryInfo.
This disables malloc-specific optimization when -fno-builtin (or -ffreestanding) is specified. This has been a problem for a long time but became more
Make MemoryBuiltins aware of TargetLibraryInfo.
This disables malloc-specific optimization when -fno-builtin (or -ffreestanding) is specified. This has been a problem for a long time but became more severe with the recent memory builtin improvements.
Since the memory builtin functions are used everywhere, this required passing TLI in many places. This means that functions that now have an optional TLI argument, like RecursivelyDeleteTriviallyDeadFunctions, won't remove dead mallocs anymore if the TLI argument is missing. I've updated most passes to do the right thing.
Fixes PR13694 and probably others.
llvm-svn: 162841
show more ...
|
#
0d07dfcd |
| 18-Jul-2012 |
Andrew Trick <atrick@apple.com> |
indvars: drive by heuristics fix.
Minor oversight noticed by inspection. Sorry no unit test.
llvm-svn: 160422
|
#
c0872662 |
| 18-Jul-2012 |
Andrew Trick <atrick@apple.com> |
indvars: Linear function test replace should avoid reusing undef.
Fixes PR13371: indvars pass incorrectly substitutes 'undef' values.
I do not like this fix. It's needed until/unless the meaning of
indvars: Linear function test replace should avoid reusing undef.
Fixes PR13371: indvars pass incorrectly substitutes 'undef' values.
I do not like this fix. It's needed until/unless the meaning of undef changes. It attempts to be complete according to the IR spec, but I don't have much confidence in the implementation given the difficulty testing undefined behavior. Worse, this invalidates some of my hard-fought work on indvars and LSR to optimize pointer induction variables. It results benchmark regressions, which I'll track internally. On x86_64 no LTO I see:
-3% huffbench -3% 400.perlbench -8% fhourstones
My only suggestion for recovering is to change the meaning of undef. If we could trust an arbitrary instruction to produce a some real value that can be manipulated (e.g. incremented) according to non-undef rules, then this case could be easily handled with SCEV.
llvm-svn: 160421
show more ...
|
Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1 |
|
#
25553ab5 |
| 24-Mar-2012 |
Andrew Trick <atrick@apple.com> |
More IndVarSimplify cleanup.
llvm-svn: 153362
|
#
f47d0af5 |
| 22-Mar-2012 |
Andrew Trick <atrick@apple.com> |
Remove -enable-iv-rewrite, which has been unsupported since 3.0.
llvm-svn: 153260
|
#
070e540a |
| 16-Mar-2012 |
Andrew Trick <atrick@apple.com> |
LSR fix: Add isSimplifiedLoopNest to IVUsers analysis.
Only record IVUsers that are dominated by simplified loop headers. Otherwise SCEVExpander will crash while looking for a preheader.
I previous
LSR fix: Add isSimplifiedLoopNest to IVUsers analysis.
Only record IVUsers that are dominated by simplified loop headers. Otherwise SCEVExpander will crash while looking for a preheader.
I previously tried to work around this in LSR itself, but that was insufficient. This way, LSR can continue to run if some uses are not in simple loops, as long as we don't attempt to analyze those users.
Fixes <rdar://problem/11049788> Segmentation fault: 11 in LoopStrengthReduce
llvm-svn: 152892
show more ...
|