[all-commits] [llvm/llvm-project] 218531: LowerTypeTests: Fix quadratic complexity (try 2).
Peter Collingbourne via All-commits
all-commits at lists.llvm.org
Wed Apr 16 17:20:11 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 218531821a6b6f1132a245a1f52e125610dc7f6a
https://github.com/llvm/llvm-project/commit/218531821a6b6f1132a245a1f52e125610dc7f6a
Author: Peter Collingbourne <peter at pcc.me.uk>
Date: 2025-04-16 (Wed, 16 Apr 2025)
Changed paths:
M llvm/lib/Transforms/IPO/LowerTypeTests.cpp
Log Message:
-----------
LowerTypeTests: Fix quadratic complexity (try 2).
Currently we have quadratic complexity in LowerTypeTests because
ScopedSaveAliaseesAndUsed loops over all aliases for each disjoint
set, and the number of aliases and number of disjoint sets is
roughly proportional to the program size. Fix that by moving
ScopedSaveAliaseesAndUsed to LowerTypeTestsModule::lower() so that
we do this only once.
Reland of #135875 with fix for bug that caused check-lld test failures.
The fix is to only remove functions from llvm.used/llvm.compiler.used
because buildBitSetsFromGlobalVariables, which now runs while
ScopedSaveAliaseesAndUsed is in scope, will delete global variables,
which would otherwise lead to a use-after-free when they are added
back to llvm.used or llvm.compiler.used.
Reviewers: fmayer, vitalybuka
Reviewed By: fmayer
Pull Request: https://github.com/llvm/llvm-project/pull/136053
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