OSDN Git Service
Tom Stellard [Fri, 13 Feb 2015 16:15:32 +0000 (16:15 +0000)]
Help: Document how to build and install with CMake.
Resolves PR21569.
Patch by: Stephen Kelly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229122
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 13 Feb 2015 16:15:29 +0000 (16:15 +0000)]
Help: Document the minimum CMake version required.
Patch by: Stephen Kelly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229121
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 13 Feb 2015 16:00:03 +0000 (16:00 +0000)]
Add run line that was missing in r228999.
Also, change the run lines to use -allow-empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229118
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 13 Feb 2015 14:15:48 +0000 (14:15 +0000)]
[CodeGenPrepare] Removed duplicate logic. SimplifyCFG already knows how to speculate calls to cttz/ctlz.
SimplifyCFG now knows how to speculate calls to intrinsic cttz/ctlz that are
'cheap' for the target. Therefore, some of the logic in CodeGenPrepare
that was originally added at revision 224899 can now be removed.
This patch is basically a no functional change. It removes the duplicated
logic in CodeGenPrepare and converts all the existing target specific tests
for cttz/ctlz into SimplifyCFG tests.
Differential Revision: http://reviews.llvm.org/D7608
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229105
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Fri, 13 Feb 2015 12:04:42 +0000 (12:04 +0000)]
[PBQP] Conservativelly allocatable nodes can be spilled and give a better solution
Although such nodes are allocatable, the cost of spilling may be less than
allocating to register, so spilling the node may provide a better solution.
The assert does not account for this case, so remove it for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229103
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Feb 2015 11:08:40 +0000 (11:08 +0000)]
[SimplifyCFG] Add test for r229099
Add extra test that was accidentally not staged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229101
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 13 Feb 2015 10:48:30 +0000 (10:48 +0000)]
[SimplifyCFG] Be more aggressive
Up the phi node folding threshold from a cheap "1" to a meagre "2".
Update tests for extra added selects and slight code churn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229099
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Fri, 13 Feb 2015 10:30:57 +0000 (10:30 +0000)]
[mips] Improve support for the .set at/noat assembler directives.
Summary:
Made the following changes:
Added calls to emitDirectiveSetNoAt() and emitDirectiveSetAt().
Added special emit function for .set at=$reg, emitDirectiveSetAtWithArg(unsigned RegNo).
Improved parsing error checks for .set at.
Refactored parser code for .set at.
Improved testing of both directives.
Improved code readability and comments.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 10:21:05 +0000 (10:21 +0000)]
[PM] Update the examples to reflect the removal of the
llvm/PassManager.h wrapper header and its using declarations. These now
directly use the legacy namespace.
I had updated the #include lines in my large commit but forgot that the
examples weren't being built and didn't update the code to use the
correct namespace. Sorry for the noise here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 10:01:29 +0000 (10:01 +0000)]
[PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the
'legacy' namespace for the old pass manager.
This undoes the primary modules-hostile change I made to keep
out-of-tree targets building. I sent an email inquiring about whether
this would be reasonable to do at this phase and people seemed fine with
it, so making it a reality. This should allow us to start bootstrapping
with modules to a certain extent along with making it easier to mix and
match headers in general.
The updates to any code for users of LLVM are very mechanical. Switch
from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
Qualify the types which now produce compile errors with "legacy::". The
most common ones are "PassManager", "PassManagerBase", and
"FunctionPassManager".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 09:14:30 +0000 (09:14 +0000)]
Re-sort the #include lines in bindings and examples which I managed to
miss previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 09:09:03 +0000 (09:09 +0000)]
Re-sort #include lines using my handy dandy ./utils/sort_includes.py
script. This is in preparation for changes to lots of include lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229088
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 13 Feb 2015 07:55:29 +0000 (07:55 +0000)]
Fix the windows build *again*. Grrr, MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 07:52:39 +0000 (07:52 +0000)]
Revert a series of commits starting at r228886 which is triggering some
regressions for LLDB on Linux. Rafael indicated on lldb-dev that we
should just go ahead and revert these but that he wasn't at a computer.
The patches backed out are as follows:
r228980: Add support for having multiple sections with the name and ...
r228889: Invert the section relocation map.
r228888: Use the existing SymbolTableIndex intsead of doing a lookup.
r228886: Create the Section -> Rel Section map when it is first needed.
These patches look pretty nice to me, so hoping its not too hard to get
them re-instated. =D
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229080
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 13 Feb 2015 07:45:49 +0000 (07:45 +0000)]
Fix non-windows builds unhappy about a missing header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229079
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Feb 2015 07:42:25 +0000 (07:42 +0000)]
[X86] Add support for parsing and printing the mnemonic aliases for the XOP VPCOM instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229078
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Feb 2015 07:42:15 +0000 (07:42 +0000)]
[X86] Fix XOP vpcom intrinsic autoupgrade to map 'true' and 'false' to the correct immediates. Seems they were swapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229077
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 13 Feb 2015 07:40:03 +0000 (07:40 +0000)]
llvm-pdbdump: Add more comprehensive dumping of symbol types.
In particular this patch adds the ability to dump complete
function signature information including argument types as
correctly formatted strings. A side effect of this is that
almost all symbol and meta types are now formatted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229076
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 13 Feb 2015 07:38:04 +0000 (07:38 +0000)]
InstCombine: cleanup redundant dyn_cast<> (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229075
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Feb 2015 06:07:29 +0000 (06:07 +0000)]
Fix a typo in a comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229071
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Feb 2015 06:07:27 +0000 (06:07 +0000)]
Fix probable typo in test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229070
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Feb 2015 06:07:24 +0000 (06:07 +0000)]
[X86] Remove int_x86_sse2_psll_dq_bs and int_x86_sse2_psrl_dq_bs intrinsics. The builtins aren't used by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229069
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Feb 2015 06:07:14 +0000 (06:07 +0000)]
[X86] Remove references to builtin names that have been removed from clang. Hope to remove the intrinsics themselves soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 05:31:46 +0000 (05:31 +0000)]
[unroll] Concede defeat and disable the unroll analyzer for now.
The issues with the new unroll analyzer are more fundamental than code
cleanup, algorithm, or data structure changes. I've sent an email to the
original commit thread with details and a proposal for how to redesign
things. I'm disabling this for now so that we don't spend time
debugging issues with it in its current state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229064
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 13 Feb 2015 04:51:26 +0000 (04:51 +0000)]
[InstCombine] Fix a bug when combining `icmp` from `ptrtoint`
- First, there's a crash when we try to combine that pointers into `icmp`
directly by creating a `bitcast`, which is invalid if that two pointers are
from different address spaces.
- It's not always appropriate to cast one pointer to another if they are from
different address spaces as that is not no-op cast. Instead, we only combine
`icmp` from `ptrtoint` if that two pointers are of the same address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229063
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:39:05 +0000 (04:39 +0000)]
[unroll] Merge the simplification and DCE estimation methods on the
UnrollAnalyzer.
Now they share a single worklist and have less implicit state between
them. There was no real benefit to separating these two things out.
I'm going to subsequently refactor things to share even more code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:33:21 +0000 (04:33 +0000)]
[unroll] Remove pointless dyn_cast<>s to Instruction - the users of an
instruction must by definition be instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229061
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:30:44 +0000 (04:30 +0000)]
[unroll] Don't check the loop set for whether an instruction is
contained in it each time we try to add it to the worklist, just check
this when pulling it off the worklist. That way we do it at most once
per instruction with the cost of the worklist set we would need to pay
anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229060
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:27:50 +0000 (04:27 +0000)]
[unroll] Change the other worklist in the unroll analyzer to be a set
vector.
In addition to dramatically reducing the work required for contrived
example loops, this also has to correct some serious latent bugs in the
cost computation. Previously, we might add an instruction onto the
worklist once for every load which it used and was simplified. Then we
would visit it many times and accumulate "savings" each time.
I mean, fortunately this couldn't matter for things like calls with 100s
of operands, but even for binary operators this code seems like it must
be double counting the savings.
I just noticed this by inspection and due to the runtime problems it can
introduce, I don't have any test cases for cases where the cost produced
by this routine is unacceptable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229059
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:18:14 +0000 (04:18 +0000)]
[unroll] Replace a boolean, for loop, condition, and break with
std::all_of and a lambda. Much cleaner, no functionality
changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229058
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:14:05 +0000 (04:14 +0000)]
[unroll] Directly query for dead instructions.
In the unroll analyzer, it is checking each user to see if that user
will become dead. However, it first checked if that user was missing
from the simplified values map, and then if was also missing from the
dead instructions set. We add everything from the simplified values map
to the dead instructions set, so the first step is completely subsumed
by the second. Moreover, the first step requires *inserting* something
into the simplified value map which isn't what we want at all.
This also replaces a dyn_cast with a cast as an instruction cannot be
used by a non-instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229057
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 04:06:08 +0000 (04:06 +0000)]
[unroll] Replace a linear time check for no uses with a constant time
check.
Also hoist this into the enqueue process as it is faster even than
testing the worklist set, we should just directly filter these out much
like we filter out constants and such.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 03:57:40 +0000 (03:57 +0000)]
[unroll] Rather than an operand set, use a setvector for the worklist.
We don't just want to handle duplicate operands within an instruction,
but also duplicates across operands of different instructions. I should
have gone straight to this, but I had convinced myself that it wasn't
going to be necessary briefly. I've come to my senses after chatting
more with Nick, and am now happier here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 03:49:41 +0000 (03:49 +0000)]
[unroll] Extract the code to enqueue operansd for the worklist in the
unroll analysis into a lambda and call it. That's much simpler than
duplicating all the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 03:48:38 +0000 (03:48 +0000)]
[unroll] Use a small set to de-duplicate operands prior to putting them
into the worklist. This avoids allocating lots of worklist memory for
them when there are large numbers of repeated operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 03:40:58 +0000 (03:40 +0000)]
[unroll] Make the unroll cost analysis terminate deterministically and
reasonably quickly.
I don't have a reduced test case, but for a version of FFMPEG, this
makes the loop unroller start finishing at all (after over 15 minutes of
running, it hadn't terminated for me, no idea if it was a true infloop
or just exponential work).
The key thing here is to check the DeadInstructions set when pulling
things off the worklist. Without this, we would re-walk the user list of
already dead instructions again and again and again. Consider phi nodes
with many, many operands and other patterns.
The other important aspect of this is that because we would keep
re-visiting instructions that were already known dead, we kept adding
their cost savings to this! This would cause our cost savings to be
*insanely* inflated from this.
While I was here, I also rotated the operand walk out of the worklist
loop to make the code easier to read. There is still work to be done to
minimize worklist traffic because we don't de-duplicate operands. This
means we may add the same instruction onto the worklist 1000s of times
if it shows up in 1000s of operansd to a PHI node for example.
Still, with this patch, the ffmpeg testcase I have finishes quickly and
I can't measure the runtime impact of the unroll analysis any more. I'll
probably try to do a few more cleanups to this code, but not sure how
much cleanup I can justify right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229038
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 03:35:29 +0000 (03:35 +0000)]
IR: Drop never-used defaults for DIBuilder::createTemplate*(), NFC
No caller specifies anything different; these parameters are dead code
and probably always have been. The new hierarchy doesn't bother with
the fields at all (see r228607 and r228652).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229037
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 13 Feb 2015 02:47:22 +0000 (02:47 +0000)]
R600/SI: Remove unnecessary check for fpimm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229034
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 02:45:17 +0000 (02:45 +0000)]
[unroll] Make range based for loops a bit more explicit and more
readable.
The biggest thing that was causing me problems is recognizing the
references vs. poniters here. I also found that for maps naming the loop
variable as KeyValue helps make it obvious why you don't actually use it
directly. Finally, using 'auto' instead of 'User *' doesn't seem like
a good tradeoff. Much like with the other cases, I like to know its
a pointer, and 'User' is just as long and tells the reader a lot more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229033
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 02:43:38 +0000 (02:43 +0000)]
Bitcode: Remove confusing '?' from r229004, NFC
The name is always part of the record, it just might be empty. Remove
the `?` for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229032
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 02:41:36 +0000 (02:41 +0000)]
Bitcode: Add trailing comma to MetadataCodes, NFC
Suggested in the review of r229004, this should simplify diffs
in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 02:30:01 +0000 (02:30 +0000)]
[IC] Fix a bug with the instcombine canonicalizing of loads and
propagating of metadata.
We were propagating !nonnull metadata even when the newly formed load is
no longer of a pointer type. This is clearly broken and results in LLVM
failing the verifier and aborting. This patch just restricts the
propagation of !nonnull metadata to when we actually have a pointer
type.
This bug report and the initial version of this patch was provided by
Charles Davis! Many thanks for finding this!
We still need to add logic to round-trip the metadata correctly if we
combine from pointer types to integer types and then back by using range
metadata for the integer type loads. But this is the minimal and safe
version of the patch, which is important so we can backport it into 3.6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229029
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 02:17:39 +0000 (02:17 +0000)]
[unroll] Avoid the "Insn" abbreviation of Instruction. This is quite
hard to type and read for me, and is inconsistent with the other
abbreviation in the base class "Inst". For most of these (where they are
used widely) I prefer just spelling it out as Instruction. I've changed
two of the short-lived variables to use "Inst" to match the base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229028
91177308-0d34-0410-b5e6-
96231b3b80d8
Olivier Sallenave [Fri, 13 Feb 2015 02:13:57 +0000 (02:13 +0000)]
Check interleaving without relying on debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229027
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 02:10:56 +0000 (02:10 +0000)]
[unroll] Tidy up the integer we use to accumululate the number of
instructions optimized. NFC, just separating this out from the
functionality changing commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229026
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:46:02 +0000 (01:46 +0000)]
AsmWriter/Bitcode: MDImportedEntity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229025
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:43:22 +0000 (01:43 +0000)]
AsmWriter/Bitcode: MDObjCProperty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229024
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:42:09 +0000 (01:42 +0000)]
AsmWriter/Bitcode: MDExpression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229023
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:39:44 +0000 (01:39 +0000)]
AsmWriter/Bitcode: MDLocalVariable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229022
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 13 Feb 2015 01:39:22 +0000 (01:39 +0000)]
Fix the build, I forgot to check that UnitTests still built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229021
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:35:40 +0000 (01:35 +0000)]
AsmWriter/Bitcode: MDGlobalVariable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229020
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:34:32 +0000 (01:34 +0000)]
AsmWriter/Bitcode: MDTemplate{Type,Value}Parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229019
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:32:09 +0000 (01:32 +0000)]
AsmWriter/Bitcode: MDNamespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229018
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:30:42 +0000 (01:30 +0000)]
AsmWriter/Bitcode: MDLexicalBlockFile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229017
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:29:28 +0000 (01:29 +0000)]
AsmWriter/Bitcode: MDLexicalBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229016
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:28:16 +0000 (01:28 +0000)]
AsmWriter: MDSubprogram: Recognize DW_VIRTUALITY in 'virtuality'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229015
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:26:47 +0000 (01:26 +0000)]
AsmWriter/Bitcode: MDSubprogram
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229014
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:25:10 +0000 (01:25 +0000)]
AsmWriter/Bitcode: MDCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229013
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 13 Feb 2015 01:23:51 +0000 (01:23 +0000)]
Improve llvm-pdbdump output display.
This patch adds a number of improvements to llvm-pdbdump.
1) Dumping of the entire global scope, and not only those
symbols that live in individual compilands.
2) Prepend class name to member functions and data
3) Improved display of bitfields.
4) Support for dumping more kinds of data symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229012
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:22:59 +0000 (01:22 +0000)]
AsmWriter/Bitcode: MDSubroutineType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229011
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:21:25 +0000 (01:21 +0000)]
AsmWriter: MDCompositeType: Recognize DW_LANG in 'runtimeLang'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229010
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:20:38 +0000 (01:20 +0000)]
AsmWriter/Bitcode: MDDerivedType and MDCompositeType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229009
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:19:14 +0000 (01:19 +0000)]
AsmWriter/Bitcode: MDFile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229007
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:17:35 +0000 (01:17 +0000)]
AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229006
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:14:58 +0000 (01:14 +0000)]
AsmWriter/Bitcode: MDBasicType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229005
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:14:11 +0000 (01:14 +0000)]
AsmWriter/Bitcode: MDEnumerator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229004
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:10:38 +0000 (01:10 +0000)]
AsmWriter/Bitcode: MDSubrange
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229003
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:07:46 +0000 (01:07 +0000)]
IR: Add MDExpression::ExprOperand
Port `DIExpression::Operand` over to `MDExpression::ExprOperand`. The
logic is needed directly in `MDExpression` to support printing in
assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229002
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:05:00 +0000 (01:05 +0000)]
Support: Add dwarf::getOperationEncoding()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229001
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 13 Feb 2015 01:04:08 +0000 (01:04 +0000)]
Support: Rewrite LocationAtom and OperationEncodingString(), NFC
Use `Dwarf.def` more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229000
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 13 Feb 2015 00:40:41 +0000 (00:40 +0000)]
[LinkModules] Change the way ModuleLinker merges triples.
This commit makes the following changes:
- Stop issuing a warning when the triples' string representations do not match
exactly if the Triple objects generated from the strings compare equal.
- On Apple platforms, choose the triple that has the larger minimum version
number.
rdar://problem/
16743513
Differential Revision: http://reviews.llvm.org/D7591
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228999
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Feb 2015 00:39:38 +0000 (00:39 +0000)]
PPCFrameLowering's FramePointerOffset can be computed at initialization
time. Do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228998
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Feb 2015 00:39:36 +0000 (00:39 +0000)]
The TOC save offset can be computed at compile time, do so and
propagate changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228997
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Feb 2015 00:39:27 +0000 (00:39 +0000)]
The return save offset can be computed at initialization time - do
so and save the value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228996
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Fri, 13 Feb 2015 00:35:45 +0000 (00:35 +0000)]
Testcase for r228988.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 00:29:39 +0000 (00:29 +0000)]
[unroll] Don't use a map from pointer to bool. Use a set.
This is much more efficient. In particular, the query with the user
instruction has to insert a false for every missing instruction into the
set. This is just a cleanup a long the way to fixing the underlying
algorithm problems here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228994
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 13 Feb 2015 00:21:34 +0000 (00:21 +0000)]
llvm/test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll REQUIRES +Asserts due to -debug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228989
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Fri, 13 Feb 2015 00:17:03 +0000 (00:17 +0000)]
Prevent division by 0.
When we try to estimate number of potentially removed instructions in
loop unroller, we analyze first N iterations and then scale the
computed number by TripCount/N. We should bail out early if N is 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228988
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Feb 2015 00:00:24 +0000 (00:00 +0000)]
[unroll] Update the new analysis logic from r228265 to use modern coding
conventions for function names consistently. Some were already using
this but not all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228987
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Feb 2015 23:29:51 +0000 (23:29 +0000)]
Add support for having multiple sections with the same name and comdat.
Using this in combination with -ffunction-sections allows LLVM to output a .o
file with mulitple sections named .text. This saves space by avoiding long
unique names of the form .text.<C++ mangled name>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228980
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 12 Feb 2015 23:26:26 +0000 (23:26 +0000)]
X86: Don't crash if we can't decode the pshufb mask
Constant pool entries are uniqued by their contents regardless of their
type. This means that a pshufb can have a shuffle mask which isn't a
simple array of bytes.
The code path which attempts to decode the mask didn't check for
failure, causing PR22559.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228979
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Feb 2015 23:11:59 +0000 (23:11 +0000)]
Learn that __DATA,__objc_classrefs is not atomized via symbols.
This should hopefully fix objc on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228976
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 12 Feb 2015 22:58:53 +0000 (22:58 +0000)]
Add missing override.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228974
91177308-0d34-0410-b5e6-
96231b3b80d8
Olivier Sallenave [Thu, 12 Feb 2015 22:57:58 +0000 (22:57 +0000)]
Change max interleave factor to 12 for POWER7 and POWER8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228973
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 12 Feb 2015 22:47:45 +0000 (22:47 +0000)]
Ensure integer domain on general shuffle stack folding tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228972
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 12 Feb 2015 22:45:25 +0000 (22:45 +0000)]
Remove typedef of a pointer type used in a gep to simplify migration of geps to a typeless-pointer future.
I'd modify my migration tool to account for this, but this is the only
instance of a typedef'd pointer type to a gep I found in the whole test
suite, so it didn't seem worthwhile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228970
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Feb 2015 22:43:52 +0000 (22:43 +0000)]
[SDAG] Don't try to use FP_EXTEND/FP_ROUND for int<->fp promotions
The PowerPC backend has long promoted some floating-point vector operations
(such as select) to integer vector operations. Unfortunately, this behavior was
broken by r216555. When using FP_EXTEND/FP_ROUND for promotions, we must check
that both the old and new types are floating-point types. Otherwise, we must
use BITCAST as we did prior to r216555 for everything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228969
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 12 Feb 2015 21:52:11 +0000 (21:52 +0000)]
IR: Stop abusing DW_TAG_base_type for compile unit arrays
The sub-arrays for compile units have for a long time been initialized
to distinct temporary nodes with the `DW_TAG_base_type` tag, with no
other operands. These invalid `DIBasicType`s are later replaced with
appropriate arrays.
This seems like a poor man's assertion that the arrays do eventually get
replaced. These days, temporaries in the graph will cause assertions
when writing bitcode or assembly, so this isn't necessary. Use
temporary empty tuples instead.
Note that the whole idea of using temporaries and then replacing them
later is wasteful here. We never actually want to merge compile units
by uniquing based on content. Compile units should use `getDistinct()`
instead of `get()`, and then their operands can be freely replaced later
on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228967
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 12 Feb 2015 21:25:58 +0000 (21:25 +0000)]
Attempt to fix the build again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228964
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 12 Feb 2015 21:17:07 +0000 (21:17 +0000)]
Attempt to fix Linux builds after r228960.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228962
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Feb 2015 21:16:34 +0000 (21:16 +0000)]
Remove mostly unused setters.
Most of the code was setting the TargetOptions directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228961
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 12 Feb 2015 21:09:24 +0000 (21:09 +0000)]
Add concrete type overloads to PDBSymbol::findChildren().
Frequently you only want to iterate over children of a specific
type (e.g. functions). Previously you would get back a generic
interface that allowed iteration over the base symbol type,
which you would have to dyn_cast<> each one of. With this patch,
we allow the user to specify the concrete type as a template
parameter, and it will return an iterator which returns instances
of the concrete type directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228960
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 12 Feb 2015 21:05:12 +0000 (21:05 +0000)]
Add bulk of returning of values to Mips fast-isel
Summary:
Implement the bulk of returning values in Mips fast-isel
Test Plan:
reatabi.ll
Passes test-suite at -O0,-O2 and with mips32r2 and mips32r1.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits, aemerson, rfuhler
Differential Revision: http://reviews.llvm.org/D5920
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228958
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Thu, 12 Feb 2015 21:04:22 +0000 (21:04 +0000)]
Fix a crash in the assumption cache when inlining indirect function calls
Summary:
Instances of the AssumptionCache are per function, so we can't re-use
the same AssumptionCache instance when recursing in the CallAnalyzer to
analyze a different function. Instead we have to pass the
AssumptionCacheTracker to the CallAnalyzer so it can get the right
AssumptionCache on demand.
Reviewers: hfinkel
Subscribers: llvm-commits, hans
Differential Revision: http://reviews.llvm.org/D7533
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228957
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Feb 2015 20:40:19 +0000 (20:40 +0000)]
Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228956
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Feb 2015 20:26:46 +0000 (20:26 +0000)]
InstCombine: Allow folding of xor into icmp by changing the predicate for vectors
The loop vectorizer can create this pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228954
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 12 Feb 2015 20:01:03 +0000 (20:01 +0000)]
Relaxed over-zealous alignment requirement for VEX-encoded AES instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228953
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Thu, 12 Feb 2015 19:57:24 +0000 (19:57 +0000)]
Add a testcase for r228432.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228951
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Feb 2015 19:53:49 +0000 (19:53 +0000)]
Try to fix the MSVC build.
0xFFFFFFFFFFFFFFFFLL doesn't fit in a long long so it should have
type 'unsigned long long'. MSVC thinks it's a (signed) __int64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228950
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 12 Feb 2015 18:21:50 +0000 (18:21 +0000)]
gold-plugin: delete the output file for OT_DISABLE
bfd creates the output file early, so calling exit(0) is not enough, the file needs to be explicitly deleted.
Patch by: H.J. Lu <hjl.tools@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228946
91177308-0d34-0410-b5e6-
96231b3b80d8