- May 05, 2015
-
-
Pete Cooper authored
This reverts commit 963cdbccf6e5578822836fd9b2ebece0ba9a60b7 (ie r236514) This is to get the bots green while i investigate. llvm-svn: 236518
-
Pete Cooper authored
This reverts commit b27413cbfd78d959c18e713bfa271fb69e6b3303 (ie r236515). This is to get the bots green while i investigate the failures. llvm-svn: 236517
-
Chaoren Lin authored
Summary: - Denormalized path on Windows host causes bad `A` packet. - Executables copied from Windows host doesn't have executable bits. Reviewers: tberghammer, zturner, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9492 llvm-svn: 236516
-
Pete Cooper authored
A regmask (typically seen on a call) clobbers the set of registers it lists. The IfConverter, in UpdatePredRedefs, was handling register defs, but not regmasks. These are slightly different to a def in that we need to add both an implicit use and def to appease the machine verifier. Otherwise, uses after the if converted call could think they are reading an undefined register. Reviewed by Matthias Braun and Quentin Colombet. llvm-svn: 236515
-
Pete Cooper authored
The code was basically the same here already. Just added an out parameter for a vector of seen defs so that UpdatePredRedefs can call StepForward first, then do its own post processing on the seen defs. Will be used in the next commit to also handle regmasks. llvm-svn: 236514
-
Diego Novillo authored
llvm-svn: 236513
-
David Blaikie authored
llvm-svn: 236512
-
Daniel Berlin authored
It got this in some cases (if one of them was an identified object), but not in all cases. This caused stores to undef to block load-forwarding in some cases, etc. Added test to Transforms/GVN to verify optimization occurs as expected. llvm-svn: 236511
-
David Blaikie authored
llvm-svn: 236510
-
Chaoren Lin authored
llvm-svn: 236509
-
Reid Kleckner authored
This reverts commit r236360. This change exposed a bug in WinEHPrepare by opting win32 code into EH preparation. We already knew that WinEHPrepare has bugs, and is the status quo for x64, so I don't think that's a reason to hold off on this change. I disabled exceptions in the sanitizer tests in r236505 and an earlier revision. llvm-svn: 236508
-
Quentin Colombet authored
This patch introduces a new pass that computes the safe point to insert the prologue and epilogue of the function. The interest is to find safe points that are cheaper than the entry and exits blocks. As an example and to avoid regressions to be introduce, this patch also implements the required bits to enable the shrink-wrapping pass for AArch64. ** Context ** Currently we insert the prologue and epilogue of the method/function in the entry and exits blocks. Although this is correct, we can do a better job when those are not immediately required and insert them at less frequently executed places. The job of the shrink-wrapping pass is to identify such places. ** Motivating example ** Let us consider the following function that perform a call only in one branch of a if: define i32 @f(i32 %a, i32 %b) { %tmp = alloca i32, align 4 %tmp2 = icmp slt i32 %a, %b br i1 %tmp2, label %true, label %false true: store i32 %a, i32* %tmp, align 4 %tmp4 = call i32 @doSomething(i32 0, i32* %tmp) br label %false false: %tmp.0 = phi i32 [ %tmp4, %true ], [ %a, %0 ] ret i32 %tmp.0 } On AArch64 this code generates (removing the cfi directives to ease readabilities): _f: ; @f ; BB#0: stp x29, x30, [sp, #-16]! mov x29, sp sub sp, sp, #16 ; =16 cmp w0, w1 b.ge LBB0_2 ; BB#1: ; %true stur w0, [x29, #-4] sub x1, x29, #4 ; =4 mov w0, wzr bl _doSomething LBB0_2: ; %false mov sp, x29 ldp x29, x30, [sp], #16 ret With shrink-wrapping we could generate: _f: ; @f ; BB#0: cmp w0, w1 b.ge LBB0_2 ; BB#1: ; %true stp x29, x30, [sp, #-16]! mov x29, sp sub sp, sp, #16 ; =16 stur w0, [x29, #-4] sub x1, x29, #4 ; =4 mov w0, wzr bl _doSomething add sp, x29, #16 ; =16 ldp x29, x30, [sp], #16 LBB0_2: ; %false ret Therefore, we would pay the overhead of setting up/destroying the frame only if we actually do the call. ** Proposed Solution ** This patch introduces a new machine pass that perform the shrink-wrapping analysis (See the comments at the beginning of ShrinkWrap.cpp for more details). It then stores the safe save and restore point into the MachineFrameInfo attached to the MachineFunction. This information is then used by the PrologEpilogInserter (PEI) to place the related code at the right place. This pass runs right before the PEI. Unlike the original paper of Chow from PLDI’88, this implementation of shrink-wrapping does not use expensive data-flow analysis and does not need hack to properly avoid frequently executed point. Instead, it relies on dominance and loop properties. The pass is off by default and each target can opt-in by setting the EnableShrinkWrap boolean to true in their derived class of TargetPassConfig. This setting can also be overwritten on the command line by using -enable-shrink-wrap. Before you try out the pass for your target, make sure you properly fix your emitProlog/emitEpilog/adjustForXXX method to cope with basic blocks that are not necessarily the entry block. ** Design Decisions ** 1. ShrinkWrap is its own pass right now. It could frankly be merged into PEI but for debugging and clarity I thought it was best to have its own file. 2. Right now, we only support one save point and one restore point. At some point we can expand this to several save point and restore point, the impacted component would then be: - The pass itself: New algorithm needed. - MachineFrameInfo: Hold a list or set of Save/Restore point instead of one pointer. - PEI: Should loop over the save point and restore point. Anyhow, at least for this first iteration, I do not believe this is interesting to support the complex cases. We should revisit that when we motivating examples. Differential Revision: http://reviews.llvm.org/D9210 <rdar://problem/3201744> llvm-svn: 236507
-
Lang Hames authored
llvm-svn: 236506
-
Reid Kleckner authored
While I'm here, fix a copy-paste bug so we get debug info for these tests. llvm-svn: 236505
-
Daniel Sanders authored
I tracked down the bug to an unchecked malloc in SmallVectorBase::grow_pod(). This malloc is returning NULL on my machine when running under bugpoint but not when -enable-valgrind is given. llvm-svn: 236504
-
Kit Barton authored
It adds v1i128 to the appropriate register classes and checks parameter passing and return values. This is related to http://reviews.llvm.org/D9081, which will add instructions that exploit the v1i128 datatype. Phabricator review: http://reviews.llvm.org/D9475 llvm-svn: 236503
-
Pavel Labath authored
Summary: This change removes the thread state coordinator thread by making all the operations it was performing synchronous. In order to prevent deadlock, NativeProcessLinux must now always call m_monitor->DoOperation with the m_threads_mutex released. This is needed because HandleWait callbacks lock the mutex (which means the monitor thread will block waiting on whoever holds the lock). If the other thread now requests a monitor operation, it will wait for the monitor thread do process it, creating a deadlock. To preserve this invariant I have introduced two new Monitor commands: "begin operation block" and "end operation block". They begin command blocks the monitor from processing waitpid events until the corresponding end command, thereby assuring the monitor does not attempt to acquire the mutex. Test Plan: Run the test suite locally, verify no tests fail. Reviewers: vharron, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9227 llvm-svn: 236501
-
Pavel Labath authored
This reverts commit 193ac6993b64a502db6dc7f2d69dafc47c318407. The buildbot says the test still fails. :) llvm-svn: 236500
-
Pavel Labath authored
The test has passed in the last 300 runs for me, enabling to see what the buildbot says. llvm-svn: 236498
-
Igor Laevsky authored
Differential Revision: http://reviews.llvm.org/D9326 llvm-svn: 236497
-
Pavel Labath authored
the test has passed in the last 300 runs, enabling to see what the build bot says. Also, downgrading skipIfGcc to XFAIL, with plans of enabling it in the future if it shows to be working. llvm-svn: 236496
-
Pavel Labath authored
This test has been working reliably for me in the last 300 test runs. Enabling to see what the buildbot thinks... llvm-svn: 236495
-
Daniel Sanders authored
Summary: When using the N64 ABI, element-indices use the i64 type instead of i32. In many cases, we can use iPTR to account for this but additional patterns and pseudo's are also required. This fixes most (but not quite all) failures in the test-suite when using N64 and MSA together. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9342 llvm-svn: 236494
-
Alexey Bataev authored
llvm-svn: 236493
-
Ismail Donmez authored
and Redhat currently. Reviewed by Jonathan Roelofs. llvm-svn: 236492
-
Alexey Bataev authored
Destructors are never called for cleanups, so we can't use SmallVector as a member. Differential Revision: http://reviews.llvm.org/D9399 llvm-svn: 236491
-
Alexey Bataev authored
llvm-svn: 236490
-
Daniel Sanders authored
Summary: This required adding instruction aliases for dneg. N64 will be enabled shortly but requires additional bugfixes. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9341 llvm-svn: 236489
-
Daniel Jasper authored
Optional methods use ? tokens like this: interface X { y?(): z; } It seems easiest to detect and disambiguate these from ternary expressions by checking if the code is in a declaration context. Turns out that that didn't quite work properly for interfaces in Java and JS, and for JS file root contexts. Patch by Martin Probst, thank you. llvm-svn: 236488
-
Alexey Bataev authored
Destructors are never called for cleanups, so we can't use SmallVector as a member. Differential Revision: http://reviews.llvm.org/D9399 llvm-svn: 236487
-
Aidan Dodds authored
http://reviews.llvm.org/D9473 llvm-svn: 236486
-
Daniel Jasper authored
Patch by Martin Probst. llvm-svn: 236485
-
Dmitry Vyukov authored
This is required for Java support, as real PCs don't work for Java. llvm-svn: 236484
-
Alexey Bataev authored
Due to some incompatibilities with Windows. llvm-svn: 236483
-
Alexey Bataev authored
Destructors are never called for cleanups, so we can't use SmallVector as a member. Differential Revision: http://reviews.llvm.org/D9399 llvm-svn: 236482
-
Alexey Bataev authored
Due to some incompatibilities with Windows. llvm-svn: 236481
-
Alexey Bataev authored
Destructors are never called for cleanups, so we can't use SmallVector as a member. Differential Revision: http://reviews.llvm.org/D9399 llvm-svn: 236480
-
Alexey Bataev authored
For tasks codegen for private/firstprivate variables are different rather than for other directives. 1. Build an internal structure of privates for each private variable: struct .kmp_privates_t. { Ty1 var1; ... Tyn varn; }; 2. Add a new field to kmp_task_t type with list of privates. struct kmp_task_t { void * shareds; kmp_routine_entry_t routine; kmp_int32 part_id; kmp_routine_entry_t destructors; .kmp_privates_t. privates; }; 3. Create a function with destructors calls for all privates after end of task region. kmp_int32 .omp_task_destructor.(kmp_int32 gtid, kmp_task_t *tt) { ~Destructor(&tt->privates.var1); ... ~Destructor(&tt->privates.varn); return 0; } 4. Perform initialization of all firstprivate fields (by simple copying for POD data, copy constructor calls for classes) + provide address of a destructor function after kmpc_omp_task_alloc() and before kmpc_omp_task() calls. kmp_task_t *new_task = __kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry); CopyConstructor(new_task->privates.var1, *new_task->shareds.var1_ref); new_task->shareds.var1_ref = &new_task->privates.var1; ... CopyConstructor(new_task->privates.varn, *new_task->shareds.varn_ref); new_task->shareds.varn_ref = &new_task->privates.varn; new_task->destructors = .omp_task_destructor.; kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task) Differential Revision: http://reviews.llvm.org/D9370 llvm-svn: 236479
-
Jason Molenda authored
compact unwind encodings for x86_64 / i386 omit-frame-pointer code. It was possible for lldb to get the location of saved registers incorrect for some of these functions. <rdar://problem/20753264> llvm-svn: 236478
-
Jason Molenda authored
llvm-svn: 236477
-