[all-commits] [llvm/llvm-project] 51a895: IR: introduce struct with CmpInst::Predicate and s...
Ramkumar Ramachandra via All-commits
all-commits at lists.llvm.org
Tue Dec 3 05:31:26 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 51a895aded890e90493be59f7af0fa5a3b9b85aa
https://github.com/llvm/llvm-project/commit/51a895aded890e90493be59f7af0fa5a3b9b85aa
Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: 2024-12-03 (Tue, 03 Dec 2024)
Changed paths:
M llvm/include/llvm/Analysis/InstSimplifyFolder.h
M llvm/include/llvm/Analysis/InstructionSimplify.h
M llvm/include/llvm/Analysis/ValueTracking.h
A llvm/include/llvm/IR/CmpPredicate.h
M llvm/include/llvm/IR/Instructions.h
M llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/IR/Instructions.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/unittests/IR/InstructionsTest.cpp
Log Message:
-----------
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list