Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] scalarrepl tuning"
2017 Sep 20
0
Jump Threading duplicates dbg.declare intrinsics for fragments, bug?
Hi all,
Thanks for the answers!
I feel like I've hijacked your thread now though Björn, sorry for that.
But from the answers it sounds like there is agreement that it's
reasonable to remove the duplicates as done in Björn's patch?
---
A couple of more things around the problem I saw.
On 09/19/2017 05:40 PM, Adrian Prantl wrote:
> A dbg.declare describes a stack-allocated
2018 Feb 01
0
llvm.memcpy for struct copy
On 31 Jan 2018, at 17:36, Jakub (Kuba) Kuderski via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> If you want to get rid of memcpy altogether, you can take a look at this pass: https://github.com/seahorn/seahorn/blob/master/lib/Transforms/Scalar/PromoteMemcpy.cc .
There are at least four different places in LLVM where memcpy intrinsics are expanded to either sequences of
2015 Mar 17
2
[LLVMdev] Alias analysis issue with structs on PPC
Hal Finkel <hfinkel at anl.gov> wrote on 16.03.2015 17:56:20:
> If you want to do it at a clang level, the right thing to do is to
> fixup the ABI lowerings for pointers to keep them pointers in this case.
> So this is an artifact of the way that we pass structures, and
> constructing a general solution at the ABI level might be tricky.
> I've cc'd Uli, who did most
2016 Mar 16
3
RFC: A change in InstCombine canonical form
=== PROBLEM === (See this bug https://llvm.org/bugs/show_bug.cgi?id=26445)
IR contains code for loading a float from float * and storing it to a float
* address. After canonicalization of load in InstCombine [1], new bitcasts
are added to the IR (see bottom of the email for code samples). This
prevents select speculation in SROA to work. Also after SROA we have
bitcasts from int32 to float.
2013 Jan 20
0
[LLVMdev] codegen of volatile aggregate copies (was "Weird volatile propagation" on llvm-dev)
As a results of my investigations, the thread is also added to cfe-dev.
The context : while porting my company code from the LLVM/Clang releases
3.1 to 3.2, I stumbled on a code size and performance regression. The
testcase is :
$ cat test.c
#include <stdint.h>
struct R {
uint16_t a;
uint16_t b;
};
volatile struct R * const addr = (volatile struct R *) 416;
void test(uint16_t a)
{
2007 May 29
4
[LLVMdev] Code generation issues
Hi,
Today I managed to link ioquake3, but generating a binary does not
work yet.
1) On OSX, I get:
Error: Code generator does not support intrinsic function
'llvm.ppc.altivec.lvsl'!
when I do: llc file.bc -march=c -o file.c
2) On Linux X86, llc does not give any problem, but I get this while
compiling the generated .c file:
error: unknown register name 'S' in
2013 Jan 18
2
[LLVMdev] Weird volatile propagation ?
Hi All,
Using clang+llvm at head, I noticed a weird behaviour with the following
reduced testcase :
$ cat test.c
#include <stdint.h>
struct R {
uint16_t a;
uint16_t b;
};
volatile struct R * const addr = (volatile struct R *) 416;
void test(uint16_t a)
{
struct R r = { a, 1 };
*addr = r;
}
$ clang -O2 -o - -emit-llvm -S -c test.c
; ModuleID = 'test.c'
target
2019 Jan 29
3
Early Tail Duplication Inefficiency
I have a file for which clang-7 takes over 2 hours to compile with -O3. For the same file, clang-5 takes less than 2 minutes (which is also high IMHO). I will try to create a test case (but it is pretty simple, it only contains initializations of many arrays of structs where the structs are of the following form:
struct Foo {
EnumType1 e1; // there are 700+ enum labels
std::string s1;
2016 Mar 16
2
RFC: A change in InstCombine canonical form
On Wed, Mar 16, 2016 at 8:34 AM, Mehdi Amini via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> How do it interact with the "typeless pointers" work?
>
Right - the goal of the typeless pointer work is to fix all these bugs
related to "didn't look through bitcasts" in optimizations. Sometimes
that's going to mean more work (because the code
2012 Sep 24
1
[LLVMdev] Heads up! New SROA implementation is going on-by-default today!
On Mon, Sep 24, 2012 at 3:41 AM, David Tweed <david.tweed at arm.com> wrote:
> Just a note that the following new regressions have started to show up on
> ARM/Linux:
>
Thanks for letting me know!
I know that there is one serious bug that would impact in BE system. I
should have that fixed today, along with a crasher. I would appreciate help
tracking down any issues once the one I
2015 Feb 18
3
[LLVMdev] Moving towards a singular pointer type
On Feb 17, 2015, at 1:58 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> I'm not actually worried about this change though Chris, at least w.r.t. optimizer changes being necessary. There are a few reasons:
>
> 1) The old ScalarRepl pass cared a *lot* about pointer type, but the new SROA doesn't care at all, so the biggest offender is essentially handled.
Why do you
2013 Jan 20
2
[LLVMdev] [cfe-dev] codegen of volatile aggregate copies (was "Weird volatile propagation" on llvm-dev)
I doubt you needed to add cfe-dev here. Sorry I hadn't seen this, this
seems like an easy and simple deficiency in the IR intrinsic for memcpy.
See below.
On Sun, Jan 20, 2013 at 1:42 PM, Arnaud de Grandmaison <
arnaud.allarddegrandmaison at parrot.com> wrote:
> define void @test(i16 zeroext %a) nounwind uwtable {
> %r.sroa.0 = alloca i16, align 2
> %r.sroa.1 = alloca i16,
2018 Feb 02
0
llvm.memcpy for struct copy
On 1 Feb 2018, at 18:39, Friedman, Eli <efriedma at codeaurora.org> wrote:
>
> On 2/1/2018 2:03 AM, David Chisnall via llvm-dev wrote:
>> In contrast, the padding between fields in non-packed structs disappears as soon as SROA runs. This can lead to violations of C semantics, where padding fields should not change (because C defines bitwise comparisons on structs using memcmp).
2013 Jan 29
0
[LLVMdev] Specify the volatile access behaviour of the memcpy, memmove and memset intrinsics
I can't think of a better way to do this, so I think it's ok.
I also submitted a complementary patch on llvm-commits clarifying volatile semantics.
-Andy
On Jan 28, 2013, at 8:54 AM, Arnaud A. de Grandmaison <arnaud.allarddegrandmaison at parrot.com> wrote:
> Hi All,
>
> In the language reference manual, the access behavior of the memcpy,
> memmove and memset
2016 Mar 22
0
RFC: A change in InstCombine canonical form
Back to the discussion on the RFC, I still see some advantage in following
the proposed solution. I see two paths forward:
1- Change canonical form, possibly lower memcpy to non-integer load and
store in InstCombine. Then teach the backends to convert that to integer
load and store if that is more profitable. Notice that we are talking about
loads that have no use other than store. So it is a
2012 Sep 22
2
[LLVMdev] Heads up! New SROA implementation is going on-by-default today!
After a lot of testing and help from Duncan, Benjamin, Joerg and others, I
think the new SROA is ready for some broader testing. I've fixed all the
crashers and miscompiles that Duncan and Joerg have been able to find
(although I'm sure there are a few left I'll tackle when there are
reports), and the LNT numbers look *really* good. Here is the latest LNT
run we got by flipping it on
2013 Nov 24
1
[LLVMdev] wrong code generation for memcpy function in SROA optimization pass
SROA optimization pass did some optimizations and transforms for memcpy function,such as ld/st operations.When someone has written down code like size>sizeof(dest) in memcpy(*dest,*src,size),
there was much likely a wrong code generation.for example,considered as such testcase:
int main()
{
char ch;
short sh = 0x1234;
memcpy(&ch,&sh,2);
printf("ch=0x%02x\n",ch);
}
At
2016 Mar 16
3
RFC: A change in InstCombine canonical form
On Wed, Mar 16, 2016 at 11:00 AM, Ehsan Amiri <ehsanamiri at gmail.com> wrote:
> David,
>
> Could you give us an update on the status of typeless pointer work? How
> much work is left and when you think it might be ready?
>
It's a bit of an onion peel, really - since it will eventually involve
generalizing/fixing every optimization that's currently leaning on typed
2008 Sep 23
3
[LLVMdev] Overzealous PromoteCastOfAllocation
Hi Dan,
> Oh, ok. So code that takes an alloca, bitcasts the address to a higher
> alignment,
Since alignment is not a property of a type, I don't think you can "bitcast to
a higher alignment" as such. I still understand what you mean, though :-)
> and then does a load or store at the higher alignment, is
> invoking undefined behavior. The alignment attribute on a load
2016 Mar 22
2
RFC: A change in InstCombine canonical form
I don't know enough about the tradeoff for 1, but 2 seems like a bandaid for something that is not a correctness issue neither a regression. I'm not sure it justifies "bandaid patches" while there is a clear path forward, i.e. typeless pointers, unless there is an acknowledgement that typeless pointers won't be there before a couple of years.
--
Mehdi
> On Mar 22, 2016,