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

127343 Commits

Author SHA1 Message Date
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
Geoff Berry
16f8ead77d [AArch64] AArch64LoadStoreOptimizer: fix bug in pre-inc check iterator
Summary:
Fix case where a pre-inc/dec load/store would not be formed if the
add/sub that forms the inc/dec part of the operation was the first
instruction in the block being examined.

Reviewers: mcrosier, jmolloy, t.p.northover, junbuml

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

llvm-svn: 260275
2016-02-09 20:47:21 +00:00
Chad Rosier
c7429053bb [AArch64] Bail even earlier if the instructions modifieds the base register. NFC.
llvm-svn: 260274
2016-02-09 20:44:41 +00:00
Chad Rosier
e20f1c74ed [AArch64] Simplify. NFC.
llvm-svn: 260273
2016-02-09 20:27:45 +00:00
Chad Rosier
cb79de089b [AArch64] Add an assert to ensure we don't scale an offset that can't be scaled.
llvm-svn: 260272
2016-02-09 20:18:07 +00:00
Ehsan Akhgari
f9c82ec597 Fix a typo in r260263
llvm-svn: 260269
2016-02-09 20:02:35 +00:00
Chad Rosier
dd552205e1 [AArch64] Add a FIXME about invalid KILL markers after the ld/st opt pass.
llvm-svn: 260264
2016-02-09 19:42:19 +00:00
Ehsan Akhgari
48aefced4b llvm-config: Add preliminary Windows support
Summary:
This patch adds Windows support for a few of the llvm-config commands,
including cflags, ldflags, libs, and system-libs.

Currently llvm-config is untested, so this patch adds tests for the
commands that it fixes as well.

Reviewers: rnk

Subscribers: llvm-commits

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

llvm-svn: 260263
2016-02-09 19:41:14 +00:00
Ehsan Akhgari
cfc837ef51 Turn on LLVM_ENABLE_PLUGINS by default on Windows
Reviewers: rnk

Subscribers: llvm-commits

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

llvm-svn: 260262
2016-02-09 19:37:27 +00:00
Ehsan Akhgari
fec20f48cd Add support for importing and exporting Registry objects on Windows
On Windows, the DLL containing the registry will get its own global head
and tail variables, so the entries registered in the DLL will be
invisible to the consumer.

In order to solve this, we need to export a getter function from the
plugin DLL per registry and copy over the data inside it.  This patch
adds support for this.  This will be used to support clang plugins on
Windows.

llvm-svn: 260261
2016-02-09 19:37:25 +00:00
Chad Rosier
8d7cb088ae [AArch64] Remove redundant calls and clang format. NFC.
llvm-svn: 260260
2016-02-09 19:33:42 +00:00
Colin LeMahieu
7d2b0f70e8 [Hexagon] Fixing relocation generation and adding tests.
llvm-svn: 260259
2016-02-09 19:18:02 +00:00
Colin LeMahieu
270ce6c950 [MC] Adding GOTREL expression variant.
llvm-svn: 260258
2016-02-09 19:17:34 +00:00
Chad Rosier
b34ba75bdc [AArch64] Hoist now common logic. NFC.
llvm-svn: 260257
2016-02-09 19:17:18 +00:00