search for: attributereference

Displaying 11 results from an estimated 11 matches for "attributereference".

2017 Jun 22
8
How to prevent optimizing away a call + its arguments
On Wed, Jun 21, 2017 at 05:25:04PM -0700, Mehdi AMINI via llvm-dev wrote: > Hi Kuba, > > Try: > > __attribute__(optnone) > > See > https://clang.llvm.org/docs/AttributeReference.html#optnone-clang-optnone Actually, it should be enough to use: __attribute__((noinline)) void please_do_not_optimize_me_away(int arg1, void *arg2) { asm volatile("":::"memory"); } Creating a real barrier is important. Joerg
2017 Jun 21
2
How to prevent optimizing away a call + its arguments
Hi llvm-dev, I have a C function: __attribute__((__visibility__("default"))) __attribute__((used)) __attribute__((noinline)) void please_do_not_optimize_me_away(int arg1, void *arg2) { asm volatile("" :::); } (the purpose is that this function will be used dynamically at runtime, perhaps by interposing the function, or via the debugger) I really thought this will not get
2018 Mar 16
3
Hacking at EuroLLVM 2018
...compiler binary size, interference during the development. Could we make it more modular? - Invert the logic of convergent attribute in LLVM. While adding the attribute to OpenCL functions we discussed that the semantic of convergent attribute is currently not optimal https://clang.llvm.org/docs/AttributeReference.html#convergent-clang-convergent-clang-convergent. We could make it better by inverting the logic because we will provide a way to specify where compiler doesn't have to be conservative with respect to optimizations that change CFG. This will allow more optimizations to happen on the calls that...
2020 Oct 03
2
Another tail call optimization question
Hello, Could anyone kindly explain to me why the 'g()' in the following function cannot have tail call optimization? > void f(int* x); > void g(); > void h(int v) { > f(&v); > g(); > } > A while ago I was taught that tail call optimization cannot apply if local variables needs to be kept alive, but 'g()' doesn't seem to require anything to be
2018 Nov 08
2
Compile with both arm and thumb mode
Hi I would like to use clang to cross compile the ARM binary. I hope the target binary contains both arm and thumb instruction sets. I use the flag -mhwdiv=arm,thumb. I compiled several binaries. However, I found that the thumb mode instructions are few. Even for very big program like gcc. The number of thumb mode instruction is less than 100. I get the ground truth from the mapping table.
2018 Apr 10
0
Hacking at EuroLLVM 2018
...compiler binary size, interference during the development. Could we make it more modular? - Invert the logic of convergent attribute in LLVM. While adding the attribute to OpenCL functions we discussed that the semantic of convergent attribute is currently not optimal https://clang.llvm.org/docs/AttributeReference.html#convergent-clang-convergent-clang-convergent. We could make it better by inverting the logic because we will provide a way to specify where compiler doesn't have to be conservative with respect to optimizations that change CFG. This will allow more optimizations to happen on the calls that...
2020 Feb 12
2
tool options to generate spill code
Hello, For the following test case, reg.c #include <stdio.h> int getinput() { static int u=10; return u++; } int main() { int a,b,c,d,e,f,g; a=getinput(); b=getinput(); c=getinput(); d=getinput(); e=getinput(); f=getinput(); g=getinput(); printf("%d %d %d %d %d %d %d\n",a,b,c,d,e,f,g); a=b=c=d=e=f=g=0; return 0; } *1.
2018 Mar 16
0
[cfe-dev] Hacking at EuroLLVM 2018
...ce during the development. Could we make it > more modular? > > > - Invert the logic of convergent attribute in LLVM. While adding the > attribute to OpenCL functions we discussed that the semantic of convergent > attribute is currently not optimal > https://clang.llvm.org/docs/AttributeReference.html#convergent-clang-convergent-clang-convergent. > We could make it better by inverting the logic because we will provide a way > to specify where compiler doesn't have to be conservative with respect to > optimizations that change CFG. This will allow more optimizations to happen &g...
2018 Mar 06
1
carries_dependency attribute
Hello, I was wondering what is the semantic of the carries_dependency attribute. On https://clang.llvm.org/docs/AttributeReference.html#carries-dependency it says some suspicious things to me (but I am probably interpreting that wrong, sorry about that): > The carries_dependency attribute specifies dependency propagation into > and out of functions. > Where can it be placed? (on function declaration and/or definition...
2020 Jan 15
4
Finding callees of a function
I searched the doxygen documentation and could not find a solution to my task: In a ModulePass running at EP_OptimizerLast, if I have a function F like in: bool Foo:runOnModule(Module &M) { LLVMContext &C = M.getContext(); for (auto &F : M) { // magic here if I want to know from which function (callee) each function is called - how can I do this? (so that I e.g. have
2020 Feb 14
4
About OpenMP dialect in MLIR
Thanks for the reply! It sounds like LLVM IR is being considered for optimizations in OpenMP constructs. There seems to be plans regarding improvement of LLVM IR Framework for providing things required for OpenMP / flang(?) Are there any design considerations which contain pros and cons about using the MLIR vs LLVM IR for various OpenMP related optimizations/ transformations? The latest RFC [