Displaying 15 results from an estimated 15 matches for "isdereferenceablepoint".
Did you mean:
isdereferenceablepointer
2015 Jan 17
2
[LLVMdev] How to test isDereferenceablePointer?
I'm have a
[PATCH] isDereferenceablePointer: look through gc.relocates
and I want to know how to test this patch. So far, I've found one
candiate: speculative execution in SimplifyCFG
(test/Transforms/SimplifyCFG/SpeculativeExec.ll). However, it's
somewhat involved to show that SimplifyCFG does kick in for
gc.relocate. Is there a...
2015 Mar 16
4
[LLVMdev] possible addrspacecast problem
Given a pointer, does any addrspacecast affect the pointer's
dereferenceablity ? For example,
%pm = addrspaacecast float addrspacecast(n)* %pn to float
addrspacecast(m)*
%r = load float addrspace(m)* %pm
In another word. the question is whether the following is true ?
isDereferenceablePointer(pn) == isDereferenceablePointer(pm)
[Note that the function is defined as
Value.cpp:isDereferenceaablePointer(const Value*, ...) ]
The reason I am asking this is that the current LLVM thinks the answer is
yes
(they are the same). But for the following case, it will make
non-speculative
l...
2015 Jan 20
2
[LLVMdev] How to test isDereferenceablePointer?
...erations on it.
Nick
You have to construct a
> transformation which happens with the information you added and not
> otherwise.
>
> The easiest case might be LICM.
>
> Philip
>
> On 01/17/2015 11:25 AM, Ramkumar Ramachandra wrote:
>> I'm have a
>> [PATCH] isDereferenceablePointer: look through gc.relocates
>>
>> and I want to know how to test this patch. So far, I've found one
>> candiate: speculative execution in SimplifyCFG
>> (test/Transforms/SimplifyCFG/SpeculativeExec.ll). However, it's
>> somewhat involved to show that SimplifyC...
2015 Feb 09
2
[LLVMdev] DataLayout missing in isDereferenceablePointer()
Eric Christopher wrote:
> How are you trying to call it? Do you have a DataLayout?
In test/Analysis/ValueTracking/memory-dereferenceable.ll, just change
byval to dereferenceable(8), and %dparam won't match (see
lib/IR/Value.cpp:521 for the logic that is supposed to fire). How do I
get it to pass? I tried introducing a target-triple and
target-datalayout, but it didn't help.
2015 Feb 09
2
[LLVMdev] DataLayout missing in isDereferenceablePointer()
Hi,
I've been debugging this issue for many hours, and would like a sanity
check. The issue is that DL (DataLayout) is nullptr inside
isDereferenceablePointer() no matter what I try. Why is DataLayout
ever nullptr (shouldn't it get defaults?), and what should I do to
make it non-nullptr?
Thanks.
Ram
2015 Apr 24
2
[LLVMdev] Speculative loads and alignment
...nters derived from allocas and global variables. But in other cases it scans the local BB to see if the pointer is already being loaded or stored from/to. In the latter case there can be a load/store with an alignment smaller than requested.
In most cases this function is used in conjunction with isDereferenceablePointer: isDereferenceablePointer || isSafeToLoadUnconditionally. So if a pointer is dereferenceable there will be no alignment check.
isSafeToSpeculativelyExecute doesn't care about alignment at all. It only checks for pointer dereferenceability. However according to the description it must check...
2012 Jan 23
4
[LLVMdev] Safe loads
...of loops. At the moment, there doesn't seem to be a mechanism for
doing so. There seem to be two ways of implementing this: either allow
arbitrary instructions to be marked as safe and have
Instruction::isSafeToSpeculativelyExecute return true for those or mark
memory regions and extend Value::isDereferenceablePointer to return true
for those. Is either of these a good idea? Or is there some other way to
do this? FWIW, I quickly prototyped instruction marking using metadata and
that seemed to work well enough for us.
Roman
2012 Aug 20
3
[LLVMdev] How to Identify if an Argument is a pointer?
Hello,
I was wondering how you can identify whether or not an Argument is a
pointer. The "isDereferenceablePointer" function for Values doesn't
seem to be what I want (I don't care whether or not the pointer points
to allocated memory or is suitably aligned). I want to be able to
discern between:
i32* %pArray
and
i32 %pArray
Thanks in advance.
- John
2012 Jan 24
0
[LLVMdev] Safe loads
...ment, there doesn't seem to be a mechanism for
> doing so. There seem to be two ways of implementing this: either allow
> arbitrary instructions to be marked as safe and have
> Instruction::isSafeToSpeculativelyExecute return true for those or mark
> memory regions and extend Value::isDereferenceablePointer to return true
> for those. Is either of these a good idea? Or is there some other way to
> do this? FWIW, I quickly prototyped instruction marking using metadata and
> that seemed to work well enough for us.
I think that marking the load with metadata would make sense. Is it safe to l...
2012 Jan 24
1
[LLVMdev] Safe loads
...n't seem to be a mechanism for
>> doing so. There seem to be two ways of implementing this: either allow
>> arbitrary instructions to be marked as safe and have
>> Instruction::isSafeToSpeculativelyExecute return true for those or mark
>> memory regions and extend Value::isDereferenceablePointer to return true
>> for those. Is either of these a good idea? Or is there some other way to
>> do this? FWIW, I quickly prototyped instruction marking using metadata and
>> that seemed to work well enough for us.
>
> I think that marking the load with metadata would make s...
2012 Aug 20
0
[LLVMdev] How to Identify if an Argument is a pointer?
You can use isPointerTy() in Type class.
George
On Mon, Aug 20, 2012 at 12:39 PM, John Backes <back0145 at umn.edu> wrote:
> Hello,
>
> I was wondering how you can identify whether or not an Argument is a
> pointer. The "isDereferenceablePointer" function for Values doesn't
> seem to be what I want (I don't care whether or not the pointer points
> to allocated memory or is suitably aligned). I want to be able to
> discern between:
>
> i32* %pArray
>
> and
>
> i32 %pArray
>
> Thanks in advanc...
2011 Dec 15
0
[LLVMdev] nsw is still logically inconsistent
...n testcase, LICM will hoist everything except the div
> instruction.
LICM on ToT hoists the div. Even speculatively.
The other thing is that div is just one example. The problem could
also come up with an array load with an index could be safe to
speculate if the index is known to be bounded. isDereferenceablePointer
currently doesn't know how to do this, but it'll probably get
smarter some day.
Dan
2011 Dec 17
1
[LLVMdev] nsw is still logically inconsistent
> LICM on ToT hoists the div. Even speculatively.
>
> The other thing is that div is just one example. The problem could
> also come up with an array load with an index could be safe to
> speculate if the index is known to be bounded. isDereferenceablePointer
> currently doesn't know how to do this, but it'll probably get
> smarter some day.
So, looking at just this example, it looks like semantics we assign to
poison values have to do one of
*) Avoid the udiv being moved, since a valid removal of nsw would create
a program that is now...
2011 Dec 14
2
[LLVMdev] nsw is still logically inconsistent
2011/12/14 Rafael Ávila de Espíndola <rafael.espindola at gmail.com>:
>> We first perform a speculation transformation, hoisting all of the
>> code above the %overflow_check branch:
>>
>> %t0 = add nsw i32 %a, %b
>> %t1 = sext i32 %t0 to i64
>> %t2 = ashr i64 %t1, 31
>> %t3 = add i64 %t2, 1
>> %t5 = icmp ult %t3, 2
>> %t6 =
2016 Apr 26
2
Writing a pass to retrieve instruction operand value
Hi Everyone,
I asked a question on the dev list related to the topic to which John
Criswell and Jeremy Lakeman kindly provided some valuable insight.
I'm still stuck on the issue and i'm hoping i didn't phrase the question
well enough.
I have a *foo.c* file that is :
*#include <stdio.h>*
*int foo(int a, int b){*
* return a+b;*
*}*
*int main() {*
*int x=foo(3,1); *