[all-commits] [llvm/llvm-project] 00e555: [GISel][CSE][NFC]: Handle mutual recursion when in...
proaditya via All-commits
all-commits at lists.llvm.org
Thu Mar 2 14:43:10 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 00e55531df5e579dba79498ccdc36ec96403a020
https://github.com/llvm/llvm-project/commit/00e55531df5e579dba79498ccdc36ec96403a020
Author: Aditya Nandakumar <aditya_nandakumar at adityan.scv.apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h
M llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
Log Message:
-----------
[GISel][CSE][NFC]: Handle mutual recursion when inserting node
GISel's CSE mechanism lazily inserts instructions into the CSE List
to improve on efficiency as well as efficacy of CSE
(for allowing partially built instructions to be fully built).
There's unfortunately a mutual recursion via
`handleRecordedInsts -> handleRecordedInst -> insertNode-> handleRecordedInsts`.
So this change simply records that we're already draining this list so we can just bail out on the recursion.
No changes to codegen are expected as we're still draining/handling the temporary
list via pop_back and we should get the same sequence of instructions
whether we call pop_back in a loop at the top level or recursive.
https://reviews.llvm.org/D145006
reviewed by: dsanders
More information about the All-commits
mailing list