Commit Graph

124224 Commits

Author SHA1 Message Date
Rafael Espindola
9f7d480d96 Remove excess white space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253408 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 00:31:34 +00:00
Sanjay Patel
bc9ba1275b [InstCombine] refactor optimizeIntToFloatBitCast() ; NFCI
The logic for handling the pattern without a shift is identical
to the logic for handling the pattern with a shift if you set 
the shift amount to zero for the former.

This should make it easier to see that we probably don't even need
optimizeIntToFloatBitCast(). 

If we call something like foldVecTruncToExtElt() from visitTrunc(),
we'll solve PR25543:
https://llvm.org/bugs/show_bug.cgi?id=25543



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253403 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-18 00:00:04 +00:00
Nathan Slingerland
3d2c6fc38e [llvm-profdata] Show hint for other mismatch errors when merging instr profdata
Missed bit of feedback from D14720.

Show the same "Make sure that all profile
data to be merged is generated from the same binary." hint for hash mismatch
and value site count mismatch as we now do for counter mismatch when merging
incompatible instrumentation profile data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253400 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 23:37:09 +00:00
Simon Pilgrim
5dff218941 [X86][AVX512] Added AVX512 SHUFP*/VPERMILP* shuffle decode comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253396 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 23:29:49 +00:00
David Blaikie
c672a9b1f3 Fix read-of-uninitialized introduced in r253277 exposed on some buildbots
Verified that this was at least /an/ issue, if not the only one, by
initializing NumBuckets to 1 (previously it was uninitialized, so if
this change made a difference, which it did (causing a bunch of tests to
crash) it demonstrates use-of-uninitialized memory). Initializing then
removes the crashes.

Thanks Reid for the debugging assistance

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253395 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 23:26:06 +00:00
Xinliang David Li
e34401de05 [PGO] Move value profile data definitions out of IndexedInstrProf
Move the data structure defintions out of the namespace. The defs will
be shared by raw format. [NFC]



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253394 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 23:00:40 +00:00
David Blaikie
2fa6f196d6 Fix null dereference committed in r253277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253393 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 22:39:26 +00:00
David Blaikie
6715b1eee1 dwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS component of the index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253392 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 22:39:23 +00:00
Simon Pilgrim
ae2a51e7ef [X86][AVX512] Added support for AVX512 UNPCK shuffle decode comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253391 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 22:35:45 +00:00
Nathan Slingerland
0833ccb526 [llvm-profdata] Improve error messaging when merging mismatched profile data
Summary:
This change tries to make the root cause of instrumented profile data merge failures clearer.

Previous:

$ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata
test_1.profraw: foo: Function count mismatch
test_1.profraw: bar: Function count mismatch
test_1.profraw: baz: Function count mismatch
...

Changed:

$ llvm-profdata merge test_0.profraw test_1.profraw -o test_merged.profdata
test_1.profraw: foo: Function basic block count change detected (counter mismatch)
Make sure that all profile data to be merged is generated from the same binary.
test_1.profraw: bar: Function basic block count change detected (counter mismatch)
test_1.profraw: baz: Function basic block count change detected (counter mismatch)
...

Reviewers: dnovillo, davidxl, bogner

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253384 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 22:08:53 +00:00
Simon Pilgrim
d82a1c70eb [X86][SSE] Share AVX1/AVX2 shuffle tests with AVX512 where possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253379 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 21:19:45 +00:00
Reid Kleckner
595419dcfa [WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction
Summary:
Now that there is a one-to-one mapping from MachineFunction to
WinEHFuncInfo, we don't need to use a DenseMap to select the right
WinEHFuncInfo for the current funclet.

The main challenge here is that X86WinEHStatePass is an IR pass that
doesn't have access to the MachineFunction. I gave it its own
WinEHFuncInfo object that it uses to calculate state numbers, which it
then throws away. As long as nobody creates or removes EH pads between
this pass and SDAG construction, we will get the same state numbers.

The other thing X86WinEHStatePass does is to mark the EH registration
node. Instead of communicating which alloca was the registration through
WinEHFuncInfo, I added the llvm.x86.seh.ehregnode intrinsic.  This
intrinsic generates no code and simply marks the alloca in use.

Reviewers: JCTremoulet

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253378 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 21:10:25 +00:00
David Blaikie
e6878ebe82 dwarfdump: Reference the appropriate line table segment when dumping dwp files
Also improves .dwo type unit dumping which didn't handle this either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253377 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 21:08:05 +00:00
David Blaikie
358918e8dd Fix -Wunused-function in a non-Win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253373 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 20:38:54 +00:00
Andrew Kaylor
881fcaec6b [EH] Keep filter clauses for types that have been caught.
The instruction combiner previously removed types from filter clauses in Landing Pad instructions if the type had previously been seen in a catch clause.  This is incorrect and prevents unexpected exception handlers from rethrowing the caught type.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253370 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 20:13:04 +00:00
Ulrich Weigand
e570abc428 [RuntimeDyld] Fix resolving R_PPC64_REL24 relocations
When resolving R_PPC64_REL24, code used to check for an address delta
that fits in 24 bits, while the instructions that take this relocation
actually can process address deltas that fit into *26* bits (as those
instructions have a 24 bit field, but implicitly append two zero bits
at the end since all instruction addresses are a multiple of 4).

This means that code would signal overflow once a single object's text
section exceeds 8 MB, while we can actually support up to 32 MB.

Partially fixes PR25540.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253369 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 20:08:31 +00:00
Mike Aizatsky
f42fd78674 adding sancov to Makefile directory list.
Differential Revision: http://reviews.llvm.org/D14753

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253368 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 20:02:03 +00:00
Yunzhong Gao
576772b030 Switch lto codegen to using diagnostic handlers.
This patch removes the std::string& argument from a number of C++ LTO API calls
and instead makes them use the installed diagnostic handler. This would also
improve consistency of diagnostic handling infrastructure: if an LTO client used
lto_codegen_set_diagnostic_handler() to install a custom error handler, we do
not want some error messages to go through the custom error handler, and some
other error messages to go into sLastErrorString.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253367 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 19:48:12 +00:00
George Burgess IV
d448978b61 Specify explicit storage type for AllocType. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253366 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 19:48:06 +00:00
Elena Demikhovsky
741a772213 Vector of pointers in function attributes calculation
While setting function attributes we check all instructions that may access memory. For a call instruction we check all arguments. The special check is required for pointers.
I added vector-of-pointers to the call arguments types that should be checked.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253363 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 19:30:51 +00:00
Diego Novillo
64725c314d SamplePGO - Move debug/dump function bodies out of header files. NFC.
No point polluting the header declarations with debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253361 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 19:04:46 +00:00
David Blaikie
034f865664 StringRef-ify some Option APIs
Patch by Eugene Kosov!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253360 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 19:00:52 +00:00
Sanjay Patel
e6d768f861 fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253359 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 18:46:56 +00:00
Sanjay Patel
41586529ff use local variables; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253356 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 18:37:23 +00:00
Mike Aizatsky
e656ca2d31 enabling sancov tests on linux x86_64 only
Differential Revision: http://reviews.llvm.org/D14728

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253354 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 18:25:21 +00:00
Charlie Turner
7a016a152d [ARM] Don't pessimize i32 vselect.
The underlying issues surrounding codegen for 32-bit vselects have been resolved. The pessimistic costs for 64-bit vselects remain due to the bad
scalarization that is still happening there.

I tested this on A57 in T32, A32 and A64 modes. I saw no regressions, and some improvements.

From my benchmarks, I saw these improvements in A57 (T32)
spec.cpu2000.ref.177_mesa 5.95%
lnt.SingleSource/Benchmarks/Shootout/strcat 12.93%
lnt.MultiSource/Benchmarks/MiBench/telecomm-CRC32/telecomm-CRC32 11.89%

I also measured A57 A32, A53 T32 and A9 T32 and found no performance regressions. I see much bigger wins in third-party benchmarks with this change

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253349 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 17:25:15 +00:00
Sanjay Patel
7271f32728 function names start with a lower case letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253348 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 17:24:08 +00:00
Pawel Bylica
790e8d91ff [Support] Tweak path::system_temp_directory() on Windows.
Summary:
This patch changes the behavior of path::system_temp_directory() on Windows to be closer to GetTempPath Windows API call. Enforces path separator to be the native one, makes path absolute, etc. GetTempPath is not used directly because of limitations/implementation bugs on Windows 7.

Windows specific unit tests are added. Most of them runs in separated process with modified environment variables.

This change fixes FileSystemTest.CreateDir unittest that had been failing when run from Unix-like shell on Windows (Unix-like path separator (/) used in env variables).

Reviewers: chapuni, rafael, aaron.ballman

Subscribers: rafael, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253345 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:54:32 +00:00
Ahmed Bougacha
03629a3cf4 [AArch64] Promote f16 SELECT_CC CC operands when op is legal.
SELECT_CC has the nasty property of having operands with unrelated
types. So if you do something like:

  f32 = select_cc f16, f16, f32, f32, cc

You'd only look for the action for <select_cc, f32>, but never f16.
If the types are all legal, but the op isn't (as for f16 on AArch64,
or for f128 on x86_64/AArch64?), then you get into trouble.
For f128, we have softenSetCCOperands to handle this case.

Similarly, for f16, we can directly promote the CC operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253344 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:45:40 +00:00
Davide Italiano
a17892dba0 [llvm-rtdyld] Don't waste cycles invalidating instruction cache.
Now that setExecutable() changed to do all the ground work to make
memory executable on the host, we can remove all (redundant) calls
to invalidate instruction cache here.

As an added bonus, this makes invalidateInstructionCache() dead
code, so it can be removed.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253343 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:37:52 +00:00
Davide Italiano
fa084bd00c [JIT/Memory] Fix up semantic of setExecutable().
setExecutable() should do everything that's needed to make the memory
executable on host, i.e. unconditionally set permissions + invalidate
instruction cache. llvm-rtdyld will be updated in my next commit.

Discusseed with: Lang Hames (as part of D13631).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253341 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:34:28 +00:00
Dan Gohman
8dc1efba58 Update DebugInfo tests for the change in DEBUG_VALUE output in r253338.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253340 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:15:11 +00:00
Pat Gavlin
4d186a129b Lower statepoints with multi-def targets.
Statepoint lowering currently expects that the target method of a
statepoint only defines a single value. This precludes using
statepoints with ABIs that return values in multiple registers
(e.g. the SysV AMD64 ABI). This change adds support for lowering
statepoints with mutli-def targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253339 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:04:21 +00:00
Dan Gohman
7673d242f7 Use TargetRegisterInfo for printing MachineOperand register comments
Several places in AsmPrinter.cpp print comments describing MachineOperand
registers using MCRegisterInfo, which uses MCOperand-oriented names. This
doesn't work for targets that use virtual registers exclusively, as
WebAssembly does, since virtual registers are represented and printed
differently.

This patch preserves what seems to be the spirit of r229978, avoiding the
use of TM.getSubtargetImpl(), while still using MachineOperand-oriented
printing for MachineOperands.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253338 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 16:01:28 +00:00
Chad Rosier
08e6ab9d25 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253336 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 13:58:10 +00:00
Bradley Smith
50827137f2 [ARM] Default to ARMv4t in favour of adding Other to ARMArch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253335 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 13:38:29 +00:00
Charlie Turner
377cc21860 [ARM] Match VABDL from log2 shuffles.
Differential Revision: http://reviews.llvm.org/D14664



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253334 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 13:21:35 +00:00
Zlatko Buljan
3a6c5daba9 [mips][microMIPS] Implement EXTP, EXTPDP, EXTPDPV, EXTPV, EXTR[_RS].W, EXTR_S.H, EXTRV[_RS].W and EXTRV_S.H instructions
Differential Revision: http://reviews.llvm.org/D14174


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253332 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 12:54:15 +00:00
Bradley Smith
38bd0daf4d [ARM] Properly initialize ARMArch in the ARM subtarget
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253331 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 11:57:33 +00:00
Zlatko Buljan
affe4356e9 [mips][microMIPS] Implement SUBQ[_S].PH, SUBQ_S.W, SUBQH[_R].PH, SUBQH[_R].W, SUBU[_S].PH, SUBU[_S].QB and SUBUH[_R].QB instructions
Differential Revision: http://reviews.llvm.org/D14114


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253329 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 10:11:22 +00:00
Oliver Stannard
99ab11202f [Assembler] Make fatal assembler errors non-fatal
Currently, if the assembler encounters an error after parsing (such as an
out-of-range fixup), it reports this as a fatal error, and so stops after the
first error. However, for most of these there is an obvious way to recover
after emitting the error, such as emitting the fixup with a value of zero. This
means that we can report on all of the errors in a file, not just the first
one. MCContext::reportError records the fact that an error was encountered, so
we won't actually emit an object file with the incorrect contents.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253328 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 10:00:43 +00:00
Oliver Stannard
43f1dd7a00 [Assembler] Allow non-fatal errors after parsing
This adds reportError to MCContext, which can be used as an alternative to
reportFatalError when the assembler wants to try to continue processing the
rest of the file after the error is reported, so that all of the errors ina
file can be reported. It records the fact that an error was encountered, so we
can avoid emitting an object file if any errors occurred.

This patch doesn't add any uses of this function (a later patch will convert
most uses of reportFatalError to use it), but there is a small functional
change: we use the SourceManager to print the error message, even if we have a
null SMLoc. This means that we get a SourceManager-style message, with the file
and line information shown as <unknown>, rather than the "LLVM ERROR" style
used by report_fatal_error.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253327 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 09:58:07 +00:00
Zlatko Buljan
e0d7dbe7db [mips][microMIPS] Implement PRECEQ.W.PHL, PRECEQ.W.PHR, PRECEQU.PH.QBL, PRECEQU.PH.QBLA, PRECEQU.PH.QBR, PRECEQU.PH.QBRA, PRECEU.PH.QBL, PRECEU.PH.QBLA, PRECEU.PH.QBR and PRECEU.PH.QBRA instructions
Differential Revision: http://reviews.llvm.org/D14279


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253326 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 09:43:29 +00:00
Jay Foad
6c42346ff4 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253324 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 08:54:53 +00:00
David Majnemer
bef6034cc2 [AliasAnalysis] CatchPad and CatchRet can modify escaped memory
CatchPad and CatchRet behave a lot like function calls: they can
potentially modify any memory which has been escaped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253323 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 08:15:14 +00:00
David Majnemer
a56e1d65ad Fix a typo in BasicAliasAnalysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253322 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 08:15:08 +00:00
Igor Breger
4ea617263b AVX512 : regenerate the test file against trunk.
Differential Revision: http://reviews.llvm.org/D14742

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253321 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 08:03:43 +00:00
Zlatko Buljan
485ed67da5 Added microMIPSDSPr1 assembler and disassembler tests to existing microMIPSDSPr2 test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253320 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 07:58:27 +00:00
Rafael Espindola
96902bf6e3 Add MemoryBufferRef(MemoryBuffer&) constructor.
patch by Jonathan Anderson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253311 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 05:11:44 +00:00
Xinliang David Li
4d60f67763 Fix unaligned memory read issue exposed by ubsan
Indexed profile data as designed today does not guarantee
counter data to be well aligned, so reading needs to use
the slower form (with memcpy). This is less than ideal and 
should be improved in the future (i.e., with fixed length
function key instead of variable length name key).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253309 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-17 03:47:21 +00:00