D93594 depend on the dominate tree and loop information. It increased
the compile time when build with -O0. However this is just to amend the
dominate tree and loop information, so that it is unnecessary to
re-analyze them again. Given the dominate tree of loop information are
absent in this pass, we can avoid amending them.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
With "perf stat CLANG_BINARY -w -Werror=date-time -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -I. -MD -MT MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o -MF MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o.d -o MultiSource/Applications/sqlite3/CMakeFiles/sqlite3.dir/sqlite3.c.o -c ../MultiSource/Applications/sqlite3/sqlite3.c", I can see the sqlite3 is fixed in local test.
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | ||
---|---|---|
520 | I believe you should still keep the addPreserved here. You do preserve it if it already exists. | |
520 | I would create a DTU already here and pass it in (it's okay to create a DTU of nullptr). Otherwise the "lazy" strategy will actually be eager, as your DTU object is immediately destroyed. |
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | ||
---|---|---|
519–523 | Here I remove the dependency of dominator tree pass. |
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | ||
---|---|---|
520 | Thanks. I'd prefer to not depending to DTU constructor given DT is nullptr, so I create DTU in X86LowerAMXIntrinsics constructor. |
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | ||
---|---|---|
520 | But aren't you still creating a DTU from nullptr, just in a different place now? I'm okay with your version as well, but it seems more elegant to me to only pass around DTU rather than both DT and DTU. You can then also use it unconditionally, as DTU->applyUpdates() is a no-op if there is no actual dominator tree. |
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | ||
---|---|---|
520 | Your suggestion looks good to me. Thank you! Patch updated. |
This is the key fix.