1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

25358 Commits

Author SHA1 Message Date
Artur Pilipenko
4681033ea8 Change isSafeToLoadUnconditionally arguments order. Separated from http://reviews.llvm.org/D10920.
llvm-svn: 257894
2016-01-15 15:27:46 +00:00
Bradley Smith
8c53f2fbdf [ARM] Add DSP build attribute and extension targeting
llvm-svn: 257885
2016-01-15 10:28:25 +00:00
Bradley Smith
faae1a370a [ARM] Add ARMv8-M Baseline/Mainline LLVM targeting
llvm-svn: 257878
2016-01-15 10:24:39 +00:00
James Molloy
7697faf6db [InstCombine] Rewrite bswap/bitreverse handling completely.
There are several requirements that ended up with this design;
  1. Matching bitreversals is too heavyweight for InstCombine and doesn't really need to be done so early.
  2. Bitreversals and byteswaps are very related in their matching logic.
  3. We want to implement support for matching more advanced bswap/bitreverse patterns like partial bswaps/bitreverses.
  4. Bswaps are best matched early in InstCombine.

The result of these is that a new utility function is created in Transforms/Utils/Local.h that can be configured to search for bswaps, bitreverses or both. InstCombine uses it to find only bswaps, CGP uses it to find only bitreversals.

We can then extend the matching logic in one place only.

llvm-svn: 257875
2016-01-15 09:20:19 +00:00
Pete Cooper
28d2ff3ccd Delete MCRelocationInfo::createExprForRelocation.
This method has no callers.

Also remove X86ELFRelocationInfo.cpp and X86MachORelocationInfo.cpp
which only existed to provide an implementation of that method.

Ok'd by Rafael and Jim.

llvm-svn: 257859
2016-01-15 02:24:12 +00:00
David Blaikie
9107ffd0e3 Orc: Simplify some things with NSDMIs and some braced init.
llvm-svn: 257840
2016-01-14 23:33:43 +00:00
Easwaran Raman
9b73e2c66d Refactor threshold computation for inline cost analysis
Differential Revision: http://reviews.llvm.org/D15401

llvm-svn: 257832
2016-01-14 23:16:29 +00:00
Xinliang David Li
6b68a0ee43 [PGO] Move profile summary interface/impl into InstrProf.[*] /NFC
llvm-svn: 257819
2016-01-14 22:10:49 +00:00
Lang Hames
825d101c30 [Orc] Add support for EH-frame registration to the Orc Remote Target utility
classes.

OrcRemoteTargetClient::RCMemoryManager will now register EH frames with the
server automatically. This allows remote-execution of code that uses exceptions.

llvm-svn: 257816
2016-01-14 22:02:03 +00:00
Krzysztof Parzyszek
62b9d05ed5 [Packetizer] Code cleanup, NFC
llvm-svn: 257805
2016-01-14 21:17:04 +00:00
Rui Ueyama
dca64dbccc Update to use new name alignTo().
llvm-svn: 257804
2016-01-14 21:06:47 +00:00
Rui Ueyama
e79b0c88ff [Support] Rename RoundUpToAlignment -> alignTo.
Rounding up an integer m to a nearest multiple of n where n is a power
of 2 is used very often if you are writing code to emit binary files.
RoundUpToAlignment is a small function to do that. But we found that the
function has a small but annoying issue; the name is a bit too long.
Because it is used quite often, that hurts readability.

This patch is to rename the function. The original name is kept as a
forwarder, so that submitting this patch won't immediately break Clang
and other LLVM projects. Once I update all occurrences of RoundUpToAlignment,
I'll remove the old name entirely.

http://reviews.llvm.org/D16162

llvm-svn: 257799
2016-01-14 20:43:11 +00:00
Reid Kleckner
0f062c15f0 Include TypeIndex. Again, the "check" target is not enough to catch this currently
llvm-svn: 257793
2016-01-14 19:40:27 +00:00
Reid Kleckner
fc79a7dd17 [codeview] Dump CodeView inlinee lines subsection
llvm-svn: 257790
2016-01-14 19:20:17 +00:00
James Y Knight
d289668d34 Revert "Stop increasing alignment of externally-visible globals on ELF platforms."
This reverts commit r257719, due to PR26144.

llvm-svn: 257775
2016-01-14 16:33:21 +00:00
Michael Zolotukhin
6f8164efbd Revert "Assert that we have all use/users in the getters."
This reverts commit fdb838f3f8a8b6896bbbd5285555874eb3b748eb.

llvm-svn: 257751
2016-01-14 09:02:45 +00:00
Igor Breger
bd173e545a AVX512: VMOVDQA32/64 (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16142

llvm-svn: 257749
2016-01-14 07:56:04 +00:00
Xinliang David Li
2c9c61a7ae Cleanup: shorten prefix to consistent with other decls /NFC
llvm-svn: 257744
2016-01-14 06:21:25 +00:00
David Majnemer
203ad3282a [CodeView] Add support for dumping binary annotations
Binary annotations are encoded along the lines of UTF-8 and ECI but with
a few minor differences.

The algorithm specified in "ECMA-335 CLI Section II.3.2 - Blobs and
Signatures" is used to compress binary annotations.  Signed binary
annotations are encoded like unsigned annotations except the sign bit is
rotated left to reduce the number of bits needed to be encoded.

llvm-svn: 257742
2016-01-14 06:12:30 +00:00
Xinliang David Li
843996ade7 Fix comments /NFC
llvm-svn: 257740
2016-01-14 04:22:45 +00:00
Xinliang David Li
cb2ed81ee4 [PGO] clean up and documentation
Introduce enum for indexed format versions and 
document indexed format change history.

llvm-svn: 257737
2016-01-14 02:47:01 +00:00
David Majnemer
1371bbfd83 [X86] Don't alter HasOpaqueSPAdjustment after we've relied on it
We rely on HasOpaqueSPAdjustment not changing after we've calculated
things based on it.  Things like whether or not we can use 'rep;movs' to
copy bytes around, that sort of thing.  If it changes, invariants in the
backend will quietly break.  This situation arose when we had a call to
memcpy *and* a COPY of the FLAGS register where we would attempt to
reference local variables using %esi, a register that was clobbered by
the 'rep;movs'.

This fixes PR26124.

llvm-svn: 257730
2016-01-14 01:20:03 +00:00
Philip Reames
7edbe8e693 [GC] Remove more dead code from Registry [NFCI]
llvm-svn: 257729
2016-01-14 01:06:05 +00:00
Philip Reames
d8d6ceb6fa [GC] Remove a bunch of unused complexity from Registry and RegistryParser [NFCI]
The only two Registries we have in the system are the GCStrategy and GCMetadataPrinter ones.  Registry has a bunch of problems - for instance, order of initialization is undefined - and the code was overly general for what was actually used.  I hope to completely kill Registry in the near future, but for now, just delete all the unused listener and parsing support.

llvm-svn: 257727
2016-01-14 00:45:15 +00:00
James Y Knight
547bb11995 Stop increasing alignment of externally-visible globals on ELF
platforms.

With ELF, the alignment of a global variable in a shared library will
get copied into an executables linked against it, if the executable even
accesss the variable. So, it's not possible to implicitly increase
alignment based on access patterns, or you'll break existing binaries.

This happened to affect libc++'s std::cout symbol, for example. See
thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311

llvm-svn: 257719
2016-01-13 23:59:19 +00:00
Chih-Hung Hsieh
8d9d69abed [TLS] New lower emutls pass, fix linkage bugs.
Previous implementation in http://reviews.llvm.org/D10522
created external references to __emutls_v.* variables.
Such references are inaccurate and cannot be handled by
all linkers, e.g. Android dynamic and gold linkers for aarch64.

Now a new LowerEmuTLS pass to go through all global variables,
and add emutls_v.* and emutls_t.* variables.
These __emutls* variables have the same linkage and
visibility as the associated user defined TLS variable.

Also removed old code that dump __emutls* variables in AsmPrinter.cpp,
and updated TLS unit tests.

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

llvm-svn: 257718
2016-01-13 23:56:37 +00:00
Reid Kleckner
b16f0112f1 Add file missing from r257712
llvm-svn: 257715
2016-01-13 23:48:32 +00:00
Reid Kleckner
7a79432e02 [codeview] Share more enums across the writer and the dumper
Moves some .def files into include/DebugInfo/CodeView.

Aslo remove a 'using namespace' directive from a header in readobj and
update the uses of the endian helper types to compensate.

llvm-svn: 257712
2016-01-13 23:44:57 +00:00
Xinliang David Li
8d19f23eed [Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions of coverage data
[resubmit after fixing build bot failures: qualify make_unique and eliminate -Wcovered-switch-default warning.
With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version.

No functional change is intended.

Differiential Revision: http://reviews.llvm.org/D16133

llvm-svn: 257708
2016-01-13 23:29:33 +00:00
Xinliang David Li
5dc11eb625 Revert r257699 -- windows buildbot failure TBI
llvm-svn: 257703
2016-01-13 23:12:53 +00:00
Xinliang David Li
7fc1d7a43d [Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions of coverage data
With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version.

No functional change is intended.

Differiential Revision: http://reviews.llvm.org/D16133

llvm-svn: 257699
2016-01-13 22:58:42 +00:00
Rafael Espindola
7f81c885ac Convert a few assert failures into proper errors.
Fixes PR25944.

llvm-svn: 257697
2016-01-13 22:56:57 +00:00
Sanjay Patel
a7d508166a don't repeat function names in comments; NFC
llvm-svn: 257675
2016-01-13 21:36:50 +00:00
Reid Kleckner
ace574be3b Fix build of CodeView library
llvm-svn: 257662
2016-01-13 19:45:06 +00:00
Reid Kleckner
0f638161ba [readobj] Expand CodeView dumping functionality
This rewrites and expands the existing codeview dumping functionality in
llvm-readobj using techniques similar to those in lib/Object. This defines a
number of new records and enums useful for reading memory mapped codeview
sections in COFF objects.

The dumper is intended as a testing tool for LLVM as it grows more codeview
output capabilities.

Reviewers: majnemer

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

llvm-svn: 257658
2016-01-13 19:32:35 +00:00
Sanjay Patel
0eccad46d3 don't repeat function names in comments; NFC
llvm-svn: 257649
2016-01-13 19:01:43 +00:00
Dimitry Andric
982b8ff4fa Avoid undefined behavior in LinkAllPasses.h
The LinkAllPasses.h file is included in several main programs, to force
a large number of passes to be linked in.  However, the ForcePassLinking
constructor uses undefined behavior, since it calls member functions on
`nullptr`, e.g.:

      ((llvm::Function*)nullptr)->viewCFGOnly();
      llvm::RGPassManager RGM;
      ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);

When the optimization level is -O2 or higher, the code below the first
nullptr dereference is optimized away, and replaced by `ud2` (on x86).

Therefore, the calls after that first dereference are never emitted.  In
my case, I noticed there was no call to `llvm::sys::RunningOnValgrind()`!

Replace instances of dereferencing `nullptr` with either objects on the
stack, or regular function calls.

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

llvm-svn: 257645
2016-01-13 18:29:46 +00:00
Michael Zuckerman
dfb762ecb8 [AVX512] Adding PMOVSXBD/W/Q , PMOVZSDQ and PMOVZSWD/Q Intrinsics .
Differential Revision: http://reviews.llvm.org/D16111 

llvm-svn: 257604
2016-01-13 14:59:19 +00:00
Michael Zuckerman
7d1a571f3e [AVX512] Adding PMOVZXBD/W/Q , PMOVZXDQ and PMOVZXWD/Q Intrinsics
Differential Revision:http://reviews.llvm.org/D16071

llvm-svn: 257601
2016-01-13 14:25:21 +00:00
Michael Zuckerman
3e4a1e477a [AVX512] adding PRORQ , PRORD , PRORLVQ and PRORLVD Intrinsics
Differential Revision: http://reviews.llvm.org/D16052

llvm-svn: 257594
2016-01-13 12:39:33 +00:00
Lang Hames
65d215138b [ORC] Add extra debugging output to OrcRemoteTargetServer.
llvm-svn: 257577
2016-01-13 06:34:57 +00:00
Lang Hames
a0e46cd9d4 [ORC] Fix typo in debugging output.
llvm-svn: 257576
2016-01-13 06:08:07 +00:00
Akira Hatanaka
3525b3a30f [Inliner] Merge the attributes of the caller and callee functions
This patch turns off the fast-math optimization attribute on the caller
if the callee's fast-math attribute is not turned on.

For example,

- before inlining
 caller: "less-precise-fpmad"="true"
 callee: "less-precise-fpmad"="false"

- after inlining
 caller: "less-precise-fpmad"="false"

Alternatively, it's possible to block inlining if the caller's and
callee's attributes don't match. If this approach is preferable to the
one in this patch, we can discuss post-commit.

rdar://problem/19836465

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

llvm-svn: 257575
2016-01-13 06:02:45 +00:00
Michael Gottesman
b04f462e22 Fix PointerIntPair so that it can use an enum class as its integer template argument.
Summary:
The problem here is that an enum class can not be implicitly converted to an
integer. That assumption snuck back into PointerIntPair. This commit fixes the
issue and more importantly adds some unittests to make sure that we do not break
this again.

rdar://23594806

Reviewers: gribozavr

Subscribers: llvm-commits

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

llvm-svn: 257574
2016-01-13 05:59:13 +00:00
Xinliang David Li
c3359ef6f2 [Coverage] Refactor coverage mapping reader code
(Resubmit after fixing a typo that breaks test on big endian 
 machines)

In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code. 
(When coveremap format version changes, backward compatibtility
should be preserved).

llvm-svn: 257571
2016-01-13 04:36:15 +00:00
Xinliang David Li
6a0b24ea8b Rollback r257551 -- unexpected test failures TBI
llvm-svn: 257564
2016-01-13 02:46:40 +00:00
David Majnemer
32661ec901 [CodeView] Improve the line table dumper
This change has us print out fields we didn't previously understand.  To
improve readability, we now group column information with it's
respective line.

llvm-svn: 257552
2016-01-13 01:05:16 +00:00
Xinliang David Li
6bfddf84c3 [Coverage] Refactor coverage mapping reader code /NFC
(Resubmit after fixing build bot failures)

In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code. 
(When coveremap format version changes, backward compatibtility
should be preserved).

llvm-svn: 257551
2016-01-13 00:53:46 +00:00
Xinliang David Li
11fa9867b0 Rollback r257547 -- buildbot failure TBI
llvm-svn: 257549
2016-01-13 00:27:24 +00:00
Xinliang David Li
225d44d8a7 [Coverage] Refactor coverage mapping reader code /NFC
In this refactoring, member functions are introduced to access
CovMap header/func record members and hide layout details. This
will enable further code restructuring to support reading multiple
versions of coverage mapping data with shared/templatized code. 
(When coveremap format version changes, backward compatibtility
should be preserved).

llvm-svn: 257547
2016-01-13 00:16:43 +00:00