similar to: i32 vs i32 signext for C int parameters to library functions

Displaying 20 results from an estimated 5000 matches similar to: "i32 vs i32 signext for C int parameters to library functions"

2015 Jul 23
2
[LLVMdev] signext on function parameters and return.
Hello, For a simple function taking a short and returning a short, clang generates IR with this function signature: define signext i16 @foo(i16 signext %x) Some questions please: 1) For the input parameter and return value, does the target control whether clang uses signext vs something else? If so, how does this target query work? 2) Does the presence of the signext mean it's imperative
2015 Jul 23
0
[LLVMdev] signext on function parameters and return.
> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Steve King > Sent: 23 July 2015 01:45 > To: llvmdev at cs.uiuc.edu > Subject: [LLVMdev] signext on function parameters and return. > > Hello, > For a simple function taking a short and returning a short, clang > generates IR with this function
2008 Apr 30
3
[LLVMdev] c char translated to i8 signext
I have a c function that takes a char as a parameter. When it is compiled to bytecode, it gets translated to i8 signext. Why is signext getting added to the type? It doesn't get added if the parameter is an int. Is there a way to alter the parameter in the c code so that it simply gets translated to an i8, or is there a way in LLVM to modify the parameter's type? By the way, I am
2008 Apr 30
2
[LLVMdev] c char translated to i8 signext
Thanks for your response. When I attempt to get the parameter attribute lists for the function and its call sites, the list is NULL. Is there someone else I should be looking to get the parameter attributes? Chris Lattner wrote: > On Wed, 30 Apr 2008, Ryan M. Lefever wrote: >> I have a c function that takes a char as a parameter. When it is >> compiled to bytecode, it gets
2008 Apr 30
0
[LLVMdev] c char translated to i8 signext
On Wed, 30 Apr 2008, Ryan M. Lefever wrote: > I have a c function that takes a char as a parameter. When it is > compiled to bytecode, it gets translated to i8 signext. Why is signext > getting added to the type? It doesn't get added if the parameter is an > int. Is there a way to alter the parameter in the c code so that it > simply gets translated to an i8, or is there a
2008 Apr 30
0
[LLVMdev] c char translated to i8 signext
It appears that the only thing that has parameter attributes is the function type. However, you can't simply change a function's type without reconstructing the whole function, can you? Also, am I correct that it would not be safe to remove the parameter attribute's from a FunctionType? Ryan M. Lefever wrote: > Thanks for your response. When I attempt to get the parameter
2011 Mar 16
3
[LLVMdev] Calls to functions with signext/zeroext return values
In SelectionDAGBuilder::visitRet(), there is this bit of code: // FIXME: C calling convention requires the return type to be promoted // to at least 32-bit. But this is not necessary for non-C calling // conventions. The frontend should mark functions whose return values // require promoting with signext or zeroext attributes. if (ExtendKind !=
2018 May 01
0
IPRA and conditionally reserved registers
Hi Kit, I see you have been working on IPRA (https://reviews.llvm.org/D45308), and would therefore like to bring up an issue with it I am looking into on SystemZ (see https://reviews.llvm.org/D46232). I first realized that %r14, the return register, must be saved and restored with IPRA enabled, since otherwise the function can't return. This is a callee saved register so without IPRA
2015 Jul 23
1
[LLVMdev] signext on function parameters and return.
On Thu, Jul 23, 2015 at 3:59 AM, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote: > > The target hook is classifyArgumentType() and classifyReturnType() in tools/clang/lib/CodeGen/TargetInfo.cpp and returning ABIArgInfo::getExtend() causes the signext/zeroexts to be emitted appropriately for the type. Thanks for the great help. Should these classify calls be moved down into the
2011 Mar 16
0
[LLVMdev] Calls to functions with signext/zeroext return values
On Mar 16, 2011, at 5:58 AM, Ken Dyck wrote: > In SelectionDAGBuilder::visitRet(), there is this bit of code: > > // FIXME: C calling convention requires the return type to be promoted > // to at least 32-bit. But this is not necessary for non-C calling > // conventions. The frontend should mark functions whose return values > // require promoting
2008 May 28
0
[LLVMdev] Troubling promotion of return value to Integer ...
Hi Chris, please read below: > In many cases that is true, but for indirect calls (calls through a > function pointer) it isn't. > > > All that is needed is to add some kind of sign attribute to the > > definition of callee function which will be set by the front-end and > > eventually saved in Function class. > > Sure. Adding an attribute is what we need
2008 May 28
2
[LLVMdev] Troubling promotion of return value to Integer ...
On May 27, 2008, at 3:33 PM, <Alireza.Moshtaghi at microchip.com> <Alireza.Moshtaghi at microchip.com > wrote: > Chris, > I see, so in deed the front-end sets the attributes on the declaration > of the called function; which in theory is also available to the > caller > through the CALL node. Right. > Now here is what I think: > I agree that 4 attributes are
2016 Dec 28
3
why clang compile local to global
Hello,everyone: I want to known how to let clang compile my local array to local variables: I have the code : int main() { int a[3]={1,2,3}; int b=7; int c=8; int d=9; int e=10; int f=11; test(b,c,d,e,f,a); return 0; } I use clang command:clang --target=mipsel -emit-llvm -S a.c -o a.ll The a.ll is: @main.a = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 3],
2018 Jan 09
0
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On 8 January 2018 at 11:15, Kaylor, Andrew via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi Kevin, > > Thanks for reaching out about this, and thanks especially for offering to > help. I've had some other priorities that have prevented me from making > progress on this recently. > > As far as I know, there is no support at all in clang for handling the >
2016 Dec 28
0
why clang compile local to global
> On Dec 27, 2016, at 11:09 PM, liuyu11 at ict.ac.cn via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello,everyone: > I want to known how to let clang compile my local array to local variables: > I have the code : > int main() > { > int a[3]={1,2,3}; > > int b=7; > int c=8; > int d=9; > int e=10; > int f=11; >
2018 Jan 09
2
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On 01/08/2018 07:06 PM, Richard Smith via llvm-dev wrote: > On 8 January 2018 at 11:15, Kaylor, Andrew via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > Hi Kevin, > > Thanks for reaching out about this, and thanks especially for > offering to help. I've had some other priorities that have > prevented
2018 Mar 08
1
[RFC] jump threading on std::pair<int, bool>
Hi, While comparing the code by LLVM and GCC for some major libraries, I found that LLVM fails to apply jump threading with a method whose return type is std::pair<int, bool> (actually, any pair of 32-bit values like std::pair<bool, int> and std::pair<int, int>). For example, jump threading does not work for the if statement in func. std::pair<int, bool> callee(int v) {
2009 Mar 14
0
[LLVMdev] promotion of return value.
Hi, > What we are trying to do is to add new attributes (more maybe added > later): > > > sign_ext_from_i8, sign_ext_from_i16 > > zero_ext_from_i8, zero_ext_from_i16 > > to function definition so (assuming that both caller and callee are > generated in the same front-end) the caller will know if the callee has > already extended the return value or not, then
2015 Nov 13
2
revision 252902
The test case that you added in this revision fails on several of the power buildbots (for example, http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20127) and also when I build it locally: FAIL: Clang :: CodeGenCXX/main-norecurse.cpp (2951 of 27722) ******************** TEST 'Clang :: CodeGenCXX/main-norecurse.cpp' FAILED ******************** Script: --
2018 Jan 09
0
[cfe-dev] Why is #pragma STDC FENV_ACCESS not supported?
On 8 Jan 2018 19:50, "Hal Finkel via cfe-dev" <cfe-dev at lists.llvm.org> wrote: On 01/08/2018 07:06 PM, Richard Smith via llvm-dev wrote: On 8 January 2018 at 11:15, Kaylor, Andrew via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi Kevin, > > Thanks for reaching out about this, and thanks especially for offering to > help. I've had some other