[all-commits] [llvm/llvm-project] 9b6127: [ConstraintSystem] Remove GCD handling (NFCI).
Florian Hahn via All-commits
all-commits at lists.llvm.org
Thu Dec 28 07:23:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9b6127d76db7b77f8a2c16191860cb30fb8da4b1
https://github.com/llvm/llvm-project/commit/9b6127d76db7b77f8a2c16191860cb30fb8da4b1
Author: Florian Hahn <flo at fhahn.com>
Date: 2023-12-28 (Thu, 28 Dec 2023)
Changed paths:
M llvm/include/llvm/Analysis/ConstraintSystem.h
M llvm/lib/Analysis/ConstraintSystem.cpp
Log Message:
-----------
[ConstraintSystem] Remove GCD handling (NFCI).
As @dtcxzyw pointed out in
https://github.com/llvm/llvm-project/pull/76299#pullrequestreview-1795471115
the current GCD handling is effectively a no-op, as NewGCD will always
by 1, as it is initially initialized as 1.
This patch removes the uses of GCD and its computation. This slightly
reduces compile-time [1], while not causing any binary changes (due to always
dividing by 1) in the large test-set I checked.
Division by GCD could be added in the future again and it in theory
should help reduce overflows by normalizing the coefficients (sketched
in cadbfdf8605e743e092217c54e2b837245a0a330), but this also doesn't seem
to have much (any) impact in practice.
[1] https://llvm-compile-time-tracker.com/compare.php?from=0de030e4dcb798228731ab25d4dd31df4dcaba2b&to=cadbfdf8605e743e092217c54e2b837245a0a330&stat=instructions:u
More information about the All-commits
mailing list