[PATCH] Ephemeral values for LLVM invariants

hfinkel at anl.gov hfinkel at anl.gov
Sun Jul 27 21:58:27 PDT 2014

Comment at: lib/Analysis/CodeMetrics.cpp:47
@@ +46,3 @@
+        case Intrinsic::var_annotation:
+          // These intrinsics don't actually represent code after lowering.
+          WorkSet.push_back(CI);
hfinkel at anl.gov wrote:
> Philip Reames wrote:
> > Most of this change is driven by the assume intrinsic changes, but this actually changes behaviour for existing code as well.  It might be good to separate this infrastructure into two distinct changes and get the addition of the other intrinsics more widely reviewed.  (i.e. despite the title and description, this *isn't* specific to assume/invariant)
> > 
> > I'm mostly suggesting this for risk management and blame purposes.  
> You're right, but the blame will be clear regardless. This needs to be committed before we actually start *generating* @llvm.assume in Clang for anything (and before anyone else should generate them either).
> As it turns out, most of the people interested in this feature are the people who best understand the impact on costing for the other intrinsics too. Thus, I'm not concerned.
That said, the next version of this patch will handle only @llvm.assume (because they'll be an easy way to find them, thus decreasing the cost).


More information about the llvm-commits mailing list