[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:186 void VisitCallExpr(const CallExpr *E) { FoundCallExpr = true; } + void VisitAsmStmt(const AsmStmt *S) { FoundCallExpr = true; } aaron.ballman wrote: > xbolva00 wrote: > > pengfei

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:186 void VisitCallExpr(const CallExpr *E) { FoundCallExpr = true; } + void VisitAsmStmt(const AsmStmt *S) { FoundCallExpr = true; } xbolva00 wrote: > pengfei wrote: > > xbolva0

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: aaron.ballman. xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:186 void VisitCallExpr(const CallExpr *E) { FoundCallExpr = true; } + void VisitAsmStmt(const AsmStmt *S) { FoundCallExpr = true; } pengf

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D84225#3305140 , @rnk wrote: > In D84225#3304189 , @pengfei wrote: > >> It's not a workaround. We do need to avoid the merging sometime. For >> example, given we have 2 branches begin wi

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-08 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D84225#3304189 , @pengfei wrote: > 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

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D84225#3303821 , @lebedev.ri wrote: > In D84225#3303771 , @pengfei wrote: > >> In D84225#3302142 , @rnk wrote: >> >>> I think LLVM already doesn't

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D84225#3303771 , @pengfei wrote: > In D84225#3302142 , @rnk wrote: > >> I think LLVM already doesn't do some tail merging optimizations on inline >> asm, but allowing the use of the a

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In 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 in

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. 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). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2022-02-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:186 void VisitCallExpr(const CallExpr *E) { FoundCallExpr = true; } + void VisitAsmStmt(const AsmStmt *S) { FoundCallExpr = true; } This is totally wrong, just big hack to smuggle i

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2020-07-21 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18581fd2c441: [CFE] Add nomerge function attribute to inline assembly. (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84225/new/ https

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2020-07-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu accepted this revision. zequanwu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84225/new/ https://reviews.llvm.org/D84225 __

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2020-07-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: zequanwu, rnk, asbirlea. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sometimes we also want to avoid merging inline assembly. This patch add the nomerge function attribute to inline assembly. Repository: rG LLVM