pengfei added a comment. In D84225#3303821 <https://reviews.llvm.org/D84225#3303821>, @lebedev.ri wrote:
> In D84225#3303771 <https://reviews.llvm.org/D84225#3303771>, @pengfei wrote: > >> In D84225#3302142 <https://reviews.llvm.org/D84225#3302142>, @rnk wrote: >> >>> I think LLVM already doesn't do some tail merging optimizations on inline >>> asm, but allowing the use of the attribute is more principled, and will >>> block more optimizations (CSE). >> >> IIRC, the initial requirment is to avoid the CSE like optimizations. We >> usually use inline asm for sepcial proposes. We have to stop the merge some >> time. > > Since the big hammer (`nomerge`) is already there i suppose this is fine, > but given that there is little context in the original description, > the wording makes it seem like it's being used to workaround > something that may or may not be a bug in the first place. > > There isn't anything inherently wrong with merging inlineasm in general, > if that does not break the constraints, especially since > there's already a `sideeffect` keyword possible on the inlineasm. It's not a workaround. We do need to avoid the merging sometime. For example, given we have 2 branches begin with inline asm of `endbr`. We have to use `nomerge` to stop them been merged out of the branches. `sideeffect` doesn't help with that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84225/new/ https://reviews.llvm.org/D84225 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits