Commit Graph

174494 Commits

Author SHA1 Message Date
Justin Bogner a119f32344 ProfileData: Allow multiple profiles in RawInstrProfReader
Allow multiple raw profiles to coexist in a single .profraw file,
given the following conditions:

- Zero padding at the end of or between profiles will be skipped.
- Each profile must start with a valid header.
- Mixing endianness or pointer sizes in concatenated profiles files is
  not allowed.

This is needed to handle cases where a program's shared libraries are
profiled as well as the main executable itself, as we'll need to emit
each executable's counters. Combining the tables in the runtime would
be expensive for the instrumented program.

rdar://16918688

llvm-svn: 208938
2014-05-16 00:38:00 +00:00
Eric Christopher c21d3d5f90 Remove the Options query functions and just access our Options directly.
llvm-svn: 208937
2014-05-16 00:32:52 +00:00
Hans Wennborg 4e43fef3e5 test/CodeGenCXX/dllexport.cpp: we already correctly emit b() even when
it's not used, because CodeGenModule::EmitGlobal consults
ASTContext::DeclMustBeEmitted via CodeGenModule::MayDeferGeneration.

llvm-svn: 208936
2014-05-16 00:09:31 +00:00
Reid Kleckner d20c970aac musttail: Fix the verification of alignment attributes
Previously this would fail with an assertion failure when trying to add
an alignment attribute without a value.

llvm-svn: 208935
2014-05-15 23:58:57 +00:00
Jiangning Liu 932e1c3924 Implement global merge optimization for global variables.
This commit implements two command line switches -global-merge-on-external
and -global-merge-aligned, and both of them are false by default, so this
optimization is disabled by default for all targets.

For ARM64, some back-end behaviors need to be tuned to get this optimization
further enabled.

llvm-svn: 208934
2014-05-15 23:45:42 +00:00
David Blaikie 962c9a2d54 DebugInfo: Follow up to r208930, comment usage of 'using' to bring in base class overload.
Code review feedback from Eric Christopher.

llvm-svn: 208933
2014-05-15 23:29:53 +00:00
Eric Christopher 5d376066df Move more MC options into the MCTargetOptions structure.
No functional change.

llvm-svn: 208932
2014-05-15 23:27:49 +00:00
Eric Christopher 98dcb8c6b1 Remove unused llvm namespace bool variable.
llvm-svn: 208931
2014-05-15 23:27:44 +00:00
David Blaikie bc094f387b DebugInfo: Don't put fission type units in comdat sections.
Since type units in the dwo file are handled by a debug aware tool, they
don't need to leverage the ELF comdat grouping to implement
deduplication. Avoid creating all the .group sections for these as a
space optimization.

llvm-svn: 208930
2014-05-15 23:18:15 +00:00
Eric Christopher 3224ebc88d Make the -L option for SaveTempLabels not be static. No functional change.
Note: This option name is terrible, we should fix this.
llvm-svn: 208929
2014-05-15 23:06:30 +00:00
Nick Kledzik e09cfc5f8a [mach-o] Add support for zero-fill sections.
llvm-svn: 208928
2014-05-15 23:03:50 +00:00
Reid Kleckner 966abe7614 MS ABI: Use musttail for thunk IR generation
This allows us to perfectly forward non-trivial arguments that use
inalloca.

We still can't forward non-trivial arguments through thunks when we have
a covariant return type with a non-trivial adjustment.  This would
require emitting an extra copy, which is non-conforming anyway.

llvm-svn: 208927
2014-05-15 23:01:46 +00:00
Alp Toker 1761f11801 Eliminate DefaultImageName from the Driver constructor
All callers were passing in "a.out" or garbage so a sensible default works fine
here as a cleanup.

This also brings about the possibility of adapting the value based on the
driver's compatibility mode in future.

The setting can still be changed via Driver::DefaultImageName as needed.

llvm-svn: 208926
2014-05-15 22:26:36 +00:00
Hans Wennborg b0f2f146bb Allow dllimport/dllexport on inline functions and adjust the linkage.
This is a step towards handling these attributes on classes (PR11170).

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

llvm-svn: 208925
2014-05-15 22:07:49 +00:00
DeLesley Hutchins 03efd41bc0 Thread Safety Analysis: fixes to SExpr pretty printing.
llvm-svn: 208924
2014-05-15 22:07:41 +00:00
Reed Kotler 6280d9711d Finish materialize for ints
Summary: We add code to materialize all integer literals.

Test Plan: simplestorei.ll

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 208923
2014-05-15 21:54:15 +00:00
Matt Arsenault d504a74e3c Use range for
llvm-svn: 208922
2014-05-15 21:44:05 +00:00
Alexey Samsonov dce67348a8 [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.
It is more appropriate than the current situation, when one flag
(AbsoluteFilePath) is relevant only if another flag is set.

This refactoring would also simplify fetching the short function name
(stored in DW_AT_name) instead of a linkage name returned currently.

No functionality change.

llvm-svn: 208921
2014-05-15 21:24:32 +00:00
Reid Kleckner 900d46ff39 Don't insert lifetime.end markers between a musttail call and ret
The allocas going out of scope are immediately killed by the return
instruction.

This is a resend of r208912, which was committed accidentally.

Reviewers: chandlerc

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

llvm-svn: 208920
2014-05-15 21:10:46 +00:00
Nick Kledzik 61fdef6086 [mach-o] Add support and test cases for parsing tentative definitions
llvm-svn: 208919
2014-05-15 20:59:23 +00:00
Aaron Ballman 130a3b0504 Refactoring another for loop to use a range-based for loop instead. Also cleaned up a bit of formatting. No functional changes intended.
llvm-svn: 208918
2014-05-15 20:58:55 +00:00
Aaron Ballman e519522343 Refactoring some for loops to use range-based for loops instead. No functional changes intended.
llvm-svn: 208915
2014-05-15 20:50:47 +00:00
Reid Kleckner b16564109b Revert "Don't insert lifetime.end markers between a musttail call and ret"
This reverts commit r208912.

It was committed accidentally without review.

llvm-svn: 208914
2014-05-15 20:41:05 +00:00
Reid Kleckner 6af21245eb Remove unused variable in inliner
We have to iterate over all the calls that were inlined to find out if
any were musttail.

Sink another variable down to where its used.

llvm-svn: 208913
2014-05-15 20:39:42 +00:00
Reid Kleckner 26ab7ead45 Don't insert lifetime.end markers between a musttail call and ret
The allocas going out of scope are immediately killed by the return
instruction.

Reviewers: chandlerc

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

llvm-svn: 208912
2014-05-15 20:39:13 +00:00
David Blaikie 4c6d987b06 DebugInfo: Simplify retrieving filename/directory name for line table entry building.
llvm-svn: 208911
2014-05-15 20:18:50 +00:00
Reid Kleckner f0915aa0e6 Teach the inliner how to preserve musttail invariants
The interesting case is what happens when you inline a musttail call
through a musttail call site.  In this case, we can't break perfect
forwarding or allow any stack growth.

Instead of merging control flow from the inlined return instruction
after a musttail call into the body of the caller, leave the inlined
return instruction in the caller so that the musttail call stays in the
tail position.

More work is required in http://reviews.llvm.org/D3630 to handle the
case where the inlined function has dynamic allocas or byval arguments.

Reviewers: chandlerc

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

llvm-svn: 208910
2014-05-15 20:11:28 +00:00
David Blaikie 6c21716439 DebugInfo: Add FIXME regarding DILexicalBlock uniquing fields.
llvm-svn: 208909
2014-05-15 20:09:55 +00:00
Tom Stellard 50801489ee autoconf: Fix libLLVM-Major-Minor-Patch.so symlink
The symlink needs to point to a relative path, so we don't break
building in a chroot.

Tested-by: Laurent Carlier <lordheavym@gmail.org>
llvm-svn: 208908
2014-05-15 19:50:25 +00:00
Greg Fitzgerald f42b49787b cleanup and test litlint
llvm-svn: 208907
2014-05-15 18:52:11 +00:00
Simon Atanasyan 54bb2e0092 [obj2yaml][ELF] Print relocation's offset as a hex number. Use a proper
types to hold relocation's offset and addend.

llvm-svn: 208906
2014-05-15 18:04:09 +00:00
Simon Atanasyan 8d59c8da41 [obj2yaml][ELF] Do not print empty Link and Info fields for ELF sections.
llvm-svn: 208905
2014-05-15 18:04:02 +00:00
Juergen Ributzka bcbed0a549 Revert "[PM] Add pass run listeners to the pass manager."
Revert the current implementation and C API. New implementation and C APIs are
in the works.

llvm-svn: 208904
2014-05-15 17:49:20 +00:00
Chandler Carruth 332e1b1909 Exclude MSVC to try to unbreak their builds. We have a bad skew between
how CMake drives a windows link and how our custom command does.

llvm-svn: 208903
2014-05-15 16:33:58 +00:00
Bradley Smith 597122b026 [ARM64] Improve diagnostics for Cn operands in SYS instructions
llvm-svn: 208902
2014-05-15 16:28:32 +00:00
Ben Langmuir ef914b89b4 Use the virtual name of headers when searching for a module
When using the VFS, we want the virtual header location when searching
for a framework module, since that will be the one in the correct
directory structure for the module.

I'll add a regression test once I finish reducing the larger one I have.

llvm-svn: 208901
2014-05-15 16:20:33 +00:00
Simon Atanasyan 73e047e54c [yaml2obj] Add "-o" command line option to specify an output file name.
llvm-svn: 208900
2014-05-15 16:14:02 +00:00
Timur Iskhodzhanov bd6cee7cc3 [ASan/Win tests] Add memcpy/strdup/strlen interception tests
llvm-svn: 208899
2014-05-15 16:02:56 +00:00
Alexander Kornienko 6262d2349c Fixed incorrect StringRef::find usage.
llvm-svn: 208898
2014-05-15 15:56:58 +00:00
NAKAMURA Takumi 2d35a06080 llvm/test/CodeGen/X86/combine-sse41-intrinsics.ll: Add explicit triple.
llvm-svn: 208897
2014-05-15 15:45:31 +00:00
Chandler Carruth 57e0ec7d20 Teach the compiler-rt custom compilation and linking CMake rules used
for sanitizers to pass the C++ compilation and exe linking flags through
from the host CMake configuration. We pass the target flags afterward,
allowing them to trump flags as needed. This is particularly important
when the flags direct Clang, even the just-built-Clang, toward the
standard library, linker, and other tools to use.

llvm-svn: 208896
2014-05-15 15:21:11 +00:00
Andrea Di Biagio d621120533 [X86] Teach the backend how to fold SSE4.1/AVX/AVX2 blend intrinsics.
Added target specific combine rules to fold blend intrinsics according
to the following rules:
 1) fold(blend A, A, Mask) -> A;
 2) fold(blend A, B, <allZeros>) -> A;
 3) fold(blend A, B, <allOnes>) -> B.

Added two new tests to verify that the new folding rules work for all
the optimized blend intrinsics.

llvm-svn: 208895
2014-05-15 15:18:15 +00:00
Zoran Jovanovic d6879febdc [mips][mips64r6] Add CLASS.fmt instructions
Differential Revision: http://reviews.llvm.org/D3712

llvm-svn: 208894
2014-05-15 15:16:36 +00:00
Timur Iskhodzhanov 5910d6d126 [ASan/Win tests] Add more DLL tests
llvm-svn: 208893
2014-05-15 15:13:06 +00:00
Zoran Jovanovic bdf1cd374f [mips][mips64r6] Add RINT.fmt instructions
Differential Revision: http://reviews.llvm.org/D3711

llvm-svn: 208892
2014-05-15 15:04:37 +00:00
Zoran Jovanovic 702d27e4db [mips][mips64r6] Add SELEQZ/SELNEZ.fmt instructions
Differential Revision: http://reviews.llvm.org/D3710

llvm-svn: 208891
2014-05-15 14:58:42 +00:00
Zoran Jovanovic 11d4ce1788 [mips][mips64r6] Add MAX/MIN/MAXA/MINA.fmt instructions
Differential Revision: http://reviews.llvm.org/D3709

llvm-svn: 208890
2014-05-15 14:54:06 +00:00
Timur Iskhodzhanov e23889692b [ASan/Win tests] Add more DLL tests: malloc & friends
llvm-svn: 208889
2014-05-15 14:42:41 +00:00
Tom Stellard 436780bebb R600/SI: Stop using VSrc_* as the default register class for types.
We now use SReg_* for integer types and VReg_* for floating-point types.
This should help simplify the SIFixSGPRCopies pass and no longer causes
ISel to insert a COPY after termiator instuctions that output a value.

This change is covered by exisitng tests.

llvm-svn: 208888
2014-05-15 14:41:57 +00:00
Tom Stellard a568738b47 R600/SI: Fix a bug with handling of INSERT_SUBREG in SIFixSGPRCopies
This prevents a future commit from regressing the load-i1.ll test.

llvm-svn: 208887
2014-05-15 14:41:55 +00:00