[PATCH] D44703: [WebAssembly] Strip threadlocal attribute from globals in single thread mode
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 20 15:02:10 PDT 2018
dschuff added inline comments.
================
Comment at: lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp:188
addPass(createLowerAtomicPass());
- else
+ addPass(new StripThreadLocal());
+ } else
----------------
sbc100 wrote:
> What do the other passes all have create functions but this one use just using new?
I assume it's so that you can forward-declare `FunctionPass *createFooPass()` without including the full class definition (e.g. in `include/llvm/Analysis/Passes.h`). It's not necessary when you define the pass in the same file in an anonymous namespace. The implementations of `createFooPass()` are all just `return new FooPass()`.
================
Comment at: lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp:189
+ addPass(new StripThreadLocal());
+ } else
// Expand some atomic operations. WebAssemblyTargetLowering has hooks which
----------------
sbc100 wrote:
> Does LLVM style allow for this kind of bracketing where one side of a conditions uses braces and the other doesn't?
I don't know but I don't like it, and it wasn't my intention :) I'll fix.
Repository:
rL LLVM
https://reviews.llvm.org/D44703
More information about the llvm-commits
mailing list