summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* LoopUnroll: Make canUnrollCompletely static - it doesn't use any state. NFCJustin Bogner2016-01-121-11/+5
| | | | llvm-svn: 257427
* LoopUnroll: Clean up the maze of initialization for unroll parameters. NFCJustin Bogner2016-01-121-199/+141
| | | | | | | | | | The layering of where the various loop unroll parameters are initialized and overridden here was very confusing, making it pretty difficult to tell just how the various sources interacted. Instead, we put all of the initialization logic together in a single function so that it's obvious what overrides what. llvm-svn: 257426
* CXX_FAST_TLS calling convention: performance improvement for ARM.Manman Ren2016-01-128-3/+101
| | | | | | | This is the same change on ARM as r255821 on AArch64. rdar://9001553 llvm-svn: 257424
* [libFuzzer] extend the weak memcmp/strcmp/strncmp interceptors to receive ↵Kostya Serebryany2016-01-121-3/+6
| | | | | | the result of the computations. With that, don't do any mutations if memcmp/etc returned 0 llvm-svn: 257423
* [IRMover] Don't copy personality, etc unless creating defTeresa Johnson2016-01-121-0/+10
| | | | | | | | | | | | | | Function::copyAttributesFrom will copy the personality function, prefix data and prolog data from the source function to the new function, and is invoked when the IRMover copies the function prototype. This puts a reference to a constant in the source module on a function in the dest module, which causes an error when deleting the source module after importing, since the personality function in the source module still has uses (this would presumably also be an issue for the prologue and prefix data). Remove the copies added to the dest copy when creating the new prototype, as they are mapped properly when/if we link the function body. llvm-svn: 257420
* CXX_FAST_TLS calling convention: Add support for ARM on Darwin.Manman Ren2016-01-114-0/+16
| | | | | | rdar://9001553 llvm-svn: 257417
* [WebAssembly] Define WebAssembly-specific relocation codes.Dan Gohman2016-01-116-15/+59
| | | | | | | | Currently WebAssembly has two kinds of relocations; data addresses and function addresses. This adds ELF relocations for them, as well as an MC symbol kind to indicate which type of relocation is needed. llvm-svn: 257416
* Avoid the deprecated GetVersionEx APIReid Kleckner2016-01-112-10/+19
| | | | | | | | | Apparently the preferred version is the incredibly complicated VerifyVersionInfoW function. Rename the function to avoid potential future name clashes. llvm-svn: 257415
* [LibCallSimplifier] use instruction-level fast-math-flags to transform log callsSanjay Patel2016-01-111-2/+4
| | | | | | | | | | | | | | Also, add tests to verify that we're checking 'fast' on both calls of each transform pair, tighten the CHECK lines, and give the tests more meaningful names. This is a continuation of: http://reviews.llvm.org/rL255555 http://reviews.llvm.org/rL256871 http://reviews.llvm.org/rL256964 http://reviews.llvm.org/rL257400 http://reviews.llvm.org/rL257404 llvm-svn: 257414
* Remove a bugs assert.Rafael Espindola2016-01-111-2/+0
| | | | | | | There is no reason the value being printed has to be positive. Fixes pr25802. llvm-svn: 257412
* [LibCallSimplifier] don't allow sqrt transform unless all ops are unsafeSanjay Patel2016-01-111-2/+2
| | | | | | | Fix the FIXME added with: http://reviews.llvm.org/rL257400 llvm-svn: 257404
* LoopUnroll: Use the optsize threshold for minsize as wellJustin Bogner2016-01-111-4/+1
| | | | | | | | | | | | Currently we're unrolling loops more in minsize than in optsize, which means -Oz will have a larger code size than -Os. That doesn't make any sense. This resolves the FIXME about this in LoopUnrollPass and extends the optsize test to make sure we use the smaller threshold for minsize as well. llvm-svn: 257402
* more space; NFCSanjay Patel2016-01-111-0/+1
| | | | llvm-svn: 257401
* [LibCallSimplifier] use instruction-level fast-math-flags to transform sqrt ↵Sanjay Patel2016-01-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | calls This is a continuation of adding FMF to call instructions: http://reviews.llvm.org/rL255555 The intent of the patch is to preserve the current behavior of the transform except that we use the sqrt instruction's 'fast' attribute as a trigger rather than the function-level attribute. But this raises a bug noted by the new FIXME comment. In order to do this transform: sqrt((x * x) * y) ---> fabs(x) * sqrt(y) ...we need all of the sqrt, the first fmul, and the second fmul to be 'fast'. If any of those ops is strict, we should bail out. Differential Revision: http://reviews.llvm.org/D15937 llvm-svn: 257400
* getParent()->getParent() == getFunction() and clang-format ; NFCSanjay Patel2016-01-111-15/+11
| | | | llvm-svn: 257399
* don't repeat function names in comments; NFCSanjay Patel2016-01-111-88/+85
| | | | llvm-svn: 257396
* [WebAssembly] Reorganize address offset folding.Dan Gohman2016-01-111-85/+161
| | | | | | | | | | | | | Always expect tglobaladdr and texternalsym to be wrapped in WebAssemblywrapper nodes. Also, split out a regPlusGA from regPlusImm so that it can special-case global addresses, as they can be folded in more cases. Unfortunately this doesn't enable any new optimizations yet due to SelectionDAG limitations. I'll be submitting changes to the SelectionDAG infrastructure, along with tests, in a separate patch. llvm-svn: 257394
* AMDGPU: Implement {{s|u}}int_to_fp i64 -> f32Matt Arsenault2016-01-112-19/+99
| | | | | | | The old lowering for uint_to_fp failed opencl conformance. It might be OK for fast math mode, but I'm not sure. llvm-svn: 257393
* Split resolveCycles(bool AllowTemps) into two interfaces and documentTeresa Johnson2016-01-112-3/+12
| | | | | | | | | | | | | | Address review feedback from r255909. Move body of resolveCycles(bool AllowTemps) to resolveRecursivelyImpl(bool AllowTemps). Revert resolveCycles back to asserting on temps, and add new resolveNonTemporaries interface to invoke the new implementation with AllowTemps=true. Document the differences between these interfaces, specifically the effect on RAUW support and uniquing. Call appropriate interface from ValueMapper. llvm-svn: 257389
* AMDGPU: Fix crash with dispatch.ptr intrinsic with non-HSA targetMatt Arsenault2016-01-111-0/+7
| | | | | | It might be better to let this be a select failure instead. llvm-svn: 257386
* Revert "[Windows] Simplify assertion code. NFC."Reid Kleckner2016-01-111-1/+4
| | | | | | | | | | | | | This reverts commit r254363. load64BitDebugHelp() has the side effect of loading dbghelp and setting globals. It should be called in no-asserts builds as well as debug builds. llvm_unreachable is also not appropriate here, since we actually want to return if dbghelp couldn't be loaded in a non-asserts build. llvm-svn: 257384
* Use ::GetVersionEx directly rather than the Win8.1 SDK helpersReid Kleckner2016-01-111-6/+4
| | | | | | | | This removes ifdefs and fixes the build for users of the Win8.0 SDK, which I happen to be. Upgrading is not hard, but executing the same code everywhere seems better. llvm-svn: 257379
* [sanitizer] [msan] Fix origin store of array typesAdhemerval Zanella2016-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the memory sanitizer origin store instrumentation for array types. This can be triggered by cases where frontend lowers function return to array type instead of aggregation. For instance, the C code: -- struct mypair { int64_t x; int y; }; mypair my_make_pair(int64_t x, int y) { mypair p; p.x = x; p.y = y; return p; } int foo (int p) { mypair z = my_make_pair(p, 0); return z.y + z.x; } -- It will be lowered with target set to aarch64-linux and -O0 to: -- [...] define i32 @_Z3fooi(i32 %p) #0 { [...] %call = call [2 x i64] @_Z12my_make_pairxi(i64 %conv, i32 0) %1 = bitcast %struct.mypair* %z to [2 x i64]* store [2 x i64] %call, [2 x i64]* %1, align 8 [...] -- The origin store will emit a 'icmp' to test each store value again the TLS origin array. However since 'icmp' does not support ArrayType the memory instrumentation phase will bail out with an error. This patch change it by using the same strategy used for struct type on array. It fixes the 'test/msan/insertvalue_origin.cc' for aarch64 (the -O0 case). llvm-svn: 257375
* Code refactoring for commit r257278.Chen Li2016-01-111-2/+2
| | | | llvm-svn: 257366
* [NFC] Fix whitespace.Chad Rosier2016-01-111-1/+1
| | | | llvm-svn: 257365
* AMDGPU: Fix ctlz combine for sub 32-bit typesMatt Arsenault2016-01-111-6/+24
| | | | llvm-svn: 257353
* AMDGPU: Pattern match ffbh pattern to instruction.Matt Arsenault2016-01-116-24/+92
| | | | | | | | The hardware instruction's output on 0 is -1 rather than 32. Eliminate a test and select to -1. This removes an extra instruction from the compatability function with HSAIL's firstbit instruction. llvm-svn: 257352
* AMDGPU: Custom lower i64 ctlzMatt Arsenault2016-01-112-1/+60
| | | | llvm-svn: 257348
* Mips: Remove lowerSELECT_CCMatt Arsenault2016-01-112-18/+2
| | | | | | This is the same as the default expansion. llvm-svn: 257346
* LegalizeDAG: Expand ctlz with ctlz_zero_undef if legalMatt Arsenault2016-01-112-2/+15
| | | | llvm-svn: 257345
* AMDGPU: Remove dead target dag combineMatt Arsenault2016-01-111-1/+0
| | | | llvm-svn: 257344
* [LLI] Replace the LLI remote-JIT support with the new ORC remote-JIT components.Lang Hames2016-01-111-0/+5
| | | | | | | | The new ORC remote-JITing support provides a superset of the old code's functionality, so we can replace the old stuff. As a bonus, a couple of previously XFAILed tests have started passing. llvm-svn: 257343
* Revert r257164 - it has caused spec2k6 failures in LTO modeSilviu Baranga2016-01-111-322/+3
| | | | llvm-svn: 257340
* [mips] Never select JAL for calls to an absolute immediate address.Daniel Sanders2016-01-111-3/+1
| | | | | | | | | | | | | | | Summary: It actually takes an offset into the current PC-region. This fixes the 'expr' command in lldb. Reviewers: vkalintiris, jaydeep, bhushan Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D16054 llvm-svn: 257339
* [Hexagon] Add check for nullptr in getFixupNoBitsKrzysztof Parzyszek2016-01-111-15/+15
| | | | llvm-svn: 257338
* [Hexagon] Add implicit uses of GP to GP-relative loads and storesKrzysztof Parzyszek2016-01-111-1/+3
| | | | llvm-svn: 257337
* [Hexagon] Mark D14 and GP as reserved registersKrzysztof Parzyszek2016-01-111-0/+2
| | | | llvm-svn: 257336
* [X86] Reduce complexity of the LEA optimization pass, by Andrey Turetsky.Alexey Bataev2016-01-111-7/+28
| | | | | | | In the OptimizeLEA pass keep instructions' positions in the basic block saved and use them for calculation of the distance between two instructions instead of std::distance. This reduces complexity of the pass from O(n^3) to O(n^2) and thus the compile time. Differential Revision: http://reviews.llvm.org/D15692 llvm-svn: 257328
* [BranchFolding] Set correct mem refs (2nd try)Junmo Park2016-01-111-1/+1
| | | | | | | | | | | | This is a recommit of r257253 which was reverted in r257270. Previous testcase can make failure on some targets due to using opt with O3 option. Original Summary: Merge MBBICommon and MBBI's MMOs. Differential Revision: http://reviews.llvm.org/D15990 llvm-svn: 257317
* [Orc] Add support for remote JITing to the ORC API.Lang Hames2016-01-112-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds utilities to ORC for managing a remote JIT target. It consists of: 1. A very primitive RPC system for making calls over a byte-stream. See RPCChannel.h, RPCUtils.h. 2. An RPC API defined in the above system for managing memory, looking up symbols, creating stubs, etc. on a remote target. See OrcRemoteTargetRPCAPI.h. 3. An interface for creating high-level JIT components (memory managers, callback managers, stub managers, etc.) that operate over the RPC API. See OrcRemoteTargetClient.h. 4. A helper class for building servers that can handle the RPC calls. See OrcRemoteTargetServer.h. The system is designed to work neatly with the existing ORC components and functionality. In particular, the ORC callback API (and consequently the CompileOnDemandLayer) is supported, enabling lazy compilation of remote code. Assuming this doesn't trigger any builder failures, a follow-up patch will be committed which tests these utilities by using them to replace LLI's existing remote-JITing demo code. llvm-svn: 257305
* [AVX-512] Remove another extra space from the Intel syntax asm strings.Craig Topper2016-01-111-1/+1
| | | | llvm-svn: 257304
* [Orc] Rename OrcTargetSupport to OrcArchitectureSupport to avoid confusion withLang Hames2016-01-113-4/+4
| | | | | | the upcoming remote-target support classes. llvm-svn: 257302
* [AVX-512] Remove more superfluous spaces from asm strings.Craig Topper2016-01-111-6/+6
| | | | llvm-svn: 257301
* [AVX-512] Remove unused Round and Itinerary from the maskable_cmp ↵Craig Topper2016-01-111-20/+12
| | | | | | multiclasses. They weren't used and there were extra spaces in the asm string to prepare for the concatenations of the round string that wasn't ever used. llvm-svn: 257300
* [AVX-512] Make spacing between comma and {sae} operand consistent in asm ↵Craig Topper2016-01-111-10/+10
| | | | | | strings. llvm-svn: 257299
* [X86] Remove extra spaces from MPX instruction asm strings.Craig Topper2016-01-111-14/+14
| | | | llvm-svn: 257298
* [Orc] Add error codes and a new std::error_category for remote-jit errors.Lang Hames2016-01-112-0/+58
| | | | | | | These will be used by an upcoming patch that adds remote-jit support utilities to ORC. llvm-svn: 257297
* [RuntimeDyld] Add a notifyObjectLoaded method to RuntimeDyld::MemoryManager.Lang Hames2016-01-101-1/+3
| | | | | | | | This is a more generic version of the MCJITMemoryManager::notifyObjectLoaded method: It provides only a RuntimeDyld reference (rather than an ExecutionEngine), and so can be used with ORC JIT stacks. llvm-svn: 257296
* Move coveragemap_error enum into coverage namespace and InstrProf.h /NFCXinliang David Li2016-01-101-1/+1
| | | | llvm-svn: 257295
* [RuntimeDyld] Add alignment arguments to the reserveAllocationSpace method ofLang Hames2016-01-103-20/+28
| | | | | | | | | | | | | | RuntimeDyld::MemoryManager. The RuntimeDyld::MemoryManager::reserveAllocationSpace method is called when object files are loaded, and gives clients a chance to pre-allocate memory for all segments. Previously only the size of each segment (code, ro-data, rw-data) was supplied but not the alignment. This hasn't caused any problems so far, as most clients allocate via the MemoryBlock interface which returns page-aligned blocks. Adding alignment arguments enables finer grained allocation while still satisfying alignment restrictions. llvm-svn: 257294
OpenPOWER on IntegriCloud