Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
51a895ad |
| 03-Dec-2024 |
Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> |
IR: introduce struct with CmpInst::Predicate and samesign (#116867)
Introduce llvm::CmpPredicate, an abstraction over a floating-point
predicate, and a pack of an integer predicate with samesign in
IR: introduce struct with CmpInst::Predicate and samesign (#116867)
Introduce llvm::CmpPredicate, an abstraction over a floating-point
predicate, and a pack of an integer predicate with samesign information,
in order to ease extending large portions of the codebase that take a
CmpInst::Predicate to respect the samesign flag.
We have chosen to demonstrate the utility of this new abstraction by
migrating parts of ValueTracking, InstructionSimplify, and InstCombine
from CmpInst::Predicate to llvm::CmpPredicate. There should be no
functional changes, as we don't perform any extra optimizations with
samesign in this patch, or use CmpPredicate::getMatching.
The design approach taken by this patch allows for unaudited callers of
APIs that take a llvm::CmpPredicate to silently drop the samesign
information; it does not pose a correctness issue, and allows us to
migrate the codebase piece-wise.
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
4e93b16f |
| 02-Aug-2024 |
Sergei Barannikov <barannikov88@gmail.com> |
[llvm] Make InstSimplifyFolder constructor explicit (NFC) (#101654)
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
e57308b0 |
| 04-Jun-2024 |
Nikita Popov <npopov@redhat.com> |
[IR] Accept GEPNoWrapFlags in creation APIs
Add overloads of GetElementPtrInst::Create() that accept GEPNoWrapFlags, and switch the bool parameters in IRBuilder to accept it instead as well.
As a s
[IR] Accept GEPNoWrapFlags in creation APIs
Add overloads of GetElementPtrInst::Create() that accept GEPNoWrapFlags, and switch the bool parameters in IRBuilder to accept it instead as well.
As a sample use, switch GEP i8 canonicalization in InstCombine to preserve the original flags.
show more ...
|
#
7efafb01 |
| 21-May-2024 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Migrate fcmp to folding API
This was one of the last leftovers still using a Create-style instead of Fold-style API. Convert FoldICmp into FoldCmp so it can handle both icmp and fcmp.
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2 |
|
#
14114523 |
| 15-Mar-2024 |
Artem Tyurin <artem.tyurin@gmail.com> |
[IRBuilder] Fold binary intrinsics (#80743)
Fixes https://github.com/llvm/llvm-project/issues/61240.
|
Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2 |
|
#
4251aa7a |
| 29-Sep-2023 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Migrate most casts to folding API
Migrate creation of most casts to use the FoldXYZ rather than CreateXYZ style APIs. This means that InstSimplifyFolder now works for these, which is wha
[IRBuilder] Migrate most casts to folding API
Migrate creation of most casts to use the FoldXYZ rather than CreateXYZ style APIs. This means that InstSimplifyFolder now works for these, which is what accounts for the AMDGPU test changes.
show more ...
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
6d6983ce |
| 13-Jul-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Migrate fneg to fold infrastructure
Make use of a single FoldUnOpFMF() API, though in practice FNeg is the only unary operation that exists.
This is likely NFC in practice, because user
[IRBuilder] Migrate fneg to fold infrastructure
Make use of a single FoldUnOpFMF() API, though in practice FNeg is the only unary operation that exists.
This is likely NFC in practice, because users of InstSimplifyFolder don't create fneg.
show more ...
|
#
21933b2f |
| 01-Jul-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Move CreateNeg() to fold API
Remove the CreateNeg() method from IRBuilderFolder and base it on CreateSub(0, V) instead, which will call FoldNoWrapBinaryOp().
May not be NFC if InstSimpl
[IRBuilder] Move CreateNeg() to fold API
Remove the CreateNeg() method from IRBuilderFolder and base it on CreateSub(0, V) instead, which will call FoldNoWrapBinaryOp().
May not be NFC if InstSimplifyFolder is used.
show more ...
|
#
5c802177 |
| 01-Jul-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Move CreateNot() to fold API
Drop the IRBuilderFolder method entirely and base this on CreateXor(V, -1) instead, so this will now go through FoldBinOp.
May not be NFC if the InstSimplif
[IRBuilder] Move CreateNot() to fold API
Drop the IRBuilderFolder method entirely and base this on CreateXor(V, -1) instead, so this will now go through FoldBinOp.
May not be NFC if the InstSimplifyBuilder is used.
show more ...
|
#
f34dcf27 |
| 30-Jun-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Migrate all binops to folding API
Migrate all binops to use FoldXYZ rather than CreateXYZ APIs, which are compatible with InstSimplifyFolder and fallible constant folding.
Rather than c
[IRBuilder] Migrate all binops to folding API
Migrate all binops to use FoldXYZ rather than CreateXYZ APIs, which are compatible with InstSimplifyFolder and fallible constant folding.
Rather than continuing to add one method for every single operator, add a generic FoldBinOp (plus variants for nowrap, exact and fmf operators), which we would need anyway for CreateBinaryOp.
This change is not NFC because IRBuilder with InstSimplifyFolder may perform more folding. However, this patch changes SCEVExpander to not use the folder in InsertBinOp to minimize practical impact and keep this change as close to NFC as possible.
show more ...
|
#
66a16b28 |
| 29-Jun-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Migrate div/rem to use fold infrastructure
Migrate udiv, sdiv, urem, and srem to use the FoldXYZ rather than the CreateXYZ infrastructure.
|
#
278a47cc |
| 28-Jun-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Migrate vector operations to fold infrastructure
Migrate extractelement, insertelement and shufflevector to use the FoldXYZ rather than CreateXYZ APIs.
This is probably NFC in practice,
[IRBuilder] Migrate vector operations to fold infrastructure
Migrate extractelement, insertelement and shufflevector to use the FoldXYZ rather than CreateXYZ APIs.
This is probably NFC in practice, because the places using InstSimplifyFolder probably aren't using vector operations.
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
b8c2781f |
| 09-Jun-2022 |
Simon Moll <moll@cs.uni-saarland.de> |
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with the cleanup of InstructionSimplify in one commit.
This is the alternative to the less invasive clang-format only patch: D126783
Reviewed By: spatel, rengolin
Differential Revision: https://reviews.llvm.org/D126889
show more ...
|
Revision tags: llvmorg-14.0.4 |
|
#
5df22e50 |
| 17-May-2022 |
Nikita Popov <npopov@redhat.com> |
[IRBuilder] Move insertvalue/extractvalue to fold infrastructure
Move from the old CreateXYZ() to the new FoldXYZ() mechanism.
This change is likely NFC in practice, because I don't think that the
[IRBuilder] Move insertvalue/extractvalue to fold infrastructure
Move from the old CreateXYZ() to the new FoldXYZ() mechanism.
This change is likely NFC in practice, because I don't think that the places using InstSimplifyFolder use insertvalue/extractvalue.
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
#
c6f0940d |
| 05-Feb-2022 |
Bill Wendling <isanbard@gmail.com> |
[NFC] Remove unnecessary #includes
An attempt to reduce the number of files that are recompiled due to a change.
Differential Revision: https://reviews.llvm.org/D119055
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
#
782c0dd1 |
| 20-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[IRBuilder] Migrate and-folding to value-based FoldAnd.
Similar to the migration of or-folding to FoldOr, there are a few cases where the fold in IRBuilder::CreateAnd triggered directly. Those have
[IRBuilder] Migrate and-folding to value-based FoldAnd.
Similar to the migration of or-folding to FoldOr, there are a few cases where the fold in IRBuilder::CreateAnd triggered directly. Those have been updated.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D117431
show more ...
|
#
ba3198cf |
| 15-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[IRBuilder] Migrate select-folding to value-based FoldSelect.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D117228
|
#
daf06590 |
| 14-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[IRBuilder] Migrate gep-folding to value-based FoldGEP.
Depends on D117038.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D117039
|
Revision tags: llvmorg-13.0.1-rc2 |
|
#
138fcc5f |
| 12-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[IRBuilder] Migrate icmp-folding to value-based FoldICmp.
Depends on D116935.
Reviewed By: nikic, lebedev.ri
Differential Revision: https://reviews.llvm.org/D116969
|
#
7e680613 |
| 12-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[IRBuilder] Migrate add-folding to value-based FoldAdd.
Depends on D116935.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D116968
|
#
f0ef1ea6 |
| 11-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[IRBuilder] Introduce folder using inst-simplify, use for Or fold.
Alternative to D116817.
This introduces a new value-based folding interface for Or (FoldOr), which takes 2 values and returns an e
[IRBuilder] Introduce folder using inst-simplify, use for Or fold.
Alternative to D116817.
This introduces a new value-based folding interface for Or (FoldOr), which takes 2 values and returns an existing Value or a constant if the Or can be simplified. Otherwise nullptr is returned. This replaces the more restrictive CreateOr which takes 2 constants.
This is the used to implement a folder that uses InstructionSimplify. The logic to simplify `Or` instructions is moved there. Subsequent patches are going to transition other CreateXXX to the more general FoldXXX interface.
Reviewed By: nikic, lebedev.ri
Differential Revision: https://reviews.llvm.org/D116935
show more ...
|