Commit Graph

126263 Commits

Author SHA1 Message Date
Xinliang David Li
5fd06e2add [PGO] clean up and documentation
Introduce enum for indexed format versions and 
document indexed format change history.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:47:01 +00:00
Kostya Serebryany
a416b73b12 [libFuzzer] suggest a dictionary to the user of some of the trace-based dictionary entries were successful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:36:44 +00:00
Ahmed Bougacha
7b82860fa4 [AArch64] Don't assume extractelt constant index when matching shuffle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:12:30 +00:00
Xinliang David Li
a4ccbcef22 Add virtual dtor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257734 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:10:49 +00:00
JF Bastien
d9de69f705 WebAssembly: mark a few new failures
A recent change introduced this assertion failure in some corner cases.

Repro:
mkdir /s/wasm/torture-out ; time /s/wasm/waterfall/src/compile_torture_tests.py --c /s/llvm/out/bin/clang --cxx /s/llvm/out/bin/clang++ --testsuite /s/gcc/gcc/testsuite --fails /s/llvm/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt --out /s/wasm/torture-out

Or look on the wasm integration bot:
https://build.chromium.org/p/client.wasm.llvm/console

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:49:22 +00:00
NAKAMURA Takumi
e9382fe577 Mark remote-JIT tests as XFAIL, as well as win32, for targeting mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:33:00 +00:00
David Majnemer
f7cfdf8b26 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:20:03 +00:00
Philip Reames
103a36146c [GC] Remove more dead code from Registry [NFCI]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:06:05 +00:00
Philip Reames
7a335f89b7 Fix Release build warning.
A value used only in an assert.  Again.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:55:51 +00:00
Philip Reames
3a4727c413 [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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:45:15 +00:00
NAKAMURA Takumi
dda3410d81 llvm-profdata.cpp: Fix comment lines. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:36:59 +00:00
Philip Reames
f7c44aa964 [GCRoot] Assert preconditions to clarify behavior
This code isn't reachable if the GFI (GCFunctionInfo*) is null.  Clarify this by adding an assert and removing an always taken if.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257724 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:21:56 +00:00
Reid Kleckner
5353c0fbdd [codeview] Regenerate C++ display name test case and update comments
Clang generates good display names for codeview since r255744, and the
change to make LLVM use them was accidentally included in r257658.

This change just updates the comments and test case to reflect reality
better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:12:54 +00:00
James Y Knight
326b7ceee0 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:59:19 +00:00
Chih-Hung Hsieh
08ba2ca688 [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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257718 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:56:37 +00:00
Reid Kleckner
c40a833c41 Add file missing from r257712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257715 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:48:32 +00:00
Kostya Serebryany
92e8dcd607 [libFuzzer] make CurrentUnit a POD object instead of vector to avoid extra allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:46:01 +00:00
Reid Kleckner
13d3e2ec58 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:44:57 +00:00
JF Bastien
ad2da49a99 WebAssembly: fix build break introduced by ELFObjectWriter churn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:36:00 +00:00
Xinliang David Li
8a0c782515 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:29:33 +00:00
Rafael Espindola
b09c6d4e92 Add a triple to the test.
Sorry for forgetting it the first time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:13:38 +00:00
Xinliang David Li
0d31a22edd Revert r257699 -- windows buildbot failure TBI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:12:53 +00:00
Kostya Serebryany
3888fb079a [libFuzzer] make sure we find buffer overflow in the input buffer. Previously, re-using the same vector object was hiding buffer overflows (unless we used annotated vector)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:02:30 +00:00
Sanjay Patel
38c559c49a move return variable declarations down to where they are actually used; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:01:57 +00:00
Xinliang David Li
b68354f729 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257699 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 22:58:42 +00:00
Rafael Espindola
fdba645465 Convert a few assert failures into proper errors.
Fixes PR25944.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 22:56:57 +00:00
Rafael Espindola
9a03a19dcd Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 22:23:36 +00:00
Sanjay Patel
72a0507d6e fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 22:17:13 +00:00
Sanjay Patel
04e5638e66 hasNUses(0) == use_empty() ; NFCI
Also, improve variable name and remove unnecessary braces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 22:16:48 +00:00
Easwaran Raman
fa283c33ad Display detailed profile summary in llvm-profdata tool.
This adds a detailed profile summary in llvm-profdata. The summary is in the
form of one or more triples of the form (P, N, M) which is interpreted as if
we look at the Top-N counts in the profile, their sum accounts for P percentage
of the sum of all counts in the program and the minimum count in the Top-N is M.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257680 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 21:44:36 +00:00
Krzysztof Parzyszek
9b28616672 [Hexagon] Fix the options controlling jump table generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 21:43:13 +00:00
Sanjay Patel
dcf08fba74 rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 21:39:26 +00:00
Sanjay Patel
3af3cfa7e4 don't duplicate comments that are in the header file; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 21:38:23 +00:00
Sanjay Patel
01f1e93e82 don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 21:36:50 +00:00
Adrian Prantl
9a0e5532ac Relax testcase so it works on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 21:09:48 +00:00
Changpeng Fang
a1f41aa652 AMDGPU/SI: Update ISA version for FIJI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257666 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 20:39:25 +00:00
Reid Kleckner
839f67b0cb Fix instance of -Wcovered-switch-default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 20:39:22 +00:00
Adrian Prantl
f6ffec95e3 dsymutil: Only warn about missing clang modules once.
rdar://problem/22269336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257664 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 20:26:00 +00:00
Dimitry Andric
307c714edd Remove bashism from merge.sh: POSIX sh does not have the function
reserved word, and it is even superfluous in bash, for this particular
instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257663 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:48:50 +00:00
Reid Kleckner
6957121a4e Fix build of CodeView library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257662 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:45:06 +00:00
Hans Wennborg
81124df23b Unbreak the sphinx build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257659 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:33:49 +00:00
Reid Kleckner
fb30f09c13 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:32:35 +00:00
Dan Gohman
e1aa9b9403 [WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:31:57 +00:00
Dan Gohman
c7e4634baa [WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:29:37 +00:00
Sanjay Patel
38fb5dfdd6 don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257649 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:01:43 +00:00
Hans Wennborg
c5d0ef979e Fix struct/class mismatch for MachineSchedContext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257648 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 18:59:45 +00:00
Sanjay Patel
81e35dc018 rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 18:37:28 +00:00
Dimitry Andric
67e14a3412 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 18:29:46 +00:00
Sanjay Patel
92df1747f6 don't repeat names in comments ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257643 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 17:43:35 +00:00
Hans Wennborg
a07c74ea61 Update version to 3.9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 17:32:32 +00:00