Commit Graph

206442 Commits

Author SHA1 Message Date
Chih-Hung Hsieh 1e859582d6 Implement target independent TLS compatible with glibc's emutls.c.
The 'common' section TLS is not implemented.
Current C/C++ TLS variables are not placed in common section.
DWARF debug info to get the address of TLS variables is not generated yet.

clang and driver changes in http://reviews.llvm.org/D10524

  Added -femulated-tls flag to select the emulated TLS model,
  which will be used for old targets like Android that do not
  support ELF TLS models.

Added TargetLowering::LowerToTLSEmulatedModel as a target-independent
function to convert a SDNode of TLS variable address to a function call
to __emutls_get_address.

Added into lib/Target/*/*ISelLowering.cpp to call LowerToTLSEmulatedModel
for TLSModel::Emulated. Although all targets supporting ELF TLS models are
enhanced, emulated TLS model has been tested only for Android ELF targets.
Modified AsmPrinter.cpp to print the emutls_v.* and emutls_t.* variables for
emulated TLS variables.
Modified DwarfCompileUnit.cpp to skip some DIE for emulated TLS variabls.

TODO: Add proper DIE for emulated TLS variables.
      Added new unit tests with emulated TLS.

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

llvm-svn: 243438
2015-07-28 16:24:05 +00:00
Martell Malone 1eff5c9c09 Summary:
Object: add IMAGE_FILE_MACHINE_ARM64

The official specifications state that the value of IMAGE_FILE_MACHINE_ARM64
is 0xAA64 (as per the Microsoft Portable Executable and Common Object Format
Specification v8.3).

Reviewers: rnk

Subscribers: llvm-commits, compnerd, ruiu

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

llvm-svn: 243434
2015-07-28 16:18:17 +00:00
Ed Maste 5bfed4a77f Update xcode for r243427
llvm-svn: 243432
2015-07-28 16:11:12 +00:00
Piotr Padlewski 44b4ce8e9b Getting rid of old iterator loops
llvm-svn: 243431
2015-07-28 16:10:58 +00:00
Bruno Cardoso Lopes 51fd242cfc [LVI] Cleanup whitespaces. NFC
llvm-svn: 243430
2015-07-28 15:53:21 +00:00
Manuel Klimek 9e32199861 Do not force linebreaks when MaxEmptyLinesToKeep is 0.
Previously we would format
 call(

     p);
as
 call(
     p);
with MaxEmptyLinesToKeep == 0.

Now we format it as:
  call(p);

llvm-svn: 243429
2015-07-28 15:50:24 +00:00
Ed Maste 7d47b7a294 Remove two additional files missed in r243427
llvm-svn: 243428
2015-07-28 15:48:38 +00:00
Ed Maste fe5a6428b8 Remove POSIX thread/process abstraction
As of r240543 ProcessPOSIX and POSIXThread are used only on FreeBSD, so
just roll them into ProcessFreeBSD and FreeBSDThread.

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

llvm-svn: 243427
2015-07-28 15:45:57 +00:00
Kuba Brecka cd7720c970 Fix typo from r243418. Should fix the failing `abort_on_error.cc` test.
See http://reviews.llvm.org/D7203

llvm-svn: 243426
2015-07-28 15:43:45 +00:00
Benjamin Kramer c385a808b8 [CodeGen] Clean up CGBuiltin a bit.
- Use cached LLVM types
- Turn SmallVectors into Arrays/ArrayRef if the size is static
- Use ConstantInt::get's implicit splatting for vector types

No functionality change intended.

llvm-svn: 243425
2015-07-28 15:40:11 +00:00
Sanjay Patel d411114e77 fix formatting; NFC
llvm-svn: 243424
2015-07-28 15:38:43 +00:00
Kuba Brecka a0905079d5 Applying the Darwin-specific default lit ASAN_OPTIONS to UBSan+ASan tests as
well. Should fix the test failures after r243418, see review at
http://reviews.llvm.org/D7203.

llvm-svn: 243423
2015-07-28 15:35:04 +00:00
Geoff Berry c573bf7a5f [AArch64] Match float round and convert to int instructions.
Summary:
Add patterns for doing floating point round with various rounding modes
followed by conversion to int as a single FCVT* instruction.

Reviewers: t.p.northover, jmolloy

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

llvm-svn: 243422
2015-07-28 15:24:10 +00:00
Pavel Labath 4b7dc299c2 Fix typo in gdbremote.py
llvm-svn: 243421
2015-07-28 15:13:23 +00:00
Tobias Grosser 922452285a Keep track of ScopArrayInfo objects that model PHI node storage
Summary:
When translating PHI nodes into memory dependences during code generation we
require two kinds of memory. 'Normal memory' as for all scalar dependences and
'PHI node memory' to store the incoming values of the PHI node. With this
patch we now mark and track these two kinds of memories, which we previously
incorrectly marked as a single memory object.

Being aware of PHI node storage makes code generation easier, as we do not need
to guess what kind of storage a scalar reference requires. This simplifies the
code nicely.

Reviewers: jdoerfert

Subscribers: pollydev, llvm-commits

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

llvm-svn: 243420
2015-07-28 14:53:44 +00:00
Douglas Katzman 280ee917d7 Use a specified list of languages in cmake project() command.
This allows asm files and Cxx files to be compiled with different flags
rather than treating them identically. LLVM itself has no asm files
other than tests, but this setting is inherited by the compiler-rt
project (unless compiled standalone), which does have asm files.

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

llvm-svn: 243419
2015-07-28 14:43:53 +00:00
Kuba Brecka 873855e291 [asan] Set abort_on_error=1 by default on OS X
This sets the default ASan flags to abort_on_error=1 on OS X. For unit tests and lit tests we set ASAN_OPTIONS back to abort_on_error=0 before running the tests (to avoid crashing). I added two tests that intentionally don't respect the default ASAN_OPTIONS to test the behavior of an empty ASAN_OPTIONS (on OS X we should crash, on Linux we should exit()).

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

llvm-svn: 243418
2015-07-28 14:34:13 +00:00
Kristof Beyls 918f8ab7c6 RegParmMax must be 0 for AArch64, as the regparm function attribute is not supported on AArch64.
llvm-svn: 243417
2015-07-28 14:23:47 +00:00
Silviu Baranga 4825060059 [LAA] Add clarifying comments for the checking pointer grouping algorithm. NFC
llvm-svn: 243416
2015-07-28 13:44:08 +00:00
Marshall Clow bcbc37d8a1 Consolidate a bunch of #ifdef _LIBCPP_NO_EXCEPTIONS .. #endif blocks into a single template function. NFC
llvm-svn: 243415
2015-07-28 13:30:47 +00:00
Daniel Jasper 542482e63d misc-unused-parameters: Only remove parameters in the main source file.
In headers, they might always be pulled in to different TUs, even if
they are declared static or nested in an unnamed namespace.

llvm-svn: 243414
2015-07-28 13:19:12 +00:00
Adhemerval Zanella 3916c910d1 [AArch64] Implement __builtin_thread_pointer
This path add the aarch64 __builtin_thread_pointer support.  It will be
lowered to llvm.aarch64.thread.pointer.

llvm-svn: 243413
2015-07-28 13:10:10 +00:00
Adhemerval Zanella 7bc3319d84 Implement __builtin_thread_pointer
This path add the aarch64 lowering of __builtin_thread_pointer.  It uses
the already implemented AArch64ISD::THREAD_POINTER used in TLS generation.

llvm-svn: 243412
2015-07-28 13:03:31 +00:00
Tobias Grosser 9696a3f903 Do not compile GPU library with sanitizers
llvm-svn: 243411
2015-07-28 12:51:23 +00:00
Tobias Grosser 43bf4553fd Extend documentation of scalar code generation [NFC]
No functional change intended

--
Reviewers: jdoerfert

Projects: #polly

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

llvm-svn: 243410
2015-07-28 12:12:04 +00:00
Asaf Badouh 93aa4c808a [X86][AVX512VL] add AVX512VL intrinsics 4 out of 4
Differential Revision: http://reviews.llvm.org/D11526

llvm-svn: 243409
2015-07-28 12:04:40 +00:00
Martell Malone 182b4bbc2a docs: update arcanist links
Summary:
I need a test commit for using arc.
This seems like an appropriate commit to use as a test

We may want to port this commit back to 3.7 also

Subscribers: llvm-commits

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

llvm-svn: 243408
2015-07-28 11:43:37 +00:00
Asaf Badouh b7cf71b63d [X86][AVX512VL] add AVX512VL intrinsics 3 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243406
2015-07-28 11:14:09 +00:00
Chandler Carruth 99ad7bb49c [GMR] Teach GlobalsModRef to distinguish an important and safe case of
no-alias with non-addr-taken globals: they cannot alias a captured
pointer.

If the non-global underlying object would have been a capture were it to
alias the global, we can firmly conclude no-alias. It isn't reasonable
for a transformation to introduce a capture in a way observable by an
alias analysis. Consider, even if it were to temporarily capture one
globals address into another global and then restore the other global
afterward, there would be no way for the load in the alias query to
observe that capture event correctly. If it observes it then the
temporary capturing would have changed the meaning of the program,
making it an invalid transformation. Even instrumentation passes or
a pass which is synthesizing stores to global variables to expose race
conditions in programs could not trigger this unless it queried the
alias analysis infrastructure mid-transform, in which case it seems
reasonable to return results from before the transform started.

See the comments in the change for a more detailed outlining of the
theory here.

This should address the primary performance regression found when the
non-conservatively-correct path of the alias query was disabled.

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

llvm-svn: 243405
2015-07-28 11:11:11 +00:00
Daniel Jasper 718029ba6b misc-unused-parameters: Properly handle static class members.
Not sure why I wrote what I wrote before.

llvm-svn: 243403
2015-07-28 10:39:25 +00:00
Asaf Badouh 78ee5cc8e1 [X86][AVX512VL] add AVX512VL intrinsics 2 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243402
2015-07-28 10:30:56 +00:00
Renato Golin e51c1ce1db Improving lli documentation
Too many people hope lli would act as an emulator when it's actually
just a tool to help prototype IR code and test the JIT compiler. This
commit makes that fact explicit in the documentation

It also migrates the old style bold/italic doc tags to the preferred
meta tags (.. option::, :program:, etc).

No errors when generating the documents, visual inspection in the HTML
result doesn't show any major difference, apart from the slight style
change.

llvm-svn: 243401
2015-07-28 10:24:11 +00:00
Pavel Labath 3a29f8b9ec Fix warnings detected by -Wpessimizing-move
patch by Eugene Zelenko

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

llvm-svn: 243399
2015-07-28 09:18:32 +00:00
Alexandros Lamprineas e5b47640ee Use TargetParser to parse -mhwdiv command line option in Driver.
Change-Id: I2ebc40f77af75ec6b43ce8364d6d5a1d29988bd6
Phabricator: http://reviews.llvm.org/D11501
llvm-svn: 243398
2015-07-28 09:08:03 +00:00
Pavel Labath 424b201df7 [LLGS] Avoid bogus error message on process termination
Summary:
Handle_k was printing an error when killing a process because KillSpawnedProcess was expecting to
be asynchronously notified of the process death, which no longer works, since we don't wait for
the process on a separate thread. However, the whole usage of KillSpawnedProcess is dubious here,
since it tries to be nice and terminate the process first with SIGTERM, which will not have the
intended effect on a ptraced process. I replace this code with a call to
NativeProcessProtocol::Kill, which does not suffer from these problems.

Reviewers: chaoren, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 243397
2015-07-28 09:06:56 +00:00
Michael Kuperstein cba308cf96 [X86] Remove mergeSPUpdatesUp()
X86FrameLowering has both a mergeSPUpdates() that accepts a direction, and an
mergeSPUpdatesUp(), which seem to do the same thing, except for a slightly 
different interface. Removed the less general function.
NFC.

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

llvm-svn: 243396
2015-07-28 08:56:13 +00:00
Simon Pilgrim df984f58ad [X86][SSE] Use bitmasks instead of shuffles where possible.
VPAND is a lot faster than VPSHUFB and VPBLENDVB - this patch ensures we attempt to lower to a basic bitmask before lowering to the slower byte shuffle/blend instructions.

Split off from D11518.

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

llvm-svn: 243395
2015-07-28 08:54:41 +00:00
Asaf Badouh 74da38706e [X86][AVX512VL] add AVX512VL intrinsics 1 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243394
2015-07-28 08:26:14 +00:00
Eric Fiselier 10e51f84d4 Mark async tests as UNSUPPORTED in C++03 because it requires variadics
llvm-svn: 243393
2015-07-28 07:49:15 +00:00
Eric Fiselier abd52cad84 Fix a handful of tests that fail in C++03
llvm-svn: 243392
2015-07-28 07:31:50 +00:00
Igor Breger 47a7b95b1d AVX512: Add encoding tests to vptestnm instructions
Differential Revision: http://reviews.llvm.org/D11521

llvm-svn: 243391
2015-07-28 07:00:00 +00:00
Igor Breger 8352a0ddf2 AVX512: Implemented encoding and intrinsics for VGETEXPSS/D instructions
Added tests for intrinsics and encoding.

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

llvm-svn: 243390
2015-07-28 06:53:28 +00:00
Puyan Lotfi 567001c281 Changes for MachineBasicBlock to use SortedVector for LiveIns.
llvm-svn: 243389
2015-07-28 06:38:41 +00:00
Mehdi Amini b58f8137c1 Move the Target way of overriding DAG Scheduler to a target hook
Summary:
The previous way of overriding it was relying on calling "setDefault"
on the global registry, which implies global mutable state.

Reviewers: echristo, atrick

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243388
2015-07-28 06:18:04 +00:00
Argyrios Kyrtzidis c2a589169c [sema] Fix crash when typo-transforming an expression containing an ObjC super message expression.
rdar://21427916

llvm-svn: 243387
2015-07-28 06:12:24 +00:00
Puyan Lotfi 36b7f1d1c2 Adding ADT SortedVector; client patch will follow.
llvm-svn: 243386
2015-07-28 06:04:00 +00:00
Chandler Carruth 786e6db187 [GMR] Fix a long-standing bug in GlobalsModRef where it failed to clear
out the per-function modref data structures when functions were deleted
or when globals were deleted.

I don't actually know how the global deletion side of this bug hasn't
been hit before, but for the other it just-so-happens that functions
aren't likely to be deleted in the particular part of the LTO pipeline
where we currently enable GMR, so we got lucky.

With this patch, I can self-host with GMR enabled in the normal pass
pipeline!

I was a bit concerned about the compile-time impact of this chang, which
is part of what motivated my prior string of patches to make the
per-function datastructure very dense and fast to walk. With those
changes in place, I can't measure a significant compile time difference
(the difference is around 0.1% which is *way* below the noise) before
and after this patch when building a linked bitcode for all of Clang.

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

llvm-svn: 243385
2015-07-28 06:01:57 +00:00
Sagar Thakur 13af03286e [UBSan][MIPS] Fix cast-overflow tests for mips big endian
This fixes the bug https://llvm.org/bugs/show_bug.cgi?id=24152
The float value resides in the first 4 bytes of ValueHandle for both mips and mipsel.

Reviewers: dsanders, samsonov
Subscibers: rsmith, hans, mohit.bhakkad, jaydeep, llvm-commits
Differential: http://reviews.llvm.org/D11448
llvm-svn: 243384
2015-07-28 05:51:51 +00:00
Ilia K b56c50f0ec Support escapes and quotes in string and character values.
Summary:
Escape characters in strings and strings containing quotes were not appearing correctly in expression values.

Patch from paulmay@microsoft.com

Reviewers: abidh, ChuckR, paulmaybee

Subscribers: greggm, lldb-commits

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

llvm-svn: 243383
2015-07-28 05:43:47 +00:00
Adam Nemet 0a674401bf [LDist][LVer] Explicitly pass the set of memchecks to LoopVersioning, NFC
Before the patch, the checks were generated internally in
addRuntimeCheck.  Now, we use the new overloaded version of
addRuntimeCheck that takes the ready-made set of checks as a parameter.

The checks are now generated by the client (LoopDistribution) with the
new RuntimePointerChecking::generateChecks API.

Also the new printChecks API is used to print out the checks for
debugging.

This is to continue the transition over to the new model whereby clients
will get the full set of checks from LAA, filter it and then pass it to
LoopVersioning and in turn to addRuntimeCheck.

llvm-svn: 243382
2015-07-28 05:01:53 +00:00