1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

106552 Commits

Author SHA1 Message Date
Jiangning Liu
b923ade46b In Machine CSE pass, the source register of a COPY machine instruction can
be propagated to all its users, and this propagation could increase the 
probability of finding common subexpressions. If the COPY has only one user,
the COPY itself can be removed.

llvm-svn: 215344
2014-08-11 05:17:19 +00:00
Jiangning Liu
b8e38ef6d3 In LVI(Lazy Value Info), originally value on a BB can only be caculated once,
and the lattice will be updated to be a state other than "undefined". This
limiation could miss some opportunities of lowering "overdefined" to be an
even accurate value. So this patch ask the algorithm to try to lower the
lattice value again even if the value has been lowered to be "overdefined".

llvm-svn: 215343
2014-08-11 05:02:04 +00:00
Hans Wennborg
dc137d2629 Re-commit "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)
This time, also update the function that receives a reference to the SmallPtrSet as
a parameter.

llvm-svn: 215342
2014-08-11 02:50:43 +00:00
Hans Wennborg
6d6e4c6f00 Revert "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)
That broke the build:

/data/buildslave/clang-amd64-freebsd/src-llvm/lib/CodeGen/PeepholeOptimizer.cpp:729:46: error: non-const lvalue reference to type 'SmallPtrSet<[...], 8>' cannot bind to a value of unrelated type 'SmallPtrSet<[...], 16>'
        Changed |= optimizeExtInstr(MI, MBB, LocalMIs);
                                             ^~~~~~~~
/data/buildslave/clang-amd64-freebsd/src-llvm/lib/CodeGen/PeepholeOptimizer.cpp:265:49: note: passing argument to parameter 'LocalMIs' here
                 SmallPtrSet<MachineInstr*, 8> &LocalMIs) {
                                                ^

llvm-svn: 215341
2014-08-11 02:34:52 +00:00
Hans Wennborg
507c6b806e Increase the size of this SmallVector in PeepholeOptimizer.
During a Clang build, the median size of this was 9

llvm-svn: 215340
2014-08-11 02:21:34 +00:00
Hans Wennborg
6c070ac73f SubTargetFeature.cpp: it seems the size of this SmallVector should be 3
because some subtarget feature strings have three components.

llvm-svn: 215339
2014-08-11 02:21:32 +00:00
Hans Wennborg
e8fdd31002 Increase the size of SpillPlacement::BlockFrequencies.
This SmallVector's median size during a Clang build was 7.

llvm-svn: 215338
2014-08-11 02:21:30 +00:00
Hans Wennborg
ebb5866d5a LegacyPassManagers.h: increase the size of PMDataManager::HigherLevelAnalysis.
In a Clang bootstrap, the median and max size was 9.

llvm-svn: 215337
2014-08-11 02:21:25 +00:00
Hans Wennborg
c5d4967516 Increase the size of these SmallVectors in X86ISelLowering.cpp.
In a Clang bootstrap, their sizes were always 12, 16 and 16, respectively.

llvm-svn: 215336
2014-08-11 02:21:22 +00:00
Hans Wennborg
8e28b865b4 Increase the size of this SmallVector in CloneNodeWithValues.
In a Clang bootstrap, the size of this vector was always 6.

llvm-svn: 215335
2014-08-11 02:21:19 +00:00
Hans Wennborg
87cb760ef1 Increase the size of DwarfAccelTable::TableHeaderData::Atoms.
During a Clang bootstrap, it seems this SmallVector always contains 3 elements.

llvm-svn: 215334
2014-08-11 02:18:15 +00:00
Hans Wennborg
479f339393 Increase the size of PMTopLevelManager::ImmutablePasses from 8 to 16.
During a bootstrap build of Clang, this SmallVector always held 14 elements.

llvm-svn: 215333
2014-08-11 02:17:15 +00:00
Petar Jovanovic
797f98a844 Add support for scalarizing cttz_zero_undef
Follow up to r214266. Add missing case in ScalarizeVectorResult() for
cttz_zero_undef.

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

llvm-svn: 215330
2014-08-10 22:49:54 +00:00
Saleem Abdulrasool
1f058e747e ARM: correct isPredicable for MULS in ThHUMB mode
The ARM ARM states that CPSR may not be updated by a MUL in thumb mode.  Due to
an ordering of Thumb 2 Size Reduction and If Conversion, we would end up
generating a THUMB MULS inside an IT block.

The If Conversion pass uses the TTI isPredicable method to ensure that it can
transform a Basic Block.  However, because we only check for IT handling on
Thumb2 functions, we may miss some cases.  Even then, it only validates that the
CPSR is not *live* rather than it is not accessed.  This corrects the handling
for that particular case since the same restriction does not hold on the vast
majority of the instructions.

This does prevent the IfConversion optimization from kicking in in certain
cases, but generating correct code is more valuable.  Addresses PR20555.

llvm-svn: 215328
2014-08-10 22:20:37 +00:00
Joerg Sonnenberger
4a2da5b0e2 @l and friends adjust their value depending the context used in.
For ori, they are unsigned, for addi, signed. Create a new target
expression type to handle this and evaluate Fixups accordingly.

llvm-svn: 215315
2014-08-10 12:41:50 +00:00
Joerg Sonnenberger
0de4789ff8 Fix tabs.
llvm-svn: 215311
2014-08-10 11:37:07 +00:00
Joerg Sonnenberger
df2012d0aa If available, pass down the Fixup object to EvaluateAsRelocatable.
At least on PowerPC, the interpretation of certain modifiers depends on
the context they appear in.

llvm-svn: 215310
2014-08-10 11:35:12 +00:00
Saleem Abdulrasool
92b98299b9 ADT: remove MinGW32 and Cygwin OSType enum
Remove the MinGW32 and Cygwin types from the OSType enumeration.  These values
are represented via environments of Windows.  It is a source of confusion and
needlessly clutters the code.  The cost of doing this is that we must sink the
check for them into the normalization code path along with the spelling.

Addresses PR20592.

llvm-svn: 215303
2014-08-09 23:12:20 +00:00
Sanjay Patel
b734c2ca97 fixed typos
llvm-svn: 215299
2014-08-09 22:23:02 +00:00
Aaron Ballman
8207a5fba4 Resolving some type truncation warnings in MSVC (enum to bool in this case). No functional changes intended.
llvm-svn: 215293
2014-08-09 19:53:34 +00:00
Saleem Abdulrasool
90fb609805 MC: remove duplicated code
This removes the duplicate definition of GetXDataSection.  This function is
available as a static method and is identical to the previous implementation.
This just cleans up the unnecessary duplication.

llvm-svn: 215289
2014-08-09 17:21:36 +00:00
Saleem Abdulrasool
1c227c3987 MC: cleanup includes
Cleanup Win64EH header inclusion.  NFC.

llvm-svn: 215288
2014-08-09 17:21:33 +00:00
Saleem Abdulrasool
27b6989cc9 CodeGen: switch to a range based for loop
Use a range based for loop instead of manual iteration.  NFC.

llvm-svn: 215287
2014-08-09 17:21:29 +00:00
Joerg Sonnenberger
f744f70919 Allow the third argument for the subi family to be an expression.
llvm-svn: 215286
2014-08-09 17:10:26 +00:00
Roman Kashitsyn
1c7922ee2b Test commit access
llvm-svn: 215284
2014-08-09 16:05:23 +00:00
Joerg Sonnenberger
e97209dc43 Update disassembler test to check the full dccci/iccci form.
llvm-svn: 215283
2014-08-09 14:01:10 +00:00
Joerg Sonnenberger
a632bc8df4 Use the full form of dccci and iccci from the early PPC 405 documents,
since the operands are actually used on those cores. Provide aliases for
the only documented case in the newer Power ISA speec.

llvm-svn: 215282
2014-08-09 13:58:31 +00:00
Eric Christopher
3461eab467 Initialize PPC DataLayout based on the Triple only.
llvm-svn: 215281
2014-08-09 04:53:17 +00:00
Eric Christopher
846e6d954c Remove extraneous 64-bit argument to the PPC TargetMachine constructor
and update initialization.

llvm-svn: 215280
2014-08-09 04:38:56 +00:00
Eric Christopher
d181d98332 Initialize X86 DataLayout based on the Triple only.
llvm-svn: 215279
2014-08-09 04:38:53 +00:00
Matt Arsenault
a4bc0c8914 R600: Disable FP exceptions.
llvm-svn: 215277
2014-08-09 03:46:58 +00:00
Eric Christopher
f8bdb1b767 Move some X86 subtarget configuration onto the subtarget that's being
created.

llvm-svn: 215271
2014-08-09 01:07:25 +00:00
Tom Stellard
bcebb7fec6 R600/SI: Custom lower CONCAT_VECTORS
This will lower them using register copies rather than loads and stores
to the stack.

llvm-svn: 215270
2014-08-09 01:06:56 +00:00
Tom Stellard
b8bff2be44 R600/SI: Update concat_vectors.ll to check for scratch usage
These tests were using SI-NOT: MOVREL to make sure concat vectors
weren't being lowered to stack loads and stores, but we are using
scratch buffers for the stack now instead of registers, so we need
to add an additional SI-NOT check for scratch buffers.

With this change I was able to uncover one broken test which will
be fixed in a future commit.

llvm-svn: 215269
2014-08-09 01:06:53 +00:00
Rafael Espindola
4b04a0ad99 Fix expected windows result.
llvm-svn: 215267
2014-08-09 00:37:05 +00:00
Eric Christopher
638a0643ee Fix typo.
llvm-svn: 215266
2014-08-09 00:26:27 +00:00
Lang Hames
2d92265b9f [MCJIT] Simplify immediate decoding code in the RuntimeDyldMachO hierarchy.
Cleanup only: no functional change.

This patch makes RuntimeDyldMachO targets directly responsible for decoding
immediates, rather than letting them implement catch a callback from generic
code. Since this is a very target specific operation, it makes sense to let the
target-specific code drive it.

llvm-svn: 215255
2014-08-08 23:12:22 +00:00
Rui Ueyama
0e0a54e3e6 [FastISel][X86] Silence -Wenum-compare warning
llvm-svn: 215253
2014-08-08 22:47:49 +00:00
Rafael Espindola
1c0c1cec43 Fix the windows build.
Sorry for the noise.

llvm-svn: 215249
2014-08-08 22:09:31 +00:00
Eric Christopher
ca5efa5bef Reword comment slightly.
llvm-svn: 215248
2014-08-08 22:09:00 +00:00
Rafael Espindola
d326af1d4b Remove dead code. Fixes pr20544.
llvm-svn: 215243
2014-08-08 21:35:52 +00:00
Rafael Espindola
d5eb943fe5 Convert from Windows to Unix paths in sys::path::native.
Part of pr20544. Test to follow in a second.

llvm-svn: 215241
2014-08-08 21:29:34 +00:00
Joerg Sonnenberger
71ad99879f Allow large immediates for branch instructions in 32bit mode.
llvm-svn: 215240
2014-08-08 20:57:58 +00:00
Joerg Sonnenberger
8e42fa93a6 Provide an implementation of getNoopForMachoTarget for PPC, otherwise
empty functions will assert in the MC object writer.

llvm-svn: 215238
2014-08-08 19:13:23 +00:00
Juergen Ributzka
896851e155 [FastISel][X86] Fix INC/DEC optimization (r215230)
I accidentally also used INC/DEC for unsigned arithmetic which doesn't work,
because INC/DEC don't set the required flag which is used for the overflow
check.

llvm-svn: 215237
2014-08-08 18:47:04 +00:00
Tim Northover
d67d6cf4fb AArch64: avoid deleting the current iterator in a loop.
std::map invalidates the iterator to any element that gets deleted, which means
we can't increment it correctly afterwards. This was causing Darwin test
failures.

llvm-svn: 215233
2014-08-08 17:31:52 +00:00
Juergen Ributzka
657fb37f68 [FastISel][AArch64] Attach MachineMemOperands to load and store instructions.
llvm-svn: 215231
2014-08-08 17:24:10 +00:00
Juergen Ributzka
18879eb501 [FastISel][X86] Use INC/DEC when possible for {sadd|ssub}.with.overflow intrinsics.
This is a small peephole optimization to emit INC/DEC when possible.

Fixes <rdar://problem/17952308>.

llvm-svn: 215230
2014-08-08 17:21:37 +00:00
David Blaikie
4d8d9e9994 DebugInfo: Recommit (reverted in r215217, originally committed in r215157) the assertion that no argument variable is overwritten by subsequent argument variables.
This turned up a bug in clang where arguments were emitted with
duplicate argument numbers (see r215227).

llvm-svn: 215228
2014-08-08 17:12:35 +00:00
NAKAMURA Takumi
52e4e2fd27 AArch64A57FPLoadBalancing.cpp: Define ColorNames in !NDEBUG.
llvm-svn: 215226
2014-08-08 17:00:59 +00:00