aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RegAllocBasic.cpp
diff options
context:
space:
mode:
authorAlexis Engelke <engelke@in.tum.de>2024-06-21 13:18:35 +0200
committerGitHub <noreply@github.com>2024-06-21 13:18:35 +0200
commit739a9605677dd736971b17a7888f9d18fd245904 (patch)
treed91da3cdc2dcf38a63a8e0a01e844717fad5079e /llvm/lib/CodeGen/RegAllocBasic.cpp
parentc7c636189adc45251be2b7cc53b6b047e1ac3536 (diff)
downloadllvm-739a9605677dd736971b17a7888f9d18fd245904.zip
llvm-739a9605677dd736971b17a7888f9d18fd245904.tar.gz
llvm-739a9605677dd736971b17a7888f9d18fd245904.tar.bz2
[RegAlloc] Don't call always-true ShouldAllocClass (#96296)
Previously, there was at least one virtual function call for every allocated register. The only users of this feature are AMDGPU and RISC-V (RVV), other targets don't use this. To easily identify these cases, change the default functor to nullptr and don't call it for every allocated register.
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBasic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp
index 181337c..5d84e1e 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.cpp
+++ b/llvm/lib/CodeGen/RegAllocBasic.cpp
@@ -74,7 +74,7 @@ class RABasic : public MachineFunctionPass,
void LRE_WillShrinkVirtReg(Register) override;
public:
- RABasic(const RegClassFilterFunc F = allocateAllRegClasses);
+ RABasic(const RegClassFilterFunc F = nullptr);
/// Return the pass name.
StringRef getPassName() const override { return "Basic Register Allocator"; }