Commit Graph

175102 Commits

Author SHA1 Message Date
Craig Topper 236bde3d6f [C++11] Use 'nullptr'.
llvm-svn: 209612
2014-05-26 06:21:51 +00:00
David Blaikie ab53c91010 DwarfUnit: Remove some misleading no-op code introduced in r204162.
Post commit review feedback from Manman called this out, but it looks
like it slipped through the cracks.

llvm-svn: 209611
2014-05-26 05:32:21 +00:00
Rafael Espindola f557536f56 Just check the entire string.
Thanks to David Blaikie for the suggestion.

llvm-svn: 209610
2014-05-26 04:08:51 +00:00
NAKAMURA Takumi f1b81c6e04 Reformat linefeeds.
llvm-svn: 209609
2014-05-26 00:25:26 +00:00
NAKAMURA Takumi 2667c3eac5 Trailing whitespace.
llvm-svn: 209608
2014-05-26 00:25:09 +00:00
Saleem Abdulrasool 65dbbb5dd6 tools: avoid use of std::function
Remove the use of the std::function and replace the capturing lambda with a
non-capturing one, opting to pass the user data down to the context.  This is
needed as std::function is not yet available on all hosted platforms (it
requires RTTI, which breaks on Windows).

Thanks to Nico Rieck for pointing this out!

llvm-svn: 209607
2014-05-25 21:37:59 +00:00
Saleem Abdulrasool e8839a755a tools: split out Win64EHDumper from COFFDumper
Move the implementation of the Win64 EH printer from the COFFDumper into its own
class.  This is in preparation for adding support to print ARM EH information.
The only real change here is in printUnwindInfo where we now lambda lift the
implicit this parameter for the resolveFunction.  Also setup the printing to
handle ARM.  This now has set the stage to introduce ARM EH printing.

llvm-svn: 209606
2014-05-25 20:26:45 +00:00
Saleem Abdulrasool 4e08f62775 tools: inline simple single-use function
This inlines the single use function in preparation for splitting the Win64EH
printing out of the COFFDumper into its own entity.

llvm-svn: 209605
2014-05-25 20:26:40 +00:00
Saleem Abdulrasool 5dd27f42f9 tools: refactor COFFDumper symbol resolution logic
Make the use of the cache more transparent to the users.  There is no reason
that the cached entries really need to be passed along.  The overhead for doing
so is minimal: a single extra parameter.  This requires that some standalone
functions be brought into the COFFDumper class so that they may access the
cache.

llvm-svn: 209604
2014-05-25 20:26:37 +00:00
Saleem Abdulrasool 3617c96d46 tools: use references rather than out pointers in COFFDumper
Switch to use references for parameters that are guaranteed to be non-null.
Simplifies the code a slight bit in preparation for another change.

llvm-svn: 209603
2014-05-25 20:26:33 +00:00
David Blaikie ea86226774 DebugInfo: Fix inlining with #file directives a little harder
Seems my previous fix was insufficient - we were still not adding the
inlined function to the abstract scope list. Which meant it wasn't
flagged as inline, didn't have nested lexical scopes in the abstract
definition, and didn't have abstract variables - so the inlined variable
didn't reference an abstract variable, instead being described
completely inline.

llvm-svn: 209602
2014-05-25 18:11:35 +00:00
David Blaikie 69d3406a2d Streamline test case by avoiding a temporary file and piping llc output straight to llvm-dwarfdump
We still do temporary files in many cases, just updating this particular
one because I was debugging it and made this change while doing so.

llvm-svn: 209601
2014-05-25 15:38:52 +00:00
Rafael Espindola 4a04c4b69c Emit data or code export directives based on the type.
Currently we look at the Aliasee to decide what type of export
directive to use. It seems better to use the type of the alias
directly. This is similar to how we handle the alias having the
same address but other attributes (linkage, visibility) from the
aliasee.

With this patch it is now possible to do things like

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
@foo = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16
@f = dllexport alias i32 (), [6 x i8]* @foo
!llvm.module.flags = !{!0}
!0 = metadata !{i32 6, metadata !"Linker Options", metadata !1}
!1 = metadata !{metadata !2, metadata !3}
!2 = metadata !{metadata !"/DEFAULTLIB:libcmt.lib"}
!3 = metadata !{metadata !"/DEFAULTLIB:oldnames.lib"}

llvm-svn: 209600
2014-05-25 12:49:07 +00:00
Rafael Espindola d234b0f08c Make these CHECKs a bit more strict.
The " at the end of the line makes sure we matched the entire directive.

llvm-svn: 209599
2014-05-25 12:43:13 +00:00
Nico Rieck 68694b53ab Sema: Add dll attribute tests for member functions
llvm-svn: 209598
2014-05-25 10:35:03 +00:00
Nico Rieck 99f12ef44f Sema: Add dll attribute tests for variable templates
llvm-svn: 209597
2014-05-25 10:34:36 +00:00
Nico Rieck 755a36f593 IRGen: Add more tests for dll attributes
llvm-svn: 209596
2014-05-25 10:34:16 +00:00
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