Commit Graph

219748 Commits

Author SHA1 Message Date
Xinliang David Li cfefae8a14 [PGO] Add Linux specific test cases for profile runtime
Currently, only gc-sections related tests are added. Gold
linker currently is required due to PR19161 of bfd linker.

llvm-svn: 257444
2016-01-12 04:54:24 +00:00
Xinliang David Li 385612c5b4 Fix comment of test
llvm-svn: 257443
2016-01-12 03:57:14 +00:00
Bhushan D. Attarde 2be2c9a6ce [LLDB][MIPS] Merge emulation of similar instructions for MIPS64
SUMMARY:
    This patch merges emulation of similar instructions into a single function (wherever possible) to remove code duplication.
    
    Reviewers: clayborg
    Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D16051

llvm-svn: 257442
2016-01-12 03:56:58 +00:00
Bhushan D. Attarde def5e7df76 [LLDB][MIPS] Handle PIC calling convention for MIPS64
SUMMARY:
    This patch sets up register r25 with the address of function to be called in PrepareTrivialCall().
    This is required as per MIPS PIC calling convention.
    
    Reviewers: clayborg
    Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D16046

llvm-svn: 257441
2016-01-12 03:48:43 +00:00
Dan Gohman 1a42728719 [WebAssembly] Implement a prototype instruction encoder and disassembler.
This is using an extremely simple temporary made-up binary format, not the
official binary format (which isn't defined yet).

llvm-svn: 257440
2016-01-12 03:32:29 +00:00
Dan Gohman afd7e3ada8 [WebAssembly] Register the MC subtarget info.
llvm-svn: 257439
2016-01-12 03:30:06 +00:00
Dan Gohman a11fb2373c [WebAssembly] Define OperandTypes for decoding immediate values.
llvm-svn: 257438
2016-01-12 03:09:16 +00:00
Davide Italiano 15414cd0a7 [ELF] FreeBSD has slightly different emulation strings for PPC.
Teach lld about them.

llvm-svn: 257437
2016-01-12 02:58:59 +00:00
Dan Gohman a1df528a84 [WebAssembly] Define a custom segment type for function definitions.
Since function definitions are not loaded into the address space, PT_LOAD is
inappropriate. PT_WEBASSEMBLY_FUNCTIONS is used to identify where the function
definitions are so that they can be processed at program startup time.

llvm-svn: 257436
2016-01-12 02:58:12 +00:00
Kostya Serebryany 4174005622 [libFuzzer] when a new unit is discovered using a dictionary, print all used dictionary entries
llvm-svn: 257435
2016-01-12 02:36:59 +00:00
Kostya Serebryany 859e86d962 [libFuzzer] add various debug prints. Also don't mutate based on a cmp trace like (a eq a) or (a neq a)
llvm-svn: 257434
2016-01-12 02:08:37 +00:00
Dan Gohman 85159ca224 [WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.
llvm-svn: 257433
2016-01-12 01:45:12 +00:00
Rui Ueyama 94b08e3bf0 Simplify. NFC.
llvm-svn: 257432
2016-01-12 01:33:23 +00:00
NAKAMURA Takumi 0c0fc25e72 OrcRemoteTargetServer.h: Suppress a warning. [-Wunused-variable]
FIXME: It may return ErrorOr.
llvm-svn: 257431
2016-01-12 01:23:43 +00:00
NAKAMURA Takumi 65c4eafaa5 lli: Fix warnings. [-Wsign-compare]
llvm-svn: 257430
2016-01-12 01:23:30 +00:00
Stephane Sezer 8dbcb63866 Get rid of ARM_ELF_SYM_IS_THUMB flag.
Summary:
This was used with the old ARM vs. Thumb detection code but is not
required anymore.

Reviewers: tberghammer, clayborg

Subscribers: fjricci, aemerson, lldb-commits, rengolin

Differential Revision: http://reviews.llvm.org/D16099

llvm-svn: 257429
2016-01-12 01:12:10 +00:00
Manman Ren ed967f3752 CXX_FAST_TLS calling convention: performance improvement for x86-64.
This is the same change on x86-64 as r255821 on AArch64.
rdar://9001553

llvm-svn: 257428
2016-01-12 01:08:46 +00:00
Justin Bogner 921b04e9a4 LoopUnroll: Make canUnrollCompletely static - it doesn't use any state. NFC
llvm-svn: 257427
2016-01-12 01:06:32 +00:00
Justin Bogner a1dd493159 LoopUnroll: Clean up the maze of initialization for unroll parameters. NFC
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
2016-01-12 00:55:26 +00:00
Manman Ren 5e9e65e705 CXX_FAST_TLS calling convention: performance improvement for ARM.
This is the same change on ARM as r255821 on AArch64.
rdar://9001553

llvm-svn: 257424
2016-01-12 00:47:18 +00:00
Kostya Serebryany e3580956ea [libFuzzer] extend the weak memcmp/strcmp/strncmp interceptors to receive the result of the computations. With that, don't do any mutations if memcmp/etc returned 0
llvm-svn: 257423
2016-01-12 00:43:42 +00:00
Marshall Clow 7087a51b13 Put the definition of _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK in the right place.
llvm-svn: 257422
2016-01-12 00:38:04 +00:00
Rui Ueyama 902c75cd7b Remove dead code.
llvm-svn: 257421
2016-01-12 00:32:49 +00:00
Teresa Johnson 5fe40050bd [IRMover] Don't copy personality, etc unless creating def
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
2016-01-12 00:24:24 +00:00
Lang Hames b15b5e9218 [Orc] XFAIL a few remote-jit test cases that I missed in r257391.
llvm-svn: 257419
2016-01-11 23:57:39 +00:00
Rui Ueyama f949f7f15e Merge two small functions. NFC.
llvm-svn: 257418
2016-01-11 23:50:55 +00:00
Manman Ren 1602605bf8 CXX_FAST_TLS calling convention: Add support for ARM on Darwin.
rdar://9001553

llvm-svn: 257417
2016-01-11 23:50:43 +00:00
Dan Gohman 26c6765bd6 [WebAssembly] Define WebAssembly-specific relocation codes.
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
2016-01-11 23:38:05 +00:00
Reid Kleckner 5fb7a586e9 Avoid the deprecated GetVersionEx API
Apparently the preferred version is the incredibly complicated
VerifyVersionInfoW function.

Rename the function to avoid potential future name clashes.

llvm-svn: 257415
2016-01-11 23:33:03 +00:00
Sanjay Patel e896ede7f1 [LibCallSimplifier] use instruction-level fast-math-flags to transform log calls
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
2016-01-11 23:31:48 +00:00
Justin Lebar 7bf779859a [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.
Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

Differential Revision: http://reviews.llvm.org/D16079

llvm-svn: 257413
2016-01-11 23:27:13 +00:00
Rafael Espindola 36a425b618 Remove a bugs assert.
There is no reason the value being printed has to be positive.
Fixes pr25802.

llvm-svn: 257412
2016-01-11 23:21:45 +00:00
Justin Lebar d98cea8c8b Add an Action* member to InputInfo.
Summary:
The CUDA toolchain needs to know which Actions created which InputInfos,
because it needs to attach GPU archs to the various InputInfos.

Reviewers: echristo

Subscribers: jfb, dschuff, jhen, tra, cfe-commits

Differential Revision: http://reviews.llvm.org/D16078

llvm-svn: 257411
2016-01-11 23:15:21 +00:00
NAKAMURA Takumi d9d2a896fa lli-child-target: Introduce a new dependency on RuntimeDyld.
llvm-svn: 257410
2016-01-11 23:12:30 +00:00
Zachary Turner 00cdc77ac9 Don't define Bytes and String to be the same number on Py2.
This is causing issues with case labels having the same value.

llvm-svn: 257409
2016-01-11 23:10:32 +00:00
Justin Lebar 9eaa4893ef Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam.
Summary: Explicit is better than implicit.

Reviewers: echristo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16013

llvm-svn: 257408
2016-01-11 23:09:32 +00:00
Justin Lebar 41094615fb Move ownership of Action objects into Compilation.
Summary:
This makes constructing Action graphs which are DAGs much simpler.  It
also just simplifies in general the ownership semantics of Actions.

Depends on D15910.

Reviewers: echristo

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D15911

llvm-svn: 257407
2016-01-11 23:07:27 +00:00
Daniel Jasper f55e418247 clang-format: [JS] Teach clang-format about "export interface".
llvm-svn: 257406
2016-01-11 22:57:40 +00:00
Omair Javaid baa07490bc Xfail some Arm-Linux specific failures
Updated expectedFailureLinux decorator to reflect architecture

Marked some triaged failures as xfails on arm with updated expectedFailureLinux decorator

Differential revision: http://reviews.llvm.org/D15893

llvm-svn: 257405
2016-01-11 22:52:18 +00:00
Sanjay Patel 6c1ddbb7b6 [LibCallSimplifier] don't allow sqrt transform unless all ops are unsafe
Fix the FIXME added with:
http://reviews.llvm.org/rL257400

llvm-svn: 257404
2016-01-11 22:50:36 +00:00
Richard Smith 38c202e97e When a tag is declared in prototype scope in C, if we've decided that it
redeclares an existing tag but are creating a new declaration anyway (because
it has attributes or changes the visibility of the name), don't warn that it
won't be visible outside the current scope. That's not true.

Also narrow down the set of cases where we create these extra declarations when
building modules; previously, all tag declarations but the first in a module
header would get this treatment if -fmodules-local-submodule-visibility. (This
isn't a functional change, but we try to avoid creating these extra
declarations whenever we can.)

llvm-svn: 257403
2016-01-11 22:41:53 +00:00
Justin Bogner 0fb7ed5726 LoopUnroll: Use the optsize threshold for minsize as well
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
2016-01-11 22:39:43 +00:00
Sanjay Patel 9f67dadea2 more space; NFC
llvm-svn: 257401
2016-01-11 22:35:39 +00:00
Sanjay Patel 683f29735f [LibCallSimplifier] use instruction-level fast-math-flags to transform sqrt 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
2016-01-11 22:34:19 +00:00
Sanjay Patel 34ea70a5c9 getParent()->getParent() == getFunction() and clang-format ; NFC
llvm-svn: 257399
2016-01-11 22:24:35 +00:00
Zachary Turner 7a76845c48 Fix Python 3 issues related to OS plugins.
* lldb::tid_t was being converted incorrectly, so this is updated to use
PythonInteger instead of manual Python Native API calls.
* OSPlugin_RegisterContextData was assuming that the result of
  get_register_data was a string, when in fact it is a bytes.  So this
  method is updated to use PythonBytes to do the work.

llvm-svn: 257398
2016-01-11 22:16:17 +00:00
Zachary Turner 5a72c02be9 Introduce a PythonBytes class into PythonDataObjects.
This class behaves the same as PythonString on Python2, but differently
on Python3.  Unittests are added as well.

llvm-svn: 257397
2016-01-11 22:16:12 +00:00
Sanjay Patel 472cc78ccb don't repeat function names in comments; NFC
llvm-svn: 257396
2016-01-11 22:14:42 +00:00
Rafael Espindola 5a7756044f Add a missing error handling to llvm-lto.
llvm-svn: 257395
2016-01-11 22:08:22 +00:00
Dan Gohman f225a63849 [WebAssembly] Reorganize address offset folding.
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
2016-01-11 22:05:44 +00:00