1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
Commit Graph

133128 Commits

Author SHA1 Message Date
Chris Bieneman
b6385a607e [CMake] Fixing a typo
This was called out on the list a long time ago and just got pointed out to me again. Need to fix it before I forget.

llvm-svn: 272201
2016-06-08 21:22:03 +00:00
Chris Bieneman
b087e27002 [CMake] Support overriding binary install directory
This patch adds a new option LLVM_TOOLS_INSTALL_DIR which allows customizing the location executables and symlinks get installed to. This adds the functionality provided by autoconf's --bindir flag.

This patch is based on patches from and collaboration with Tony Kelman, and replaces http://reviews.llvm.org/D20934.

llvm-svn: 272200
2016-06-08 21:19:26 +00:00
Sanjay Patel
8f0ded9dee [InstCombine] move fold of select of add/sub to helper function; NFCI
llvm-svn: 272199
2016-06-08 21:10:01 +00:00
Reid Kleckner
818b2dccbc [DebugInfo] Add calling convention support for DWARF and CodeView
Summary:
Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum.  If
it is present and non-zero, the backend will emit it as a
DW_AT_calling_convention attribute. On the CodeView side, we translate
it to the appropriate enum for the LF_PROCEDURE record.

I added a new LLVM vendor specific enum to the list of DWARF calling
conventions. DWARF does not appear to attempt to standardize these, so I
assume it's OK to do this until we coordinate with GCC on how to emit
vectorcall convention functions.

Reviewers: dexonsmith, majnemer, aaboud, amccarth

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 272197
2016-06-08 20:34:29 +00:00
Sanjay Patel
80c713570c [InstCombine] fix outdated comment, simplify logic; NFCI
llvm-svn: 272196
2016-06-08 20:31:52 +00:00
Evgeny Stupachenko
2089dfdfc5 The patch set unroll disable pragma when unroll
with user specified count has been applied.

Summary:
Previously SetLoopAlreadyUnrolled() set the disable pragma only if
there was some loop metadata.
Now it set the pragma in all cases. This helps to prevent multiple
unroll when -unroll-count=N is given.

Reviewers: mzolotukhin

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

From: Evgeny Stupachenko <evstupac@gmail.com>
llvm-svn: 272195
2016-06-08 20:21:24 +00:00
Xinliang David Li
df9793fca6 [PM] Refector LoopAccessInfo analysis code
This is the preparation patch to port the analysis to new PM

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

llvm-svn: 272194
2016-06-08 20:15:37 +00:00
Sanjay Patel
577496e98f [InstCombine] reduce indent; NFC
llvm-svn: 272193
2016-06-08 20:09:04 +00:00
Tim Shen
7b743f677f [MemCpyOpt] Do not exchange llvm.lifetime.start and llvm.memcpy
Reviewers: iteratee

Subscribers: llvm-commits

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

llvm-svn: 272192
2016-06-08 19:42:32 +00:00
Sanjay Patel
8f10db868d [InstCombine] use copyIRFlags() ; NFCI
llvm-svn: 272191
2016-06-08 19:33:52 +00:00
Benjamin Kramer
d415569b3b Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

llvm-svn: 272190
2016-06-08 19:09:22 +00:00
Adrian McCarthy
111d0b8ede Generate codeview for array type metadata.
Differential Revision: http://reviews.llvm.org/D21107

llvm-svn: 272187
2016-06-08 18:22:59 +00:00
Benjamin Kramer
e3b0933b91 [CodeView] Remove manual expansion of the default copy ctor.
It provides nothing over the default one but makes the class not
trivially copyable. No functionality change intended.

llvm-svn: 272186
2016-06-08 18:19:38 +00:00
George Burgess IV
f290b7e77d Attempt #2 to appease the buildbots.
MSVC calls the copy ctor on StratifiedSets for some reason. So,
undelete it.

llvm-svn: 272184
2016-06-08 17:56:35 +00:00
Reid Kleckner
16fb1d2906 [codeview] Avoid emitting an empty file checksum table
Again, the Microsoft linker does not like empty substreams.

We still emit an empty string table if CodeView is enabled, but that
doesn't cause problems because it always contains at least one null
byte.

llvm-svn: 272183
2016-06-08 17:50:29 +00:00
Sanjoy Das
4009301768 [SCEV] Break out of loop if there is no more work to do
This is NFC as far as externally visible behavior is concerned, but will
keep us from spinning in the worklist traversal algorithm unnecessarily.

llvm-svn: 272182
2016-06-08 17:48:46 +00:00
Sanjoy Das
c35e5710c9 [SCEV] Track no-abnormal-exits instead of no-throw calls
Absence of may-unwind calls is not enough to guarantee that a
UB-generating use of an add-rec poison in the loop latch will actually
cause UB.  We also need to guard against calls that terminate the thread
or infinite loop themselves.

This partially addresses PR28012.

llvm-svn: 272181
2016-06-08 17:48:42 +00:00
Sanjoy Das
45bd5cf143 Teach isGuarantdToTransferExecToSuccessor about debug info intrinsics
Calls to `@llvm.dbg.*` can be assumed to terminate.

llvm-svn: 272180
2016-06-08 17:48:36 +00:00
Sanjoy Das
748f06abba Fix a bug in SCEV's poison value propagation
The worklist algorithm introduced in rL271151 didn't check to see if the
direct users of the post-inc add recurrence propagates poison.  This
change fixes the problem and makes the code structure more obvious.

Note for release managers: correctness wise, this bug wasn't a
regression introduced by rL271151 -- the behavior of SCEV around
post-inc add recurrences was strictly improved (in terms of correctness)
in rL271151.

llvm-svn: 272179
2016-06-08 17:48:31 +00:00
Quentin Colombet
b97417f81b [RegBankSelect] Silence an unused variable warning in release mode.
llvm-svn: 272177
2016-06-08 17:39:47 +00:00
Quentin Colombet
85c6785df6 [RegBankSelect] Comment on how we could improve repairing with copies.
When repairing with a copy, instead of accounting for the cost of that
copy and actually inserting it, we may be able to use an alternative
source for the register to repair and just use it.

Make sure this is documented, so that we consider that opportunity at
some point.

llvm-svn: 272176
2016-06-08 17:39:43 +00:00
Zachary Turner
0a756c9656 [pdb] Fix build errors in PDB unit tests.
llvm-svn: 272174
2016-06-08 17:32:25 +00:00
George Burgess IV
cecc1da17f Try to appease buildbots.
r272064 apparently made them angry. This undoes some changes made in
r272064 (defaulting move ctors) to make them happy again.

llvm-svn: 272173
2016-06-08 17:27:14 +00:00
Zachary Turner
2e9c19aed4 [pdb] Handle stream index errors better.
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21128

llvm-svn: 272172
2016-06-08 17:26:39 +00:00
Rui Ueyama
4c5f6e88b8 Remove a patch .rej file.
llvm-svn: 272171
2016-06-08 16:54:31 +00:00
Quentin Colombet
c7fca81422 [AArch64][RegisterBankInfo] G_OR are fine on either GPR or FPR.
Teach AArch64RegisterBankInfo that G_OR can be mapped on either GPR or
FPR for 64-bit or 32-bit values.

Add test cases demonstrating how this information is used to coalesce a
computation on a single register bank.

llvm-svn: 272170
2016-06-08 16:53:32 +00:00
Quentin Colombet
0141b84745 [RegBankSelect] Use RegisterBankInfo applyMapping method.
The RegBankSelect pass can now rely on the target to do the remapping of
the instructions.

llvm-svn: 272169
2016-06-08 16:45:04 +00:00
Vedant Kumar
4eea10684e [ProfileData] Update llvm's copy of InstrProfData.inc
The new version of the header introduces the INSTR_PROF_VISIBILITY
macro. See http://reviews.llvm.org/D21116 for more details.

llvm-svn: 272166
2016-06-08 16:39:32 +00:00
Quentin Colombet
57af0d6024 [RegisterBankInfo] Implement the method to apply a mapping.
Now, the target will be able to provide its how implementation to remap
an instruction. This open the way to crazier optimizations, but to
beginning with, we will be able to handle something else than the
default mapping.

llvm-svn: 272165
2016-06-08 16:39:21 +00:00
Quentin Colombet
f4d62f1945 [RegBankSelect] Use the OperandMapper class to hold remap information.
Now that we have an entity that hold the remap information the
rewritting should be easier to do.

No functional changes.

llvm-svn: 272164
2016-06-08 16:30:55 +00:00
Quentin Colombet
8f581607b2 [RegBankSelect] Use const_iterator instead of iterator for repairReg.
The repairing code has no reason to change the source or destination of
the registers.

llvm-svn: 272163
2016-06-08 16:24:55 +00:00
Quentin Colombet
fc68cf3b27 [RegisterBankInfo] Introduce OperandsMapper class.
This helper class is used to encapsulate the necessary information
to remap an instruction.

llvm-svn: 272161
2016-06-08 16:18:13 +00:00
Quentin Colombet
1be1687674 [Target] Introduce a generic opcode for bitwise OR: G_OR.
This G_OR is used in GlobalISel to represent bitwise OR.

llvm-svn: 272160
2016-06-08 16:12:19 +00:00
Quentin Colombet
672a86c87d [RegBankSelect] Introduce a command line option to override the running mode.
When the command line option is set, it overrides any thing that the
target may have set. The rationale is that we get what we asked for.

Options are respectively regbankselect-fast and regbankselect-greedy for
fast and greedy mode.

llvm-svn: 272158
2016-06-08 15:49:23 +00:00
Quentin Colombet
5846ae1574 [RegBankSelect] Explain what it would take to support non-copy
repairing.

Copies are easy because we repair only when there is a mismatch. For
non-copy repairing, i.e., cases that involves breaking down or gathering
up the value, one of the operand may not have a register bank yet. Thus,
derivate a cost from that, requires more work.

llvm-svn: 272157
2016-06-08 15:40:32 +00:00
Oliver Stannard
e8d6d1e081 [ARM] MSR instructions implicitly set CPSR
The MSR instructions can write to the CPSR, but we did not model this
fact, so we could emit them in the middle of IT blocks, changing the
condition flags for later instructions in the block.

The tests use two calls to llvm.write_register.i32 because it is valid
to use these instructions at the end of an IT block, which if conversion
does do in some cases. With two calls, the first clobbers the flags, so
a branch has to be used to make the second one conditional.

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

llvm-svn: 272154
2016-06-08 15:26:34 +00:00
Daniel Dunbar
bd13a0caaa [lit] Ensure we get bytes when reading redirected output files.
llvm-svn: 272147
2016-06-08 14:41:44 +00:00
Saleem Abdulrasool
c01530fd2f Support: correct AArch64 TargetParser implementation
The architecture enumeration is shared across ARM and AArch64.  However, the
data is not.  The code incorrectly would index into the array using the
architecture index which was offset by the ARMv7 architecture enumeration.  We
do not have a marker for indicating the architectural family to which the
enumeration belongs so we cannot be clever about offsetting the index (at least
it is not immediately apparent to me).  Instead, fall back to the tried-and-true
method of slowly iterating the array (its not a large array, so the impact of
this is not too high).

Because of the incorrect indexing, if we were lucky, we would crash, but usually
we would return an invalid StringRef.  We did not have any tests for the AArch64
target parser previously;.  Extend the previous tests I had added for ARM to
cover AArch64 for ensuring that we return expected StringRefs.

Take the opportunity to change some iterator types to references.

This work is needed to support parsing `.arch name` directives in the AArch64
target asm parser.

llvm-svn: 272145
2016-06-08 14:30:00 +00:00
Davide Italiano
2a03612d43 [PM] LoopSimplify. Remove unneeded pass dependencies. NFCI.
llvm-svn: 272140
2016-06-08 13:56:59 +00:00
Davide Italiano
a65b5a0fee [PM/SimplifyCFG] Preserve GlobalsAA even if the IR is mutated.
llvm-svn: 272139
2016-06-08 13:32:23 +00:00
Vasileios Kalintiris
042223679b [mips] Add a proper file header in MipsFastISel.cpp
llvm-svn: 272138
2016-06-08 13:13:15 +00:00
Krzysztof Parzyszek
f15287627c [Hexagon] Modify HexagonExpandCondsets to handle subregisters
Also, switch to using functions from LiveIntervalAnalysis to update
live intervals, instead of performing the updates manually.

Re-committing r272045.

llvm-svn: 272135
2016-06-08 12:31:16 +00:00
Diana Picus
2047f3e03c [ARM] Remove redundant check. NFC
isSwift is tested earlier and known to be false when we reach this code.

llvm-svn: 272127
2016-06-08 10:29:02 +00:00
Benjamin Kramer
5d5a0e4f68 Avoid copies of std::strings and APInt/APFloats where we only read from it
As suggested by clang-tidy's performance-unnecessary-copy-initialization.
This can easily hit lifetime issues, so I audited every change and ran the
tests under asan, which came back clean.

llvm-svn: 272126
2016-06-08 10:01:20 +00:00
Igor Breger
c1b262a77f [AVX512] Fix cvtusi2sd instruction Opcode, it should be 0x7B instead of 0x2A.
llvm-svn: 272122
2016-06-08 07:48:23 +00:00
Matt Arsenault
d79ae3b13f Make LiveDebugValues preserve CFG
llvm-svn: 272117
2016-06-08 05:18:01 +00:00
Kostya Serebryany
1b5f4c4e10 [libFuzzer] add 'weak' back to __sanitizer_malloc_hook and __sanitizer_free_hook
llvm-svn: 272116
2016-06-08 04:49:29 +00:00
Kostya Serebryany
1d9584b1f3 [libFuzzer] add a test that is built w/o coverage instrumentation but has the coverage rt (it should now fail with a descriptive message)
llvm-svn: 272090
2016-06-08 01:46:13 +00:00
Kostya Serebryany
49497b4fc5 [libFuzzer] docs: merge two lines with cmake instructions, add -DLLVM_ENABLE_ASSERTIONS=ON
llvm-svn: 272088
2016-06-08 01:31:40 +00:00
Quentin Colombet
29b8e1633e [AArch64][RegisterBankInfo] Use the generic implementation of copyCost.
Long term we may want to give high cost at FPR to/from GPR copies.

llvm-svn: 272086
2016-06-08 01:24:00 +00:00