Displaying 20 results from an estimated 49 matches for "downcasting".
Did you mean:
downcasing
2013 Nov 25
2
[LLVMdev] How do downcast signed integers?
I was looking at "trunc" to downcast a signed integer, say sint32 to
sint16, but it seems to handle unsigned integers only. How do you downcast
a signed integer?
P.S. This question is for my "Mapping High-Level Constructs to LLVM IR"
document :-)
-- Mikael
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2013 Nov 25
0
[LLVMdev] How do downcast signed integers?
Hello
> I was looking at "trunc" to downcast a signed integer, say sint32 to sint16,
> but it seems to handle unsigned integers only.
No. In twos-complement notation (which LLVM assumes) there no
difference between signed and unsigned truncation - you just throw out
the spare sign bits and that's all.
Please note that that the "numbers" in LLVM IR is neither signed
2016 Jul 11
2
[PATCH] D22161: SystemZ: Avoid implicit iterator conversions, NFC
> On 2016-Jul-11, at 09:05, Ulrich Weigand <ulrich.weigand at de.ibm.com> wrote:
>
> uweigand accepted this revision.
> uweigand added a comment.
> This revision is now accepted and ready to land.
>
> I'll defer to your expertise on that. Patch looks good to me.
>
> I guess I'm not fully familiar with some of the C++ language details here. Would you
2008 May 24
8
[LLVMdev] Advice on CFG pre-analysis
In the language I am working on, there are cases where the call flow
graph can affect the type of a variable. A simple example is a
"nullable" type (a pointer which is allowed to be NULL), which can be
converted into a non-nullable type via an if-test. So for example if x
is nullable, and I test x != NULL, then inside the conditional block the
type of x is no longer nullable.
2017 Feb 16
2
[PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long
On Wed, Feb 15, 2017 at 04:37:49PM -0500, Waiman Long wrote:
> The cpu argument in the function prototype of vcpu_is_preempted()
> is changed from int to long. That makes it easier to provide a better
> optimized assembly version of that function.
>
> For Xen, vcpu_is_preempted(long) calls xen_vcpu_stolen(int), the
> downcast from long to int is not a problem as vCPU number
2017 Feb 16
2
[PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long
On Wed, Feb 15, 2017 at 04:37:49PM -0500, Waiman Long wrote:
> The cpu argument in the function prototype of vcpu_is_preempted()
> is changed from int to long. That makes it easier to provide a better
> optimized assembly version of that function.
>
> For Xen, vcpu_is_preempted(long) calls xen_vcpu_stolen(int), the
> downcast from long to int is not a problem as vCPU number
2008 May 28
0
[LLVMdev] Advice on CFG pre-analysis
On May 23, 2008, at 11:53 PM, Talin wrote:
> In the language I am working on, there are cases where the call flow
> graph can affect the type of a variable.
Ok.
> A simple example is a
> "nullable" type (a pointer which is allowed to be NULL), which can be
> converted into a non-nullable type via an if-test. So for example if x
> is nullable, and I test x != NULL,
2011 Aug 31
2
[LLVMdev] A pass to minimize instruction bitwidth?
...wer 6 bits we could also propagate this
change backwards to reduce the bitwidth of prior instructions.
I'm synthesizing hardware from LLVM IR so these non-standard bitwidths
can actually save chip area.
I've started writing a pass to do this but I figured there might be an
existing pass for downcasting 64-bit operations to 32-bit operations
that I could borrow code from.
Thanks,
Andrew
2015 Apr 18
2
[LLVMdev] Does LLVM optimize rudimentary i16 -> i32 conversions
In my language there are a lot of i16 definitions, but almost all of the
time they are upgraded to i32 because my add operations only happen on i32.
So to be representative to my language definition, I have a lots of
Sext/Zext and Truncs pretty much every time I add or subtract.
As soon as I pass through InstCombine things look much nicer, all the
upcasts and downcasts go away, but my test cases
2015 Oct 21
3
ilist/iplist are broken (maybe I'll fix them?)
"Duncan P. N. Exon Smith via llvm-dev" <llvm-dev at lists.llvm.org> writes:
>> On 2015-Oct-20, at 11:23, Reid Kleckner <rnk at google.com> wrote:
>>
>> I think the implicit iterator conversions are much less important
>> now that we have range based for loops, but I still like having
>> them.
>
> IMO, if a developer has an ilist iterator
2015 Oct 20
2
ilist/iplist are broken (maybe I'll fix them?)
I think the implicit iterator conversions are much less important now that
we have range based for loops, but I still like having them.
On Tue, Oct 20, 2015 at 11:13 AM, Duncan P. N. Exon Smith via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
> > On 2015-Oct-07, at 17:57, Duncan P. N. Exon Smith <dexonsmith at apple.com>
> wrote:
> >
> > I've been
2015 Dec 04
1
A few questions about libvorbis from a newbie
Hello Martin,
> how a number of samples with no defined size is translated into 8, 16, or 32 bit values in my buffer
Although I do not know in detail about the actual implementation of libvorbis, most of the decoders should internally produce single-precision (32bit) floating point values, or 32bit integers as the result of PCM decoding.
They are downcast to PCM samples with 8bit, 16bit, or
2008 May 24
0
[LLVMdev] Advice on CFG pre-analysis
On May 24, 2008, at 02:53, Talin wrote:
> In the language I am working on, there are cases where the call flow
> graph can affect the type of a variable. A simple example is a
> "nullable" type (a pointer which is allowed to be NULL), which can
> be converted into a non-nullable type via an if-test. So for example
> if x is nullable, and I test x != NULL, then
2015 Nov 13
5
How to efficiently extract the calledFunction from a complex CallInst?
Hi all,
Usually if we want to get the called Function we can directly use
CallInst->getCalledFunction(), however, today i encounter an unusual
CallInst as follows:
%call11 = call double (...)* bitcast (double ()* @quantum_frand to double
(...)*)()
the original C source involve type cast:
float u,v;
extern double quantum_frand();
u = 2 * quantum_frand() - 1;
v = 2 * quantum_frand() -
2008 May 28
3
[LLVMdev] Advice on CFG pre-analysis
Thanks (everyone) for the suggestions, they were helpful.
What I decided to do was to essentially "wrap" LLVM's BasicBlock
structure with my own block class that contains additional high-level
information. Up to this point I was generating LLVM basic blocks on the
fly as I walked the statement tree; Now I build my own BB graph, and
then use that to generate the BB graph for
2019 Oct 01
2
Proposal for llvm.experimental.gc intrinsics for inttoptr and ptrtoint
For a datapoint, Julia uses the following function description to implement
approximately the capability of those functions. We then also verify that
there's no direct inttoptr/ptrtoint into our gc-tracked AddressSpace with a
custom verifier pass (among other sanity checks). I can provide additional
details and pointers to our gc-root tracking algorithm implementation if
desired (I also plan
2017 Feb 15
4
[PATCH v4 0/2] x86/kvm: Reduce vcpu_is_preempted() overhead
v3->v4:
- Fix x86-32 build error.
v2->v3:
- Provide an optimized __raw_callee_save___kvm_vcpu_is_preempted()
in assembly as suggested by PeterZ.
- Add a new patch to change vcpu_is_preempted() argument type to long
to ease the writing of the assembly code.
v1->v2:
- Rerun the fio test on a different system on both bare-metal and a
KVM guest. Both sockets were
2017 Feb 15
4
[PATCH v4 0/2] x86/kvm: Reduce vcpu_is_preempted() overhead
v3->v4:
- Fix x86-32 build error.
v2->v3:
- Provide an optimized __raw_callee_save___kvm_vcpu_is_preempted()
in assembly as suggested by PeterZ.
- Add a new patch to change vcpu_is_preempted() argument type to long
to ease the writing of the assembly code.
v1->v2:
- Rerun the fio test on a different system on both bare-metal and a
KVM guest. Both sockets were
2017 Feb 15
0
[PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long
The cpu argument in the function prototype of vcpu_is_preempted()
is changed from int to long. That makes it easier to provide a better
optimized assembly version of that function.
For Xen, vcpu_is_preempted(long) calls xen_vcpu_stolen(int), the
downcast from long to int is not a problem as vCPU number won't exceed
32 bits.
Signed-off-by: Waiman Long <longman at redhat.com>
---
2017 Feb 16
0
[PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long
On 02/16/2017 11:09 AM, Peter Zijlstra wrote:
> On Wed, Feb 15, 2017 at 04:37:49PM -0500, Waiman Long wrote:
>> The cpu argument in the function prototype of vcpu_is_preempted()
>> is changed from int to long. That makes it easier to provide a better
>> optimized assembly version of that function.
>>
>> For Xen, vcpu_is_preempted(long) calls xen_vcpu_stolen(int),