Skip to content

GH: Gandiva: drop redundant duplicate GVN and LoopVectorize passes - #156

Open
lriggs wants to merge 1 commit into
dremio:dremio_27.0_23_19from
lriggs:gandiva-trim-redundant-passes
Open

lriggs wants to merge 1 commit into
dremio:dremio_27.0_23_19from
lriggs:gandiva-trim-redundant-passes

Conversation

@lriggs

@lriggs lriggs commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

The custom pass list added before the O3 default pipeline ran two global value numbering passes back to back (the legacy GVNPass and NewGVNPass) and an extra LoopVectorizePass. NewGVN subsumes the legacy GVN, and SLPVectorizer together with the O3 default pipeline's own vectorization already cover vectorization, so the duplicate GVN and the extra LoopVectorize are wasted compile time.

Drop both in the new and legacy pass-manager paths. Generated code is unchanged (the surviving passes cover the same optimizations); only compile time drops (~8-12% on uncached compiles in local measurement).

@lriggs
lriggs force-pushed the gandiva-trim-redundant-passes branch from 5da6745 to 5e5f3cc Compare November 14, 2026 01:06
The custom pass list added before the O3 default pipeline ran two global value
numbering passes back to back (the legacy GVNPass and NewGVNPass) and an extra
LoopVectorizePass. NewGVN subsumes the legacy GVN, and SLPVectorizer together
with the O3 default pipeline's own vectorization already cover vectorization,
so the duplicate GVN and the extra LoopVectorize are wasted compile time.

Drop both in the new and legacy pass-manager paths. Generated code is
unchanged (the surviving passes cover the same optimizations); only compile
time drops (~8-12% on uncached compiles in local measurement).
@lriggs
lriggs force-pushed the gandiva-trim-redundant-passes branch from 5e5f3cc to 113133f Compare November 14, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant