Commit Graph

175085 Commits

Author SHA1 Message Date
Peter Collingbourne 0a4376190f Add an extension point for peephole optimizers.
This extension point allows adding passes that perform peephole optimizations
similar to the instruction combiner. These passes will be inserted after
each instance of the instruction combiner pass.

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

llvm-svn: 209595
2014-05-25 10:27:02 +00:00
Simon Atanasyan bacee46924 [Mips] Reduce code duplication. Join relocation handling functions which
perform calculations for R_MIPS_GOT16 and R_MIPS_CALL16 relocations.

llvm-svn: 209594
2014-05-25 10:07:04 +00:00
Simon Atanasyan 6c68ffe3ef [Mips] Factor out the code assign a value to the absolute atom into the
separate function.

llvm-svn: 209593
2014-05-25 09:05:06 +00:00
Simon Atanasyan 23fe15a62d [Mips] Factor out the code create Mips specific runtime file into
the MipsELFWriters member function.

llvm-svn: 209592
2014-05-25 09:04:57 +00:00
Simon Atanasyan f7534383f5 [Mips] Remove unused class member declaration.
llvm-svn: 209591
2014-05-25 09:04:45 +00:00
Simon Atanasyan 6d1a09f39f [Mips] Reduce code duplication. Join relocation handling functions which
perform similar calculations.

llvm-svn: 209590
2014-05-25 09:04:15 +00:00
Hans Wennborg 12d1e24da2 Fix some misplaced spaces around 'override'
llvm-svn: 209589
2014-05-24 20:19:40 +00:00
Hans Wennborg 905f806098 Fix some misplaced spaces around 'override'
llvm-svn: 209588
2014-05-24 20:18:32 +00:00
Saleem Abdulrasool 443264c51f build: sort llvm-readobj sources
Sort the source files.  NFC.

llvm-svn: 209587
2014-05-24 20:04:21 +00:00
Saleem Abdulrasool 12688f40c1 llvm-readobj: remove some dead code
llvm-svn: 209586
2014-05-24 19:54:28 +00:00
Tim Northover 391f93a554 AArch64: disable FastISel for large code model.
The code emitted is what would be expected for the small model, so it
shouldn't be used when objects can be the full 64-bits away.

This fixes MCJIT tests on Linux.

llvm-svn: 209585
2014-05-24 19:45:41 +00:00
Andreas Simbuerger 7cd0df41bf ScopDetectionDiagnostic: Update Makefile
llvm-svn: 209584
2014-05-24 18:51:14 +00:00
NAKAMURA Takumi 98247b3a75 ClangTidyOptionsTest.cpp: Rewrite literals. Raw string literals are unavailable on msc17.
llvm-svn: 209583
2014-05-24 17:22:01 +00:00
Simon Atanasyan 2ffbb19335 [Mips] Handle R_MIPS_TLS_TPREL_HI16 / R_MIPS_TLS_TPREL_LO16 relocations.
llvm-svn: 209582
2014-05-24 16:45:31 +00:00
Benjamin Kramer 5256ce37ac MachineVerifier: Clean up some syntactic weirdness left behind by find&replace.
No functionality change.

llvm-svn: 209581
2014-05-24 13:31:10 +00:00
Benjamin Kramer 389cec0d3e CodeGen: Make MachineBasicBlock::back skip to the beginning of the last bundle.
This makes front/back symmetric with begin/end, avoiding some confusion.
Added instr_front/instr_back for the old behavior, corresponding to
instr_begin/instr_end. Audited all three in-tree users of back(), all
of them look like they don't want to look inside bundles.

Fixes an assertion (PR19815) when generating debug info on mips, where a
delay slot was bundled at the end of a branch.

llvm-svn: 209580
2014-05-24 13:13:17 +00:00
Tim Northover 573cbee543 AArch64/ARM64: rename ARM64 components to AArch64
This keeps Clang consistent with backend naming conventions.

llvm-svn: 209579
2014-05-24 12:52:07 +00:00
Tim Northover 25e8a6754e AArch64/ARM64: update Clang after AArch64 removal.
A few (mostly CodeGen) parts of Clang were tightly coupled to the
AArch64 backend. Now that it's gone, they will not even compile.

I've also deduplicated RUN lines in many of the AArch64 tests. This
might improve "make check-all" time noticably: some of those NEON
tests were monsters.

llvm-svn: 209578
2014-05-24 12:51:25 +00:00
Tim Northover 3b0846e8f7 AArch64/ARM64: move ARM64 into AArch64's place
This commit starts with a "git mv ARM64 AArch64" and continues out
from there, renaming the C++ classes, intrinsics, and other
target-local objects for consistency.

"ARM64" test directories are also moved, and tests that began their
life in ARM64 use an arm64 triple, those from AArch64 use an aarch64
triple. Both should be equivalent though.

This finishes the AArch64 merge, and everyone should feel free to
continue committing as normal now.

llvm-svn: 209577
2014-05-24 12:50:23 +00:00
Tim Northover cc08e1fe1b AArch64/ARM64: remove AArch64 from tree prior to renaming ARM64.
I'm doing this in two phases for a better "git blame" record. This
commit removes the previous AArch64 backend and redirects all
functionality to ARM64. It also deduplicates test-lines and removes
orphaned AArch64 tests.

The next step will be "git mv ARM64 AArch64" and rewire most of the
tests.

Hopefully LLVM is still functional, though it would be even better if
no-one ever had to care because the rename happens straight
afterwards.

llvm-svn: 209576
2014-05-24 12:42:26 +00:00
Andreas Simbuerger f6ee78cfb7 Expose diagnostic info to users
llvm-svn: 209575
2014-05-24 09:25:14 +00:00
Andreas Simbuerger 0447240ee9 ScopDetection: Support keep-going
Support a 'keep-going' mode for the ScopDetection. In this mode, we just keep
on detecting, even if we encounter an error.

This is useful for diagnosing SCoP candidates. Sometimes you want all the
errors. Invalid SCoPs will still be refused in the end, we just refuse to
abort on the first error.

llvm-svn: 209574
2014-05-24 09:25:10 +00:00
Andreas Simbuerger 8a00c9bb0f Substitue LastError & InvalidRegions with RejectLogs
Use the new ScopDetectionDiagnostics to implement
the same functionality.

llvm-svn: 209573
2014-05-24 09:25:06 +00:00
Andreas Simbuerger 4870e091ec Store all RejectReasons that occurred in a log.
This stores all RejectReasons created for one region
in a RejectLog inside the DetectionContext. For now
this only keeps track of the last error.

A separate patch will enable the tracking of all errors.
This patch itself does no harm (yet).

llvm-svn: 209572
2014-05-24 09:25:01 +00:00
Andreas Simbuerger 320af405d6 Split implementation from ScopDetectionDiagnostic.h
We don't want the Statistic variables in every module that
includes the diagnostics.

llvm-svn: 209571
2014-05-24 09:24:53 +00:00
NAKAMURA Takumi e8faaa0c58 llvm/test/Object/ar-error.test: Don't check the message "No such file or directory".
It didn't match on non-English version of Windows.

llvm-svn: 209570
2014-05-24 08:47:11 +00:00
NAKAMURA Takumi f6a37d396c clang-tools-extra/test/clang-tidy/line-filter.cpp: Tweak line-filter.
On win32, %s is expanded to X:\path\to\test\line-filter.cpp. It was incompatible to yaml.
Although "%/s" could be available in Lit, ClangTidyDiagnosticConsumer::passesLineFilter() is unaware of comparision between '/' and '\\'.

llvm-svn: 209569
2014-05-24 08:42:12 +00:00
Michael Zolotukhin d4c724625a Implement sext(C1 + C2*X) --> sext(C1) + sext(C2*X) and
sext{C1,+,C2} --> sext(C1) + sext{0,+,C2} transformation in Scalar
Evolution.

That helps SLP-vectorizer to recognize consecutive loads/stores.

<rdar://problem/14860614>

llvm-svn: 209568
2014-05-24 08:09:57 +00:00
Yaron Keren 188cafb030 CXXInfo memory should be released after calling the destructor
instead of before. The wrong order had no effect since Deallocate() 
does nothing right now, but we may replace allocator in the future.

llvm-svn: 209567
2014-05-24 07:19:25 +00:00
Tim Northover e471e43484 ARM64: extract a 32-bit subreg when selecting an inreg extend
After the load/store refactoring, we were sometimes trying to feed a
GPR64 into a 32-bit register offset operand. This failed in
copyPhysReg.

llvm-svn: 209566
2014-05-24 07:05:42 +00:00
Hans Wennborg e9277401b7 This test doesn't need -O2 -disable-llvm-optzns
I forgot to fix this one in r209145. We use these flags on dllimport tests
to make sure we emit code for available_externaly functions and don't inline
the IR.

llvm-svn: 209564
2014-05-23 23:29:44 +00:00
Jason Molenda 4da8706e5d Add a lock ivar to the Platform so that multiple Targets
trying to populate the list of trap handler names at
the same time don't conflict with one another.
<rdar://problem/17011969> 

llvm-svn: 209563
2014-05-23 23:11:27 +00:00
Todd Fiala 771bb72aa7 Remove some unnecessary comments from previous check-in.
Removed a "done" TODO comment.

Moved some helper methods to the top of the unit test.

Removed some commented out code I was considering implementing
before I came up with a better overall approach.

llvm-svn: 209561
2014-05-23 22:33:42 +00:00
Todd Fiala dee6d286de Added gdb remote tests to verify $Hg{thread-id}.
Added test to check that each thread reported by $q{f,s}ThreadInfo
can be switched to by $Hg, verified by a follow-up $qC.

Modified test exe to accept "thread:new" to create a new thread 
that runs and sleeps for 5 seconds.

@llgs_test/@debugserver_test now buffer output.
   
llgs and debugserver gdbremote protocol tests now collect $O notification
output into the context returned from expect_lldb_gdbserver_replay.
context["O_count"] is an integer indicating the number of $O packets
collected during the replay, and context["O_content"] contains the
accumulated hex-decoded text output by the inferior (stdout and stderr).

Modified the $O check test to check the accumulated output rather than
a direct $O packet.

llvm-svn: 209560
2014-05-23 22:25:29 +00:00
Akira Hatanaka c0303355e9 Recommit r209532 with -ffreestanding.
This is a test case for r209489.

llvm-svn: 209559
2014-05-23 22:12:01 +00:00
Akira Hatanaka d59c92d047 Remove test while I investigate why the test is breaking the bots.
llvm-svn: 209558
2014-05-23 21:35:50 +00:00
Richard Smith a1406fa513 Recompute the injected class name type for a class template specialization
rather than saving and restoring it.

llvm-svn: 209557
2014-05-23 21:31:59 +00:00
Akira Hatanaka 3f1b632ad8 XFAIL test which is breaking some of the build bots.
llvm-svn: 209556
2014-05-23 21:24:24 +00:00
Reid Kleckner 563f0e852c Use comdats to avoid double initialization of weak data
Initializers of global data that can appear multiple TUs (static data
members of class templates or __declspec(selectany) data) are now in a
comdat group keyed on the global variable being initialized.  On
non-Windows platforms, this is a code size and startup time
optimization.  On Windows, this is necessary for ABI compatibility with
MSVC.

Fixes PR16959.

Reviewers: rsmith

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

llvm-svn: 209555
2014-05-23 21:13:45 +00:00
David Blaikie 2f75351c02 DebugInfo: Generalize some tests to handle variations in attribute ordering.
In an effort to fix inlined debug info in situations where the out of
line definition of a function preceeds any inlined usage, the order in
which some attributes are added to subprogram DIEs may change. (in
essence, definition-necessary attributes like DW_AT_low_pc/high_pc will
be added immediately, but the names, types, and other features will be
delayed to module end where they may either be added to the subprogram
DIE or instead reference an abstract definition for those values)

These tests can be generalized to be resilient to this change. 5 or so
tests actually have to be incompatibly changed to cope with this
reordering and will go along with the change that affects the order.

llvm-svn: 209554
2014-05-23 21:11:46 +00:00
David Blaikie 71ed20f671 DebugInfo: Generalize a test case to not depend on abbreviation numbering.
It's an unnecessary detail for this test and just gets in the way when
making unrelated changes to the output in this test.

llvm-svn: 209553
2014-05-23 21:07:01 +00:00
Richard Smith 871cd4c131 [modules] If a referenced-but-not-instantiated class template specialization
gets explicitly specialized, don't reuse the previous class template
specialization declaration as a new declaration. The benefit here is fairly
marginal, it harms source fidelity, and this is horrible to model if the
specialization was imported from another module (without this change, it
asserts or worse).

llvm-svn: 209552
2014-05-23 21:00:28 +00:00
Andrew Trick b429083aff Test case comments. Fix sloppiness.
llvm-svn: 209551
2014-05-23 20:46:21 +00:00
Rafael Espindola ef2c4fb25b clang-format function.
llvm-svn: 209550
2014-05-23 20:39:23 +00:00
Hans Wennborg a926d84c4b Emit used/dllexport inline method definitions in nested classes (PR19743, PR11170)
The previous code that was supposed to handle this didn't work
since parsing of inline method definitions is delayed to the end
of the outer class definition. Thus, when HandleTagDeclDefinition()
got called for the inner class, the inline functions in that class
had not been parsed yet.

Richard suggested that the way to do this is by handling inline
method definitions through a new ASTConsumer callback.

I really wanted to call ASTContext::DeclMustBeEmitted() instead of
checking for attributes, but doing that causes us to compute linkage,
and then we fail with "error: unsupported: typedef changes linkage
of anonymous type, but linkage was already computed" on tests like
this: (from SemaCXX/undefined-internal.cpp) :-/

  namespace test7 {
    typedef struct {
      void bar();
      void foo() { bar(); }
    } A;
  }

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

llvm-svn: 209549
2014-05-23 20:37:38 +00:00
Rafael Espindola d246759973 Remove a confusing use of a static method.
No functionality change.

llvm-svn: 209548
2014-05-23 20:35:47 +00:00
David Blaikie 169ffe41af DebugInfo: Put concrete definitions referencing abstract definitions in the same scope as the abstract definition.
This seems like a simple cleanup/improved consistency, but also helps
lay the foundation to fix the bug mentioned in the test case: concrete
definitions preceeding any inlined usage aren't properly split into
concrete + abstract (because they're not known to need it until it's too
late).

Once we start deferring this choice until later, we won't have the
choice to put concrete definitions for inlined subroutines in a
different scope from concrete definitions for non-inlined subroutines
(since we won't know at time-of-construction which one it'll be). This
change brings those two cases into alignment ahead of that future
chaneg/fix.

llvm-svn: 209547
2014-05-23 20:25:15 +00:00
Hans Wennborg be4be16be3 Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt mode
It's true the MSVC doesn't warn about dllimport when applied to e.g. a typedef,
but that applies to dllexport too. I'd like us to be consistent, and I think
the right thing to do is to warn.

The original test that came with implementing the old behaviour doesn't provide
a good motivation, and it said it was checking that we're not repoting an *error*,
which is still true since this is just a warning.

There are plenty of tests e.g. in Sema/dllimport.c to check that we do warn
about dllimport on non functions or variables.

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

llvm-svn: 209546
2014-05-23 20:16:41 +00:00
Andrew Trick 839e30b2c0 Fix and improve SCEV ComputeBackedgeTankCount.
This is a follow-up to r209358: PR19799: Indvars miscompile due to an
incorrect max backedge taken count from SCEV.

That fix was incomplete as pointed out by Arnold and Michael Z. The
code was also too confusing. It needed a careful rewrite with more
unit tests. This version will also happen to optimize more cases.

<rdar://17005101> PR19799: Indvars miscompile...

llvm-svn: 209545
2014-05-23 19:47:13 +00:00
Nico Rieck fe2413692f Revert part of "Fix broken FileCheck prefixes"
This reverts part of commit r209538.

llvm-svn: 209544
2014-05-23 19:33:49 +00:00