[PATCH] [CodeGen] Add a pass to fold null checks into nearby memory operations.
Joseph Tremoulet
jotrem at microsoft.com
Fri Jun 5 07:54:00 PDT 2015
================
Comment at: lib/CodeGen/ImplicitNullChecks.cpp:127-130
@@ +126,6 @@
+
+// Analyze MBB to check if its terminating branch can be turned into an implicit
+// null check. If yes, append a description of the said null check to WorkList
+// and return true, else return false.
+bool ImplicitNullChecks::analyzeBlockForNullChecks(
+ MachineBasicBlock &MBB, SmallVectorImpl<NullCheck> &WorkList) {
----------------
Just curious: do you still intend to eventually have this check branch weights and only do the transformation when the null path is very cold? And/or to add some other heuristics here? Or is the plan now to be this aggressive here and rely entirely on patching to handle the cases where the null path is not very cold?
http://reviews.llvm.org/D10201
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list