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

Quentin Colombet qcolombet at apple.com
Fri Apr 4 13:59:37 PDT 2014


On Apr 4, 2014, at 1:40 PM, Diego Novillo <dnovillo at google.com> wrote:

> 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?
Sure, I just wanted to double check we are on the same page.
Please file a PR for this when your patch lands.

> Alternately, if there are other places where thread safety is taken
> into account, I can replicate that.
Not that I am aware of.

Thanks,
Quentin

> 
> 
>> ================
>> 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