1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

127256 Commits

Author SHA1 Message Date
Hemant Kulkarni
7bee7c2cd0 Revert "[llvm-readobj] Option to emit readelf like output"
This reverts commit a58765909660a7195b32e0cc8c7476168b913750.

llvm-svn: 260397
2016-02-10 18:21:01 +00:00
Reid Kleckner
ca045b462c [pdbdump] Fix test for different type ordering with DIA 2015
llvm-svn: 260396
2016-02-10 18:17:17 +00:00
Teresa Johnson
aef9d8ceab [ThinLTO] Move global processing from Linker to TransformUtils (NFC)
Summary:
As discussed on IRC, move the ThinLTOGlobalProcessing code out of
the linker, and into TransformUtils. The name of the class is changed
to FunctionImportGlobalProcessing.

Reviewers: joker.eph, rafael

Subscribers: joker.eph, llvm-commits

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

llvm-svn: 260395
2016-02-10 18:11:31 +00:00
Xinliang David Li
51f86026b3 [PGO] coverage map bug with cov data produced for 32bit target
Fix the result truncation bug: [PR26560]
Test case is following (compiler-rt).
 

llvm-svn: 260393
2016-02-10 17:57:08 +00:00
Hemant Kulkarni
bb26477ebd [llvm-nm] Add -radix option
Differential Revision: http://reviews.llvm.org/D16822

llvm-svn: 260392
2016-02-10 17:51:39 +00:00
Hemant Kulkarni
212037f7cf [llvm-readobj] Option to emit readelf like output
New option --elf-output-style=LLVM or GNU
Enables -file-headers in readelf style when elf-output-style=GNU

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

llvm-svn: 260391
2016-02-10 17:51:28 +00:00
James Y Knight
529a53c338 [SPARC] Repair floating-point condition encodings in assembly parser.
The encodings for floating point conditions A(lways) and N(ever) were
incorrectly specified for the assembly parser, per Sparc manual v8 page
121. This change corrects that mistake.

Also, strangely, all of the branch instructions already had MC test
cases, except for the broken ones. Added the tests.

Patch by Chris Dewhurst

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

llvm-svn: 260390
2016-02-10 17:47:20 +00:00
Daniel Berlin
95ef8800a5 Rename a member variable to be more accurate with how it is used
llvm-svn: 260389
2016-02-10 17:41:25 +00:00
Daniel Berlin
06f04c3940 Constify two functions, make them accessible to unit tests
llvm-svn: 260387
2016-02-10 17:39:43 +00:00
Ehsan Akhgari
e16e097859 Disable all llvm-config tests for now, will investigate later
llvm-svn: 260386
2016-02-10 17:29:50 +00:00
Rong Xu
846b326ad9 [PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
This patch uses one bit in profile version to differentiate Clang
instrumentation and IR level instrumentation profiles.

PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so
that the compiler runtime can set the right profile kind.
For Maco-O platform, we generate the variable as linkonce_odr linkage as
COMDAT is not supported.

PGOInstrumenation now checks this bit to make sure it's an IR level
instrumentation profile.

The patch was submitted as r260164 but reverted due to a Darwin test breakage.
Original Differential Revision: http://reviews.llvm.org/D15540

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

llvm-svn: 260385
2016-02-10 17:18:30 +00:00
Chad Rosier
4c1db07ad4 [AArch64] This bit of logic is specific to pairing. NFC.
llvm-svn: 260383
2016-02-10 15:52:46 +00:00
Teresa Johnson
142f505f7b Fix VST_CODE_* bitcode id comments (NFC)
llvm-svn: 260382
2016-02-10 15:02:51 +00:00
Andrey Turetskiy
b4ff8194a0 [X86] Fix stack alignment for MCU target, by Anton Nadolskiy.
This patch fixes stack alignments for MCU (should be aligned to 4 bytes).

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

llvm-svn: 260375
2016-02-10 11:57:06 +00:00
Dylan McKay
35d0ab1842 [AVR] Add instruction definitions
Summary: Add the AVR instruction tablegen definitions.

Reviewers: stoklund, hfinkel, dsanders, arsenm, vkalintiris

Subscribers: dylanmckay, agnat, rjordans, llvm-commits

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

llvm-svn: 260363
2016-02-10 08:55:23 +00:00
Xinliang David Li
0c2d7cc3bc [PGO] fix prof symbol lookup bug
Patch by Rong Xu

The problem is exposed by intra-module indirect call promotion where
prof symtab is created from module which does not contain all symbols
from the program. With partial symtab, the result needs to be checked
more strictly.
 

llvm-svn: 260361
2016-02-10 06:36:55 +00:00
JF Bastien
de7879a249 X86: Remove useless semicolon
llvm-svn: 260359
2016-02-10 04:04:12 +00:00
NAKAMURA Takumi
f197a07b5b llvm-config: Fix DLL prefix on cygming.
For example, LLVMSupport takes the form of LLVMSupport.dll, not libLLVMSupport.dll.

llvm-svn: 260351
2016-02-10 03:09:13 +00:00
NAKAMURA Takumi
b793573c04 llvm-config: Quick fix for cross compilation. Don't be confsed between host and target. It has been there since r252532.
FIXME: The clause may use conditions of host compiler, not HOST_TRIPLE.
llvm-svn: 260343
2016-02-10 01:12:55 +00:00
Tom Stellard
d81656340b StructurizeCFG: Initialize SkipUniformRegions in the default constructor
This should fix some random bot failures caused by r260336.

llvm-svn: 260342
2016-02-10 01:10:09 +00:00
Reid Kleckner
30549aa2c3 Revert "Turn on LLVM_ENABLE_PLUGINS by default on Windows"
This reverts r260262, it broke some LLVM tests (bugpoint).

llvm-svn: 260339
2016-02-10 01:06:37 +00:00
Lang Hames
5d09e23f7a [Orc] Add lazy-JITting support for i386.
This patch adds a new class, OrcI386, which contains the hooks needed to
support lazy-JITing on i386 (currently only for Pentium 2 or above, as the JIT
re-entry code uses the FXSAVE/FXRSTOR instructions).

Support for i386 is enabled in the LLI lazy JIT and the Orc C API, and
regression and unit tests are enabled for this architecture.

llvm-svn: 260338
2016-02-10 01:02:33 +00:00
Tom Stellard
0a59f0ceeb StructurizeCFG: Add an option for skipping regions with only uniform branches
Summary:
Tests for this will be added once the AMDGPU backend enables this
option.

Reviewers: arsenm

Subscribers: llvm-commits

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

llvm-svn: 260336
2016-02-10 00:39:37 +00:00
Amaury Sechet
ecd50f3e0c Add support for struct in C API test
Summary: As per title. This also include extra support for insertvalue and extracvalue.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 260335
2016-02-10 00:38:50 +00:00
Amaury Sechet
cd1fa43291 Add binding for counting argument and find called value of call and invoke instruction from the C API.
Summary: As per title. This remove the need to rely on internal knowledge of call and invoke instruction to find called value and argument count.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

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

llvm-svn: 260332
2016-02-10 00:09:37 +00:00
Tim Northover
c74a4e9807 ARM: improve documentation slightly.
It seems the ARMv8 instruction set overview is no longer provided by ARM, so
I've removed it. Since most of the other documents were the same I unified the
two sections.

llvm-svn: 260329
2016-02-09 23:55:48 +00:00
Sanjay Patel
f3f4f7a88a [x86] convert masked load of exactly one element to scalar load
This is the load counterpart to the store optimization that was added in:
http://reviews.llvm.org/rL260145

llvm-svn: 260325
2016-02-09 23:44:35 +00:00
Amaury Sechet
dfe90fdcf0 Split clone value and instruction in the echo C API test
Summary: This is a bit of refactoring required to be able to generate instruction in forward basic block. This, for instance, is a requirement for phi in loops.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

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

llvm-svn: 260324
2016-02-09 23:41:20 +00:00
Amaury Sechet
352aef6336 Add icmp and conditional branches in the C API echo test.
Summary:
Improving coverage.

Depends on D16912 .

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 260321
2016-02-09 23:15:02 +00:00
Justin Lebar
f16a73d9fa Add convergent-removing bits to FunctionAttrs pass.
Summary:
Remove the convergent attribute on any functions which provably do not
contain or invoke any convergent functions.

After this change, we'll be able to modify clang to conservatively add
'convergent' to all functions when compiling CUDA.

Reviewers:  jingyue, joker.eph

Subscribers: llvm-commits, tra, jhen, hfinkel, resistor, chandlerc, arsenm

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

llvm-svn: 260319
2016-02-09 23:03:22 +00:00
Justin Lebar
6380a76968 Update documentation about convergent attribute.
Summary:
Be more explicit about what 'convergent' means, and indicate that the
compiler may remove the attribute from a function if it can prove that
the function doesn't in fact execute any convergent ops.

Reviewers: resistor, jingyue, joker.eph

Subscribers: hfinkel, chandlerc, arsenm, jhen, tra, llvm-commits

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

llvm-svn: 260318
2016-02-09 23:03:17 +00:00
Peter Collingbourne
e87706e06b Fix GCC build.
llvm-svn: 260317
2016-02-09 23:01:38 +00:00
Ahmed Bougacha
f23bc5a4de [CodeGen] Prefer "if (SDValue R = ...)" to "if (R.getNode())". NFCI.
llvm-svn: 260316
2016-02-09 22:54:12 +00:00
Ahmed Bougacha
3589294b5a [X86] Don't reuse an unrelated variable, create a new one. NFC.
Using Op makes it look like we're doing something with it.
We're really not.

llvm-svn: 260315
2016-02-09 22:54:05 +00:00
Ahmed Bougacha
68b447ec28 [X86] Remove unnecessary assignment. NFC.
llvm-svn: 260314
2016-02-09 22:53:58 +00:00
Amaury Sechet
d4ff40d570 Add C binding for AllocaInst::getAllocatedType
Summary:
Comes with an awesome test.

Depends on D16912

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 260313
2016-02-09 22:50:53 +00:00
Peter Collingbourne
54e8749794 WholeProgramDevirt: introduce.
This pass implements whole program optimization of virtual calls in cases
where we know (via bitset information) that the list of callees is fixed. This
includes the following:

- Single implementation devirtualization: if a virtual call has a single
  possible callee, replace all calls with a direct call to that callee.

- Virtual constant propagation: if the virtual function's return type is an
  integer <=64 bits and all possible callees are readnone, for each class and
  each list of constant arguments: evaluate the function, store the return
  value alongside the virtual table, and rewrite each virtual call as a load
  from the virtual table.

- Uniform return value optimization: if the conditions for virtual constant
  propagation hold and each function returns the same constant value, replace
  each virtual call with that constant.

- Unique return value optimization for i1 return values: if the conditions
  for virtual constant propagation hold and a single vtable's function
  returns 0, or a single vtable's function returns 1, replace each virtual
  call with a comparison of the vptr against that vtable's address.

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

llvm-svn: 260312
2016-02-09 22:50:34 +00:00
Amaury Sechet
ef4c99d35b Improve the C API echo test tool to emit basic block is the right order.
Summary: As per title. Also add a facility method to get the name of a basic block from the C API.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 260309
2016-02-09 22:36:41 +00:00
Simon Atanasyan
b8beb47094 [mips] Extend MipsAsmParser class to handle %got(sym + const) expressions
Now the parser supports `%got(sym)` expressions only but `%got(sym + const)`
variant is also valid and accepted by GAS.

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

llvm-svn: 260305
2016-02-09 22:31:49 +00:00
Sanjoy Das
d436ec9768 [MemoryBuiltins] Fix an issue with hasNoAliasAttr
Summary:
`hasNoAliasAttr` is buggy: it checks to see if the called function has
a `noalias` attribute, which is incorrect since functions are not even
allowed to have the `noalias` attribute.  The comment on its only
caller, `llvm::isNoAliasFn`, makes it pretty clear that the intention
to do the `noalias` check on the return value, and not the callee.

Unfortunately I couldn't find a way to test this upstream -- fixing
this does not change the observable behavior of any of the passes that
use this.  This is not very surprising, since `noalias` does not tell
anything about the contents of the allocated memory (so, e.g., you
still cannot fold loads).  I'll be happy to be proven wrong though.

Reviewers: chandlerc, reames

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 260298
2016-02-09 21:54:18 +00:00
Philip Reames
bcbb054410 [Verifier] Add checks for masked.load and masked.store intrinsics
While trying to track down what appears to be a LoopVectorizer bug, I noticed that we had no validation of the correctness of calls emitted to @llvm.masked.load and @llvm.masked.store.  This meant malformed IR was showing up much much later than it should.  Hopefully, having Verifier rules in place will make this easier to isolate.

llvm-svn: 260296
2016-02-09 21:43:12 +00:00
Sanjay Patel
4c9e344480 [SelectionDAG] make getMemBasePlusOffset() accessible; NFCI
I reinvented this functionality in http://reviews.llvm.org/D16828 because it was
hidden away as a static function. The changes in x86 are not based on a complete
audit. I suspect there are other possible uses there, and there are almost certainly
more potential users in other targets.

llvm-svn: 260295
2016-02-09 21:42:04 +00:00
Rafael Espindola
f2a7a6879a This brings back commit r259578.
But now it follows the llvm style, uses an early return and doesn't
include a file named 1.o.

llvm-svn: 260293
2016-02-09 21:39:49 +00:00
Rafael Espindola
177e57db60 Fix name style.
Functions start with a lower case, variables with an upper case.

llvm-svn: 260287
2016-02-09 21:35:14 +00:00
Rafael Espindola
4315fd4954 Update comment style.
llvm-svn: 260286
2016-02-09 21:32:56 +00:00
Rafael Espindola
d8ee2fc3b7 Revert "Correct size calculations for ELF files"
This reverts commit r259578.

There are enough issues with this small patch that it is better to
revert and then commit a fixed version (will be committed shortly).

llvm-svn: 260285
2016-02-09 21:30:10 +00:00
Chad Rosier
44ba21a425 [AArch64] This check is specific to merging instructions. NFC.
llvm-svn: 260283
2016-02-09 21:20:12 +00:00
Ehsan Akhgari
638983e561 Remove system-libs.test for now
This test fails in the ninja-x64-msvc-RA-centos6 builder, so the
UNSUPPORTED: system-windows condition is insufficient.  Removing it
for now; I will investigate how this can be fixed later.

llvm-svn: 260281
2016-02-09 21:17:58 +00:00
Ehsan Akhgari
3cc7d4398a Fix a test added in r260263
llvm-svn: 260280
2016-02-09 21:10:22 +00:00
Philip Reames
0e7cbf4f20 [InstCombine][GC] Handle gc.relocations of vector type
We introduced gc.relocates of vector-of-pointer types a couple of weeks back.  Somehow, I missed updating the InstCombine rule to account for this.  If we hit this code path with a vector-of-pointers gc.relocate, we'd crash on a cast<PointerType>.

I also took the chance to do a bit of code style cleanup.

llvm-svn: 260279
2016-02-09 21:09:22 +00:00