| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
by Richard Osborne.
llvm-svn: 58555
|
| |
|
|
|
|
|
| |
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.
llvm-svn: 58549
|
| |
|
|
|
|
| |
optimizations accordingly.
llvm-svn: 58457
|
| |
|
|
| |
llvm-svn: 58351
|
| |
|
|
|
|
| |
Understand that mul %x, 1 = %x.
llvm-svn: 58069
|
| |
|
|
|
|
|
|
|
|
|
| |
LoopPass*.
- Although less precise, this means they can be used in clients
without RTTI (who would otherwise need to include LoopPass.h, which
eventually includes things using dynamic_cast). This was the
simplest solution that presented itself, but I am happy to use a
better one if available.
llvm-svn: 58010
|
| |
|
|
| |
llvm-svn: 57660
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
to find opportunities for store-to-load forwarding or load CSE,
in the same way that visitStore scans back to do DSE. Also, define
a new helper function for testing whether the addresses of two
memory accesses are known to have the same value, and use it in
both visitStore and visitLoad.
These two changes allow instcombine to eliminate loads in code
produced by front-ends that frequently emit obviously redundant
addressing for memory references.
llvm-svn: 57608
|
| |
|
|
| |
llvm-svn: 57515
|
| |
|
|
|
|
|
| |
- Renumber fcmp predicates to match their icmp counterparts.
- Try swapping operands to expose more optimization opportunities.
llvm-svn: 57513
|
| |
|
|
|
|
|
|
|
| |
e.g. uno && ueq -> ueq
ord && olt -> olt
ord && ueq -> oeq
llvm-svn: 57507
|
| |
|
|
|
|
| |
constant expression with all zero indices as being the same as a bitcast.
llvm-svn: 57442
|
| |
|
|
|
|
|
|
| |
a couple other cases for clarity, but shouldn't affect correctness.
Patch by Eli Friedman!
llvm-svn: 57387
|
| |
|
|
|
|
| |
This patch fixes PR 2869
llvm-svn: 57369
|
| |
|
|
| |
llvm-svn: 57353
|
| |
|
|
|
|
|
| |
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
|
| |
|
|
|
|
| |
Patch by Samuel Tardieu.
llvm-svn: 57291
|
| |
|
|
|
|
| |
patch by Samuel Tardieu!
llvm-svn: 57288
|
| |
|
|
| |
llvm-svn: 57221
|
| |
|
|
|
|
|
| |
This includes not marking a GEP involving a vector as unsafe, but only when it
has all zero indices. This allows scalarrepl to work in a few more cases.
llvm-svn: 57177
|
| |
|
|
|
|
|
|
| |
shifting and masking inside a bswap expr. This allows it to handle
the cases from PR2842, which involve the intermediate 'or'
expressions being shifted, not just the input value.
llvm-svn: 57095
|
| |
|
|
|
|
| |
ashr. It should only apply to lshr.
llvm-svn: 57089
|
| |
|
|
|
|
|
|
|
|
|
| |
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
llvm-svn: 56922
|
| |
|
|
|
|
| |
instruction, not after. This fixes some uses of free'd memory.
llvm-svn: 56908
|
| |
|
|
| |
llvm-svn: 56834
|
| |
|
|
| |
llvm-svn: 56716
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn
Return attributes use 0 as the index.
Function attributes use ~0U as the index.
This patch requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56704
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
|
| |
|
|
| |
llvm-svn: 56549
|
| |
|
|
| |
llvm-svn: 56546
|
| |
|
|
| |
llvm-svn: 56535
|
| |
|
|
| |
llvm-svn: 56527
|
| |
|
|
|
|
| |
Do not check isDeclaration() in hasNote(). It is clients' responsibility.
llvm-svn: 56524
|
| |
|
|
| |
llvm-svn: 56513
|
| |
|
|
|
|
| |
Function Notes also. Function notes are stored at index ~0.
llvm-svn: 56511
|
| |
|
|
| |
llvm-svn: 56477
|
| |
|
|
| |
llvm-svn: 56419
|
| |
|
|
|
|
|
|
| |
Unfortunately this means removing one regression test
of GlobalsModRef because I couldn't work out how to
perform it without MarkModRef.
llvm-svn: 56342
|
| |
|
|
|
|
| |
Fixes PR 2805
llvm-svn: 56321
|
| |
|
|
|
|
|
|
| |
the "erase".
Thanks to Ji Young Park for the patch!
llvm-svn: 56316
|
| |
|
|
|
|
| |
This one slipped through cracks very well.
llvm-svn: 56284
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Recognize expressions like "x > -1 ? x : 0" as min/max and turn them
into expressions like "x < 0 ? 0 : x", which is easily recognizable
as a min/max operation.
- Refrain from folding expression like "y/2 < 1" to "y < 2" when the
comparison is being used as part of a min or max idiom, like
"y/2 < 1 ? 1 : y/2". In that case, the division has another use, so
folding doesn't eliminate it, and obfuscates the min/max, making it
harder to recognize as a min/max operation.
These benefit ScalarEvolution, CodeGen, and anything else that wants to
recognize integer min and max.
llvm-svn: 56246
|
| |
|
|
|
|
|
|
|
| |
cases. See the comment above OptimizeSMax for the full story, and
the testcase for an example. This cancels out a pessimization
commonly attributed to indvars, and will allow us to lift some of
the artificial throttles in indvars, rather than add new ones.
llvm-svn: 56230
|
| |
|
|
|
|
|
| |
getelementptr indices, inserting an explicit cast if necessary.
This helps expose the sign-extension operation to other optimizations.
llvm-svn: 56133
|
| |
|
|
|
|
| |
Patch by Nicolas Capens!
llvm-svn: 56129
|
| |
|
|
|
|
|
| |
cases it was still getting lucky and detecting overflow
but it was clearly incorrect.
llvm-svn: 56113
|
| |
|
|
|
|
| |
multiplication overflows.
llvm-svn: 56082
|
| |
|
|
|
|
| |
condition. This fixes PR2740.
llvm-svn: 56076
|
| |
|
|
| |
llvm-svn: 56056
|
| |
|
|
| |
llvm-svn: 56040
|