Commit Graph

171853 Commits

Author SHA1 Message Date
Diego Novillo a9298b2297 Add support for optimization reports.
Summary:
This patch adds backend support for -Rpass=, which indicates the name
of the optimization pass that should emit remarks stating when it
made a transformation to the code.

Pass names are taken from their DEBUG_NAME definitions.

When emitting an optimization report diagnostic, the lack of debug
information causes the diagnostic to use "<unknown>:0:0" as the
location string.

This is the back end counterpart for

http://llvm-reviews.chandlerc.com/D3226

Reviewers: qcolombet

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3227

llvm-svn: 205774
2014-04-08 16:42:34 +00:00
Ben Langmuir 1e25822f4d Have validate-system-headers override validate-once-per-build-session
llvm-svn: 205773
2014-04-08 15:36:28 +00:00
NAKAMURA Takumi 35289340de X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused DW_LNE_set_address was misemitted on x64.
FIXME: I haven't investigate whether CalleeSaveStackSlotSize should be 8.
llvm-svn: 205772
2014-04-08 15:28:50 +00:00
Ed Maste 4a06df95b9 Accept DWARF version 2 and 3 in debug_line tables
Issue reported by Matthew Gardiner.  Further work is necessary to
synchronize LLDB's DWARF classes with the derivatives now in LLVM.

llvm-svn: 205771
2014-04-08 15:12:07 +00:00
Virgile Bello 97a70e4f7e Added i686 architecture (ArchSpec::Core::eCore_x86_32_i686).
llvm-svn: 205770
2014-04-08 14:48:48 +00:00
Virgile Bello 8250ebdd8a Improve demangler to compile with MSVC.
llvm-svn: 205769
2014-04-08 14:46:44 +00:00
Daniel Jasper b77105d2ce clang-format: Fix incorrect multi-block-parameter computation.
llvm-svn: 205763
2014-04-08 14:04:31 +00:00
Richard Smith 50996ce1e3 If a header is explicitly included in module A, and excluded from an umbrella
directory in module B, don't include it in module B!

llvm-svn: 205762
2014-04-08 13:13:04 +00:00
Daniel Jasper 139d4a3875 clang-format: Correctly understand arrays of pointers.
Before:
  A<int * []> a;

After:
  A<int *[]> a;

This fixes llvm.org/PR19360.

llvm-svn: 205761
2014-04-08 13:07:41 +00:00
Daniel Jasper d74cf40386 clang-format: Extend AllowShortFunctions.. to only merge inline functions.
Before AllowShortFunctionsOnASingleLine could either be true, merging
all functions, or false, merging no functions. This patch adds a third
value "Inline", which can be used to only merge short functions defined
inline in a class, i.e.:

  void f() {
    return 42;
  }

  class C {
    void f() { return 42; }
  };

llvm-svn: 205760
2014-04-08 12:46:38 +00:00
Alexander Kornienko 9eb8c92b52 Output clang-tidy errors in a consistent order.
Summary: Sort errors by path, file offset and message.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits

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

llvm-svn: 205759
2014-04-08 12:27:49 +00:00
Tim Northover 33d07468bc ARM64: fix fmsub patterns which assumed accum operand was first
Confusingly, the NEON fmla instructions put the accumulator first but the
scalar versions put it at the end (like the fma lib function & LLVM's
intrinsic).

This should fix PR19345, assuming there's only one issue.

llvm-svn: 205758
2014-04-08 12:23:51 +00:00
Richard Smith 6c6bbfab19 PR19346: Adding 0 to a null pointer has defined behavior in C++. Allow it in constant expressions.
llvm-svn: 205757
2014-04-08 12:19:28 +00:00
Joerg Sonnenberger 7955feb82f The content of .eh_frame may be misaligned, so use memcpy. This is seen
in the wild on SH3.

llvm-svn: 205756
2014-04-08 11:43:49 +00:00
Richard Smith 559c8623c5 The LLVM C API shouldn't be including a file from the C++ API. Especially not a
file that it doesn't use.

llvm-svn: 205755
2014-04-08 10:47:04 +00:00
Elena Demikhovsky 3dcfbdfa54 AVX-512: Added fp_to_uint and uint_to_fp patterns.
llvm-svn: 205754
2014-04-08 07:24:02 +00:00
Andrew Trick 02066f2a4d Fix a (legacy) PassManager crash that occurs when a ModulePass
indirectly requires a function analysis.

This bug was reported by Jason Kim. He included a test case here:
http://reviews.llvm.org/D3312

llvm-svn: 205753
2014-04-08 03:40:34 +00:00
David Majnemer c9d2625586 X86: Split the relocation selection up
Before, we would have conditional operators where one side of the
operator would be of type RelocationTypeAMD64 and the other is of type
RelocationTypeI386.  GCC would noisly warn with -Wenum-compare
diagnostic.

Instead, refactor the code so it is more like the X86 ELF object writer.

llvm-svn: 205752
2014-04-08 02:15:13 +00:00
Reid Kleckner 592dc61acf intrin.h: Implement __readmsr, __readcr3, and __writecr3
Fixes PR19301.

Based on a patch from Steven Graf!

llvm-svn: 205751
2014-04-08 00:28:22 +00:00
Greg Clayton 86e70cb3ac Fixed an issue where if you called:
SBTarget::AddModule(const char *path,
                    const char *triple,
                    const char *uuid_cstr,
                    const char *symfile);
                    
If "symfile" was filled in, it would cause us to not correctly add the module. Same goes for:

SBTarget::AddModule(SBModuleSpec ...)

Where you filled in the symfile.

<rdar://problem/16529799>

llvm-svn: 205750
2014-04-07 23:50:17 +00:00
Jim Grosbach e75c048ab9 Tidy up comments a bit.
Punctuation, grammar, formatting, etc..

llvm-svn: 205749
2014-04-07 23:47:23 +00:00
Jim Grosbach 75010e7712 ARM64: Range based for loop in ARM64PromoteConstant pass
llvm-svn: 205748
2014-04-07 23:47:21 +00:00
Jim Grosbach 64a28e70c8 ARM64: Clean up file header comment a bit.
llvm-svn: 205747
2014-04-07 23:14:38 +00:00
David Majnemer a1c861d379 obj2yaml: Use the correct relocation type for different machine types
The IO normalizer would essentially lump I386 and AMD64 relocations
together.  Relocation types with the same numeric value would then get
mapped in appropriately.

For example:
IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric
value of one.  We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions
of object files with a machine type of IMAGE_FILE_MACHINE_AMD64.

llvm-svn: 205746
2014-04-07 23:12:20 +00:00
DeLesley Hutchins 11bb308739 Thread Safety Analysis: various fixes to new SExpr code.
Implemented ownership policy, updated to use nullptr, const-cleanup.

llvm-svn: 205745
2014-04-07 22:56:24 +00:00
Sean Silva 397ee6ec98 [docs] Fix some links
The TableGen docs have changed structure

Patch by Tay Ray Chuan!

llvm-svn: 205744
2014-04-07 22:46:40 +00:00
Sean Silva 0b4df9b3f4 [docs] Update link title
docs/TableGen/ is not really just "fundamentals" anymore, but rather
more of a portal for all things TableGen.

llvm-svn: 205743
2014-04-07 22:42:53 +00:00
Sean Silva d02bf3e0e5 [docs] Fix some Sphinx warnings that have crept in.
llvm-svn: 205742
2014-04-07 22:29:53 +00:00
Reed Kotler 735da8e015 Reverting commit r205628 due to mips64 issues.
llvm-svn: 205741
2014-04-07 22:11:40 +00:00
Greg Clayton c7797accb8 Fixed a case where we could spin indefinitely if we got an error from fgets that isn't EINTR.
<rdar://problem/16535437>

llvm-svn: 205740
2014-04-07 21:37:59 +00:00
Greg Clayton 78d1019703 Cleanup the code a bit.
llvm-svn: 205739
2014-04-07 21:37:03 +00:00
Andrew Trick 8d007bb5d4 Put a limit on ScheduleDAGSDNodes::ClusterNeighboringLoads to avoid blowing up compile time.
Fixes PR16365 - Extremely slow compilation in -O1 and -O2.

The SD scheduler has a quadratic implementation of load clustering
which absolutely blows up compile time for large blocks with constant
pool loads. The MI scheduler has a better implementation of load
clustering. However, we have not done the work yet to completely
eliminate the SD scheduler. Some benchmarks still seem to benefit from
early load clustering, although maybe by chance.

As an intermediate term fix, I just put a nice limit on the number of
DAG users to search before finding a match. With this limit there are no
binary differences in the LLVM test suite, and the PR16365 test case
does not suffer any compile time impact from this routine.

llvm-svn: 205738
2014-04-07 21:29:22 +00:00
Rui Ueyama e6c499acd7 Early continue to reduce nesting.
llvm-svn: 205737
2014-04-07 21:13:33 +00:00
Rui Ueyama 5de951d8c1 No else after return.
llvm-svn: 205736
2014-04-07 21:01:11 +00:00
Rui Ueyama feab78785b [ELF] Unit tests for -o and --noinhibit-exec.
llvm-svn: 205735
2014-04-07 20:52:48 +00:00
Greg Clayton 521c2278ab Disable JITLoaderGDB on "vendor == apple" for now due to performance slowdowns for every first run process as a global name lookup in all shared libraries if performed.
<rdar://problem/16542894>

llvm-svn: 205734
2014-04-07 20:13:57 +00:00
DeLesley Hutchins 43fd21a045 Thread Safety Analysis: fix warning.
llvm-svn: 205733
2014-04-07 19:51:32 +00:00
Tom Stellard 204e61bbdf R600/SI: Handle INSERT_SUBREG in SIFixSGPRCopies
llvm-svn: 205732
2014-04-07 19:45:45 +00:00
Tom Stellard 50122a5890 R600: Match 24-bit arithmetic patterns in a Target DAGCombine
Moving these patterns from TableGen files to PerformDAGCombine()
should allow us to generate better code by eliminating unnecessary
shifts and extensions earlier.

This also fixes a bug where the MAD pattern was calling
SimplifyDemandedBits with a 24-bit mask on the first operand
even when the full pattern wasn't being matched.  This occasionally
resulted in some instructions being incorrectly deleted from the
program.

v2:
  - Fix bug with 64-bit mul

llvm-svn: 205731
2014-04-07 19:45:41 +00:00
Tom Stellard 3cbe014027 R600: Replace dyn_cast + assert with cast
llvm-svn: 205730
2014-04-07 19:31:13 +00:00
Reid Kleckner 0dc06b9a3d -fms-extensions: Don't define __PRETTY_FUNCTION__ to __FUNCTION__
This reverts r90596 from 2009. Having this macro definition makes Clang
strictly less useful with -fms-extensions.

llvm-svn: 205729
2014-04-07 19:27:58 +00:00
DeLesley Hutchins b2213910de Thread Safety Analysis: update to internal SExpr handling.
This patch is the first part of a significant refactoring that seeks to restore
sanity to way thread safety analysis deals with capability expressions.  The
current patch merely provides an outline of the structure of the new system.
It's not yet connected to the actual analysis, so there's no change in
functionality.

llvm-svn: 205728
2014-04-07 18:09:54 +00:00
Reid Kleckner bf94e6e14d Mangle the vbptr offset into pointers to member functions
This can actually be non-zero if you override a function from a virtual
base and you have forced the most_general pointer to member
representation.

llvm-svn: 205727
2014-04-07 18:07:03 +00:00
Richard Smith 851dbd5602 Remove an unused file.
Using this file would result in an odr violation: it defines an llvm::Interval
class that conflicts with the one in Analysis/Interval.h.

llvm-svn: 205726
2014-04-07 17:17:00 +00:00
Richard Smith 592fe8803c When a CHECK-NEXT fails because there was no match on the next line, include
the non-matching next line in the diagnostic to make the problem more obvious.

llvm-svn: 205725
2014-04-07 17:09:53 +00:00
Matt Arsenault 4be76e99fe Use std::swap
llvm-svn: 205723
2014-04-07 16:44:26 +00:00
Matt Arsenault 7939acd7fa Use .data() instead of &x[0]
llvm-svn: 205722
2014-04-07 16:44:24 +00:00
Jordan Rose 7f07fc1fee [analyzer] Fix mistake in example for potential checker "posix.Errno".
Found by Richard Osbourne!

llvm-svn: 205721
2014-04-07 16:36:15 +00:00
Jordan Rose 9c8a5ff161 [analyzer] Re-enable test I accidentally committed commented-out.
Thanks, Alex!

llvm-svn: 205720
2014-04-07 16:36:08 +00:00
Ed Maste 8b2c281a75 Correct typo: waychpoint -> watchpoint
llvm-svn: 205719
2014-04-07 16:33:53 +00:00