[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-08-04 Thread Luís Marques via Phabricator via cfe-commits
luismarques accepted this revision. luismarques added a comment. This revision is now accepted and ready to land. Still LGTM. BTW, I liked that in the old version the help string included "In GCC =0 is the same as =1". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping. - -falign-loops= is currently silently ignored. - -fliang-loops= has user interest from at least x86 and RISC-V. - This patch makes it work for the non-LTO case. I think this is good enough. The LTO case require a function attribute (this doesn't apply to

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D106701#2908679 , @craig.topper wrote: > Does this work with LTO? `-falign-loops=` doesn't affect ld.lld code generation options. `-Wl,-mllvm,--align-loops=128` can be used for now. Repository: rG LLVM Github Monorepo

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-27 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Does this work with LTO? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106701/new/ https://reviews.llvm.org/D106701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-27 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64 -align-loops=32 |

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-27 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64 -align-loops=32 |

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64 -align-loops=32 |

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Luís Marques via Phabricator via cfe-commits
luismarques added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN:

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64 -align-loops=32 |

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN:

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D106701#2902544 , @dblaikie wrote: > In D106701#2901656 , @MaskRay wrote: > >> In D106701#2901639 , @efriedma >> wrote: >> >>> Can we hook

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64 -align-loops=32 |

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D106701#2902544 , @dblaikie wrote: > In D106701#2901656 , @MaskRay wrote: > >> In D106701#2901639 , @efriedma >> wrote: >> >>> Can we

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4 +; RUN: llc < %s -mtriple=riscv64 | FileCheck %s +; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16 +; RUN: llc < %s -mtriple=riscv64 -align-loops=32 |

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D106701#2901656 , @MaskRay wrote: > In D106701#2901639 , @efriedma > wrote: > >> Can we hook this up to a LLVM IR function attribute, instead of making it a >> codegen flag? > > The

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 361467. MaskRay marked 2 inline comments as done. MaskRay added a comment. comments. add a test/CodeGen test. add HelpText. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106701/new/

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-24 Thread Luís Marques via Phabricator via cfe-commits
luismarques added a comment. LGTM. I'll let someone familiar with the old option explicitly approve it. Comment at: clang/test/Driver/falign-loops.c:6-7 +// RUN: %clang -### -falign-loops=5 %s 2>&1 | FileCheck %s --check-prefix=CHECK-5 +// RUN: %clang -### -falign-loops=8 %s

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D106701#2901639 , @efriedma wrote: > Can we hook this up to a LLVM IR function attribute, instead of making it a > codegen flag? The current TargetLoweringBase::PrefLoopAlignment is global. I have considered a function

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Can we hook this up to a LLVM IR function attribute, instead of making it a codegen flag? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106701/new/ https://reviews.llvm.org/D106701

[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

2021-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: compnerd, craig.topper, rsmith. Herald added subscribers: ormris, StephenFan, frasercrmck, dexonsmith, dang, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01,