Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] How to test isDereferenceablePointer?"
2015 Jan 20
2
[LLVMdev] How to test isDereferenceablePointer?
Philip Reames wrote:
> T.M.K., there's no direct way to test it.
There is. See the 'unittests/' directory which contains the C++ unit
tests. See unittests/IR/UserTest.cpp for an example that builds up IR
from a .ll-in-a-C-string then queries C++ API operations on it.
Nick
You have to construct a
> transformation which happens with the information you added and not
>
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
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 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 Apr 24
2
[LLVMdev] Speculative loads and alignment
Hi,
There are several optimizations where we try to load speculatively. There are also two similar functions to determine whether it's a safe transformation:
* isSafeToLoadUnconditionally
* isSafeToSpeculativelyExecute
isSafeToLoadUnconditionally tries to take load alignment into account but fails to do this in some cases. It checks alignment for pointers derived from allocas and global
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 23
4
[LLVMdev] Safe loads
Hello,
For the Glasgow Haskell Compiler's backend, we would like to let LLVM know
that certain loads are safe to execute speculatively and hence to hoist
out 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
2012 Jan 24
0
[LLVMdev] Safe loads
On Jan 23, 2012, at 4:22 AM, Roman Leshchinskiy wrote:
> Hello,
>
> For the Glasgow Haskell Compiler's backend, we would like to let LLVM know
> that certain loads are safe to execute speculatively and hence to hoist
> out 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
>
2012 Jan 24
1
[LLVMdev] Safe loads
On 24/01/2012, at 20:39, Chris Lattner wrote:
> On Jan 23, 2012, at 4:22 AM, Roman Leshchinskiy wrote:
>
>> Hello,
>>
>> For the Glasgow Haskell Compiler's backend, we would like to let LLVM know
>> that certain loads are safe to execute speculatively and hence to hoist
>> out of loops. At the moment, there doesn't seem to be a mechanism for
>>
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
2011 Dec 15
0
[LLVMdev] nsw is still logically inconsistent
On Dec 14, 2011, at 12:11 PM, Eli Friedman wrote:
> 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
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
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); *
2004 Nov 15
0
[LLVMdev] Fixes for windows version
Morten,
I've applied these patches. Thanks for the updates!
Reid.
On Mon, 2004-11-15 at 01:26, Morten Ofstad wrote:
> Hi,
>
> when I updated the sources today there were several small problems that
> stopped the windows version from compiling, here are the patches
>
> m.
>
>
> ______________________________________________________________________
> Index:
2004 Nov 15
2
[LLVMdev] Fixes for windows version
Hi,
when I updated the sources today there were several small problems that
stopped the windows version from compiling, here are the patches
m.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32patches.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041115/34634455/attachment.txt>
2004 Dec 03
0
[LLVMdev] [Fwd: Updated LLVM Visual Studio project files]
On Fri, 3 Dec 2004, Reid Spencer wrote:
> Could someone please apply this patch to the Win32 support so that
> Morten and Jeff can handle the recent changes? I can't do it because
> I"m on the road with only email access.
I'd be happy to do it. Can someone send me the patch as an attachment
off-list?
-Chris
> > <Tool
> >
2010 Oct 01
2
[LLVMdev] CMake "sudo make install" & headers
Sorry for the rapid fire replies, but this configuration works for me:
install(DIRECTORY include/
DESTINATION include
# FILES_MATCHING
PATTERN "*.def"
PATTERN "*.h"
PATTERN "*.td"
PATTERN "*.inc"
PATTERN ".svn" EXCLUDE
)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
DESTINATION include
# FILES_MATCHING
PATTERN
2010 Oct 01
0
[LLVMdev] CMake "sudo make install" & headers
On Thu, Sep 30, 2010 at 3:08 PM, Samuel Williams
<space.ship.traveller at gmail.com> wrote:
> Hi,
>
> I might just be doing something stupid, but when I do
>
> $ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-2.8 -DCMAKE_BUILD_TYPE=Release ..
> $ sudo make install
>
> I don't get the expected headers in
> /usr/local/llvm-2.8/include/llvm
>
> It is
2004 Dec 03
2
[LLVMdev] [Fwd: Updated LLVM Visual Studio project files]
Could someone please apply this patch to the Win32 support so that
Morten and Jeff can handle the recent changes? I can't do it because
I"m on the road with only email access.
Thanks,
Reid.
-----Forwarded Message-----
> From: Morten Ofstad <morten at hue.no>
> To: Reid Spencer <reid at x10sys.com>
> Subject: Updated LLVM Visual Studio project files
> Date: Thu,