[PATCH] Add -pass-remarks flag to 'opt'.

Diego Novillo dnovillo at google.com
Fri Apr 4 13:40:22 PDT 2014


On Fri, Apr 4, 2014 at 4:25 PM, Quentin Colombet <qcolombet at apple.com> wrote:

>   The question I am about to ask may be beyond the scope of this patch but is the option setting thread safe?
>   The implication is do we have to do something special to access and modify:
>   - OptimizationRemarkPattern.
>   - OptimizationRemarkExpr.

It isn't, but neither is any of the other cl::opt handling code I've
seen elsewhere. Would you be OK with leaving it for a future patch?
Alternately, if there are other places where thread safety is taken
into account, I can replicate that.


> ================
> Comment at: lib/IR/LLVMContextImpl.cpp:53
> @@ +52,3 @@
> +/// LLVMContext::emitOptimizationRemark.
> +static Regex *OptimizationRemarkPattern;
> +
> ----------------
> Add = NULL.
> I am a bit paranoid with default initializer.

Done.



More information about the llvm-commits mailing list